Convert Realaudio stream to wav / mp3 on linux

I really enjoy to listen radio. Most of the radio use Realaudio stream. On Un*x, you usually can use realplayer. Now i want to convert this stream to mp3 in order to listen it on my mp3 player.

Howto:

  • First down the .ram file
  • open it to find the rtsp url (something like rtsp://XXXX/stream.rm)
  • ask mplayer to encode it in wav
  • next transform it to mp3 (with lame)
mplayer -cache 10 -ao pcm -aofile stream.wav  rtsp://XXXX/stream.rm
lame stream.wav

I wrote a little script to do this directly look at realRip for more informations. To use it simply call “realRip.py stream.ram” or “realRip.py http://XXXX/stream.ram” (it will download the ram file and parse it..)

Related posts :

admin June 13th, 2004


5 Responses to “Convert Realaudio stream to wav / mp3 on linux”

  1. digital-atheiston 13 Nov 2005 at 9:58 am

    I recently wrote a guide explaining how to convert .ra files to mp3 using only open source software (mplayer and lame) on windows. You can find it here : http://www.digital-atheist.com/tutorials.html

  2. flohackon 02 Jan 2007 at 3:48 pm

    Since wav files occupy quite some space, a better method to convert a real audio file would be the following:

    # mkfifo stream.wav

    # mplayer mplayer -ao pcm:file=stream.wav rtsp://XXXX/stream.rm &

    # lame stream.wav

    # rm stream.wav

    mkfifo create a socalled ‘named pipe’ (see http://www2.linuxjournal.com/article/2156 for a tutorial). mplayer writes to that pipe while lame (at the same time) reads from it and encodes the file on the fly.

  3. Jkxon 02 Jan 2007 at 4:22 pm

    Flohack, yes that’s pretty fine :)

  4. Jkxon 02 Oct 2007 at 12:36 am

    Warning mplayer team has changed the syntax.. now it’s:

    mplayer -cache 128 -ao pcm:file=stream.wav rtsp://XXXX/XXX.rm

  5. 7otaon 22 Sep 2008 at 3:57 pm

    thanx for this article !

Comments RSS

Leave a Reply