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

11 thoughts on “Convert Realaudio stream to wav / mp3 on linux

  1. 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.

  2. you now can simply use ffmpeg:

    ffmpeg -i input.rm output.wav

    OR

    ffmpeg -i input.rm output.mp3 ( you must install LAME)

  3. Hi, I found an archive of an old radio show I want to listen to, but it’s only available in “.smil” . These streams are playable in Real Player, but extremely slow to load. I’d like to convert these to .mp3.

    Any suggestions?

    Thanks!

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>