LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-11-2008, 10:46 AM   #1
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
command line tool to play swf internet streams?


Ive been successful in the past being able to play asx/mms/asf and so on streams using mplayer and vlc from the command line BUT I have found an internet stream that has me beat.. At least so far. But I vow to fight him till the death! What command line tool can play this stream? Im using CentOS 5.1. I've tried mplayer, vlc,mencoder and it wont play. error outputs below.


the stream is: http://assets.espn.go.com/swf/espnra...C&mp3cs=WTEMAM


it plays fine in a web browser. But I need to be able to play it command line.

thanks!





mplayer -dumpstream -dumpfile test.swf "http://assets.espn.go.com/swf/espnradio/08/stations_stw1.swf?&callsign=WTEMAMAAC&mp3cs=WTEMAM"
MPlayer 1.0rc2-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) D CPU 3.00GHz (Family: 15, Model: 6, Stepping: 5)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
115 audio & 237 video codecs
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing http://assets.espn.go.com/swf/espnra...C&mp3cs=WTEMAM.
Resolving assets.espn.go.com for AF_INET6...
Couldn't resolve name for AF_INET6: assets.espn.go.com
Resolving assets.espn.go.com for AF_INET...
Connecting to server assets.espn.go.com[72.246.48.33]: 80...
Cache size set to 320 KBytes
Stream not seekable!
Core dumped

Exiting... (End of file)


_______________________________________________

mplayer -playlist "http://assets.espn.go.com/swf/espnradio/08/stations_stw1.swf?&callsign=WTEMAMAAC&mp3cs=WTEMAM"
MPlayer 1.0rc2-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) D CPU 3.00GHz (Family: 15, Model: 6, Stepping: 5)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Resolving assets.espn.go.com for AF_INET6...
Couldn't resolve name for AF_INET6: assets.espn.go.com
Resolving assets.espn.go.com for AF_INET...
Connecting to server assets.espn.go.com[72.246.48.33]: 80...
Cache size set to 320 KBytes
115 audio & 237 video codecs
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing http://assets.espn.go.com/swf/espnradio/08/CWS
Resolving assets.espn.go.com for AF_INET6...
Couldn't resolve name for AF_INET6: assets.espn.go.com
Resolving assets.espn.go.com for AF_INET...
Connecting to server assets.espn.go.com[72.246.48.18]: 80...
Server returned 400: Bad Request
STREAM_ASF, URL: http://assets.espn.go.com/swf/espnradio/08/CWS
Resolving assets.espn.go.com for AF_INET6..



____________
vlc -I dummy "http://assets.espn.go.com/swf/espnradio/08/stations_stw1.swf?&callsign=WTEMAMAAC&mp3cs=WTEMAM"
VLC media player 0.8.6d Janus
[00000296] dummy interface: using the dummy interface module...
[swf @ 0x8573cf4]Compressed SWF format not supported
[00000311] ffmpeg demuxer error: av_open_input_stream failed
[00000290] main playlist: nothing to play
 
Old 08-11-2008, 11:10 AM   #2
Berticus
Member
 
Registered: Jul 2005
Distribution: Arch
Posts: 159

Rep: Reputation: 31
SWF (Shockwave flash) is a closed format. There are a couple of open source projects, such as swfdec and gnash. However, they're not good enough that I would really recommend them. The only software that I'd recommend that can play a swf file is Adobe's flash plugin. However, it's not standalone and obviously cannot be accessed through a terminal.
 
Old 08-12-2008, 11:49 AM   #3
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Original Poster
Rep: Reputation: 43
I might check out that gnash, thanks for replying.
 
Old 08-22-2008, 04:07 PM   #4
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Original Poster
Rep: Reputation: 43
what a PAIN IN THE ASS that gnash is to install and I couldn't get it to record anything.. oh well


I found out that Audacity 1.3.5 has a Timer Record option! yay! Ive been waiting on this from audacity for years.. So all I have to do is make sure the player is playing the stream and set audacity to record for x time frame.
 
Old 08-22-2008, 04:25 PM   #5
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
*.swf isn't a stream. You can't play one until it is fully downloaded.
It's a flash movie. You can use either firefox plugin, or you can use windows standalone flash players with wine (I do it this way).

The link you've provided is a "player" (for another audio stream) written in flash (works in firefox with flash plugin just fine). Most likely you won't be able to play that link outside of browser. But this "player" gets it's audio data from somewhere, and if you'll be able to guess from where, then you'll be able to play it without using that "player".
 
Old 08-22-2008, 04:48 PM   #6
roystonlodge
Member
 
Registered: Jun 2008
Posts: 161

Rep: Reputation: 31
You can download a standalone Flash Player from http://www.adobe.com/support/flashplayer/downloads.html, which you can launch from the command line.

I've been trying to get it to work under Damn Small Linux, so I can play downloaded .swf games, but with little success. It runs if I install the GTK2 myDSL extension, but crashes rather quickly. If anybody has any ideas on what I could do to correct that problem, I'd be most appreciative.

The Adobe site doesn't list any options that the flashplayer supports from the command line. If anybody knows of any, I'd also be appreciative. Maybe if I had those command line options I could find a way to run flashplayer without it crashing.
 
Old 08-22-2008, 05:07 PM   #7
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by roystonlodge View Post
I've been trying to get it to work under Damn Small Linux, so I can play downloaded .swf games, but with little success. It runs if I install the GTK2 myDSL extension, but crashes rather quickly. If anybody has any ideas on what I could do to correct that problem, I'd be most appreciative.
You can use Windows standalone flashplayer with Wine. It always works very well. Windows standalone flash player (or "projector") should be available somewhere on the Adobe site, might be called something like "sa_flashplayer_9_debug.exe". I also have "SAFlashPlayer.exe" which I use to play downloaded flash games, but I have no idea where I got it from.
 
Old 08-31-2008, 08:13 AM   #8
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Original Poster
Rep: Reputation: 43
Quote:
The link you've provided is a "player" (for another audio stream) written in flash (works in firefox with flash plugin just fine). Most likely you won't be able to play that link outside of browser. But this "player" gets it's audio data from somewhere, and if you'll be able to guess from where, then you'll be able to play it without using that "player".

Yes. I know that. THAT'S THE PROBLEM. I can't find a way to hack it to get the audio location.



Anyways. I'm downloading a Fedora 9 Live CD to test on a system. From the release notes:

10.5.1. Enabling Flash Plugin

Fedora includes swfdec and gnash , which are free and open source implementations of Flash. We encourage you to try either or them before seeking out Adobe's proprietary Flash plugin software.

Users of Fedora x86_64 must install the nspluginwrapper.i386 package to enable the 32-bit Adobe Flash plugin in x86_64 Firefox and the pulseaudio-libs.i386 package to enable sound from the plugin.

http://docs.fedoraproject.org/releas...g-Flash-Plugin




So Im going to try that once it's finished downloading and I burn the CD. Will report back with my findings.
 
Old 08-31-2008, 07:11 PM   #9
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Original Poster
Rep: Reputation: 43
ok I booted up with a Fedora 9 Live CD

had to use yum to install:
gnash
swfdec

Had to install adobe flash rpm from:
http://www.adobe.com/shockwave/downl...ShockwaveFlash

installed the java run time from here
http://java.com/en/download/linux_ma...&host=java.com
followed the install instructions for the rpm


the flash player loads and it says its connecting then it says buffereing then it says on air

But no sound


I know the soundcard is working as I get system sounds as well as I can play streams from shoutcast.com
This stream plays on my laptop running vista so I know the stream works

flash
yum -y install gnash swfdec
rpm -ivh flash-plugin-9.0.124.0-release.i386.rpm

audacity
yum -y libid3tag jack-audio-connection-kit wxGTK
rpm -ivh libmms-0.3-1.rh9.rf.i386.rpm soundtouch-1.3.1-10.fc9.i386.rpm
rpm -ivh audacity-1.3.5-0.5.beta.fc9.i386.rpm
 
Old 09-12-2008, 02:30 PM   #10
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Original Poster
Rep: Reputation: 43
ok. started over. I installed mythdora on a spare PC so set up as a PVR and decided to use it to record my stream. So I installed the flash packagers installed alsa-kmdl-2.6.18-92.1.10.el5.i686 and then I was able to install alsa-driver using yum from atrpms.

then I can use arecord to record from MIX and that records what is coming through the sound card. So I just leave the stream up and set a cron job to record the time frame I need.
 
Old 06-25-2011, 02:44 AM   #11
Wilhelm.Buchmueller
LQ Newbie
 
Registered: Sep 2007
Posts: 3

Rep: Reputation: 0
Code:
gnash      'http://assets.espn.go.com/swf/espnradio/08/stations_stw1.swf?&callsign=WTEMAMAAC&mp3cs=WTEMAM'
does the work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
record dvb streams (with subtitles !!) from the command line henning Linux - Software 5 03-08-2009 10:23 AM
convert command line picture tool benchcomptons Debian 1 07-29-2007 01:14 AM
where is the ffmpeg command line tool? leodemario Linux - Desktop 5 02-25-2007 04:11 PM
DHCP command line tool cold Fedora 1 11-09-2005 11:14 AM
command line tool to control volume? infected Programming 4 09-02-2004 09:58 AM


All times are GMT -5. The time now is 11:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration