Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RTMP: Is there such a linux command line tool?

Tags:

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

like image 656
Abs Avatar asked Jun 21 '09 19:06

Abs


People also ask

What is a RTMP server?

Real-Time Messaging Protocol (RTMP) is an open source protocol owned by Adobe that's designed to stream audio and video by maintaining low latency connections. Clients use a handshake to form a connection with an RTMP server which then allows users to stream video and audio.


2 Answers

One of the following should do, if you have mplayer or vlc compiled with RTMP access.

 mplayer -dumpstream rtmp://live.site.com/loc/45/std_fc74a6b7f79c70a5f60.mp3 

This will generate a ./stream.dump.

 vlc -I dummy rtmp://live.site.com/loc/45/std_fc74a6b7f79c70a5f60.mp3 \     --sout file/ts:output.mpg vlc://quit 

This will generate a ./output.mpg. You'll have to demux it to extract just the audio stream out.

like image 114
ephemient Avatar answered Oct 14 '22 19:10

ephemient


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. Example: rtmpdump -r "rtmp://host.com/dir/file.flv" -o filename.flv
  • flvstreamer. Example: 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:

ffmpeg -i rtmp://server/live/streamName -acodec copy -vcodec copy dump.mp4
like image 33
Juan Simón Avatar answered Oct 14 '22 18:10

Juan Simón