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..)
- Extract soundtrack (MP3) from DVD with mplayer
- MP3 Bitrates compared
- Howto hack USB port on a LG LAC-M6500R MP3 Player (CD/Radio/MP3 Player)
- How to convert matroska MKV to AVI on Linux ?
- SupyBot
admin June 13th, 2004
- Utils
- Comments(4)
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
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.
Flohack, yes that’s pretty fine :)
Warning mplayer team has changed the syntax.. now it’s:
mplayer -cache 128 -ao pcm:file=stream.wav rtsp://XXXX/XXX.rm