Save streaming audio and video as a file with Mplayer

  • March 29, 2008
  • Avatar for peter
    Peter
    Upfold

There are lots of sites that offer streaming audio and video services these days. A lot of these use Flash video, but some older sites use other streaming technologies, including Real, Windows Media and QuickTime to deliver the content.

Downloading these streams so you can save them for later is almost always possible. It's worth pointing out at this point that you should check as to whether you have the legal right to dump streams to your machine, but I'll leave it to you to do this responsibly.

One of the ways you can dump this type of stream to your computer is to use the media player Mplayer.

With Mplayer already installed, you simply use the -dumpstream command line option to tell it to read the stream and save it to a file (by default, called stream.dump).

$ mplayer -dumpstream streamurl

streamurl in this example is the URL of the stream, which usually begins with rtsp:// or mms://. The hardest part of actually ripping a stream in this way is discovering this URL, as sites often don't make this immediately available.

I'd recommend the Firefox extension UnPlug for this purpose, as it can often discover the stream URL for you, even if it is unable to do the whole ripping process. You can then copy and paste that URL into your mplayer -dumpstream command, and you'll get the media file.

Again, though, do this responsibly and legally. ;)

Avatar for peter Peter Upfold

Home » Articles »