I've managed to get flvstreamer to read a radio station's RTMP stream with the options --live -r [url]
, and it outputs what I guess is the raw audio data + stream info to stdout.
Can I make it play the stream through my speakers, from the command-line?
Possibly by sending sending the raw audio data to mplayer
or something else. Thanks.
I got it to work with the command ./flvstreamer_x86 --live --quiet -r [url] --buffer 3000 | mplayer -vo null -
, but it quits after a couple of seconds to a couple of minutes. I added --buffer 3000
to imitate what I saw when tracing the original Flash player with Wireshark. These are the last rows of output.
[pulse] working around probably broken pause functionality,
see http://www.pulseaudio.org/ticket/440
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
FAAD: Failed to decode frame: Maximum number of bitstream elements exceeded
A:16866.9 ( 4:41:06.9) of 0.0 (unknown) 8.1%
Exiting... (End of file)
This was with flvstreamer 1.81. I couldn't get it to work with any version above, they just output
FLVStreamer v2.1c1
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
ERROR: rtmp server sent error
Starting Live Stream
FLV☺♣ Metadata:
audiodatarate 48.00
audiosamplerate 44100.00
audiocodecid 10.00
[stripped]
How can I make it play continuously? Thanks.
| mplayer -
?