LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   command line tool to play swf internet streams? (https://www.linuxquestions.org/questions/linux-software-2/command-line-tool-to-play-swf-internet-streams-662002/)

ncsuapex 08-11-2008 09:46 AM

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

Berticus 08-11-2008 10:10 AM

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.

ncsuapex 08-12-2008 10:49 AM

I might check out that gnash, thanks for replying.

ncsuapex 08-22-2008 03:07 PM

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.

ErV 08-22-2008 03:25 PM

*.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".

roystonlodge 08-22-2008 03:48 PM

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.

ErV 08-22-2008 04:07 PM

Quote:

Originally Posted by roystonlodge (Post 3256374)
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.

ncsuapex 08-31-2008 07:13 AM

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.

ncsuapex 08-31-2008 06:11 PM

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

ncsuapex 09-12-2008 01:30 PM

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.

Wilhelm.Buchmueller 06-25-2011 01:44 AM

Code:

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


All times are GMT -5. The time now is 10:32 PM.