HOWTO: Use MPlayer to Rip an MP3 Stream

| No TrackBacks
On Linux, it's easy to use mplayer to rip your favorite MP3 stream.  By ripping, I mean saving an audio stream to a file on your computer for later.  I often save online streams and load them onto my favorite portable music player for a workout.  To save a video/audio stream with mplayer, you'll need the -dumpstream and -dumpfile options.  Note, there are other ways to save a stream with mplayer, but this is by far the most convenient method I've found.

Here's an example of ripping SomaFM's Groove Salad MP3 stream (a nicely chilled plate of ambient beats and grooves):

mplayer -cache 100 -dumpstream \
http://scfire-chi0l-2.stream.aol.com:80/stream/1018 \
-dumpfile soma_fm.mp3

BTW, this method also works for saving RealVideo streams (RSTP).

mplayer -cache 100 -dumpstream \
rtsp://rxn08.example.com/video/video1.rm \
-dumpfile video.rm
From the mplayer man-page:

-dumpstream (MPlayer only)
       Dumps the raw stream to ./stream.dump.  Useful when ripping from  DVD  or  network.   If  you  give  more  than  one  of  -dumpaudio, -dumpvideo, -dumpstream on the command line only the last one will work.

-dumpfile <filename> (MPlayer only)
       Specify which file MPlayer should dump to.  Should be used together with -dumpaudio / -dumpvideo / -dumpstream.

-cache <kBytes>
       This option specifies how much memory (in kBytes) to use when precaching a file or URL.  Especially useful on slow media.


Did You Find this Helpful?

Did you find this post helpful, or at least, interesting?

  

Send Mark a Direct Message

If you'd like to send me a direct message, please do so below. However, I do not publicly post comments or messages submitted directly to me. So, if you're going to try to SPAM me, or my blog, you're pretty much wasting your time.

400 characters remaining

Error

About Mark

A Silicon Valley native, Mark Kolich is a full-time Software Engineer, a casual entrepreneur, and a consultant for hire. A web technologies expert, his current focus is on building powerful and robust cloud-driven web-applications using Java, PHP, Perl, AJAX, DHTML, CSS, and JavaScript. His favorite programming languages are PHP, Java and JavaScript. He uses Linux, enjoys biking to work, loves building great software, and always writes elegant, readable, and maintainable code.

No TrackBacks

No trackbacks attached to this entry.

Twitter (@markkolich)

Translate

About this Entry

This page contains a single entry by Mark Kolich published on October 25, 2008 3:39 PM.

Basics of SCSI: Firmware Applications and Beyond was the previous entry in this blog.

HOWTO: Generating Good Random Passwords With /dev/urandom is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.