Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
2  
Did you try | mplayer -? –  Gilles Jul 17 '11 at 0:36
    
@Gilles Thanks for the suggestion, please see my update. –  Znarkus Jul 17 '11 at 9:08

1 Answer 1

up vote 2 down vote accepted

I think I've made it work with 1.81 now :)

./flvstreamer_x86 --live --quiet --buffer 3000 -r [url] | mplayer -vo null -idle -

I added the -idle to stop it from exiting, I guess the problem was that flvstreamer needed to buffer and mplayer didn't receive more data, so it quit.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.