Download rtmp flash video from Linux

To watch a streaming flash video (rtmp streaming) from a tv website without the flash plugin, you can download the video to your computer like this :

  1. Open the web page with firefox. Right click and view the source of the page.
  2. Look for the “<embed>” markup of the video, such as <embed src=”;autoPlay=true&amp;” […]>
  3. The URL of the XML file (in red here) contains the real reference to the video. So let’s copy it into the browser’s address bar, and replace the escaped characters by their values :,video.xml
  4. The XML file is now displayed in firefox. Look for the video itself (there might be more than one, for example SD or HD) and get its url. For example rtmp://
  5. Install flvstreamer (apt-get install flvstreamer in Ubuntu, urpmi flvstreamer in Mandriva and so on…)
  6. Run it with the rtmp URL : flvstreamer -o outputFile.flv -r “rtmp://
  7. If the download is not complete and you get the message ERROR: ReadPacket, failed to read RTMP packet header
    Download may be incomplete (downloaded about 57.20%), try resuming
    Just resume the download with the same command, plus the -e option :
    flvstreamer -e -o outputFile.flv -r “rtmp://”
  8. Repeat that last command as long as the file is not complete.
  9. Read the file with mplayer or vlc !
This entry was posted in TechTips. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *