I have looked everywhere to find a linux utility that will allow me to download rtmp streams. Not flv video but MP3 streams. The location of the streams I want to download are in this format.
rtmp://live.site.com/loc/45/std_fc74a6b7f79c70a5f60.mp3
Anyone know of such a command line tool? Or even anything close to what I am asking for?
I do not want full software applications and it would be great if it worked on Linux via Shell or something.
Thanks all
I think the landscape has changed a bit since the time of some of the previous answers. At least according to the rtmp wikipedia page. It would appear that the rtmp protocol specification is open for public use. To that end you can use 2 tools to accomplish what the original poster was asking,
rtmpdump
andffmpeg
. Here's what I did to download a rtmp stream that was sending an audio podcast.step #1 - download the stream
I used the tool rtmpdump to accomplish this. Like so:
step #2 - convert the flv file to mp3
OK, so now you've got a local copy of the stream, file.flv. You can use
ffmpeg
to interrogate the file further and also to extract just the audio portion.From the above output we can see that the file.flv contains a single stream, just audio, and it's in mp3 format, and it's a single channel. To extract it to a proper mp3 file you can use
ffmpeg
again:The above command will copy the audio stream into a file, file.mp3. You could also have extracted it to a wav file like so:
This page was useful in determining how to convert the flv file to other formats.
One of the following should do, if you have
mplayer
orvlc
compiled with RTMP access.This will generate a
./stream.dump
.This will generate a
./output.mpg
. You'll have to demux it to extract just the audio stream out.This question is old but this can help to another users with this doubt.
To download directly, without any conversion, there is two options (the author of both programs is the same and the behavior is the same):
rtmpdump -r "rtmp://host.com/dir/file.flv" -o filename.flv
flvstreamer -r "rtmp://od.flash.plus.es/ondemand/14314/plus/plustv/PO770632.flv" -o salida.flv
And if you want download and convert the video at same time, the best way is use ffmpeg: