aoakley.com

getram v0.9

A Linux/BSD shell script to convert RealAudio streams such as BBC Radio Listen Again into .mp3 files (translation: it lets you record radio shows and play them on your iPod).

Public domain by Andrew Oakley.
Latest version always available from: www.aoakley.com/misc/getram

Requires MPlayer v1.0 or newer
Requires LAME
Requires mp3info

Usage:

getram [-d] [-m] [-t N] http://site/path/filename.ram [outputfilename]

-d : datestamps yyyymmdd-outputfilename
-m : mono 24 kbit/s (default is stereo 96 kbit/s)
-t : timeout (stop recording) after N seconds

Examples:

getram -d -t 1800 "http://www.bbc.co.uk/radio4/realplayer/media/fmg2.ram" Radio4-Live.mp3

...records 30 minutes of live BBC Radio 4 in 96kbit stereo and datestamps it.

getram -m http://www.bbc.co.uk/radio/aod/shows/rpms/radio4/latestnewsbulletin.ram

...records the whole of the most recent news bulletin in 24kbit mono.

You can find .ram URLs by going to BBC Radio 4 Listen Again, selecting a programme, right-clicking the "Listen in stand-alone RealPlayer" and copying the URL. Alternatively you can view the HTML source and look for the .ram URL. You may use any .ram streams, use is not limited to BBC Radio 4.

Recent improvements:

  • Now has a timeout option (-t N) so you can record N seconds of a stream and then stop. Ideal for combining with crontab to record live programming - no need to wait for the BBC to encode the show for Listen Again.

  • Now uses low bandwidth RealAudio stream if encoding to low bitrate mono. Ideal for conserving bandwidth and audio quality if you may be using your bandwidth for other things at the time. Stereo will continue to use the maximum bandwidth stream available.

  • Now sets artist and album (by default, "BBC Radio 4" and "Listen Again"). These are hardcoded into the script. Later versions of the script should allow either passing by option, or automatic detection from the RealAudio stream metadata.

  • Default stereo encoding rate upped from 64kbit to 96kbit.

    Bugs:

  • Commandline options must be placed in strict order as per usage guide.

  • Artist and album cannot be changed except by editing the hardcoded variables in the script.

  • Some versions of mplayer seem to dump all RealAudio to PCM as mono. This is not a bug with the getram script per se, but annoying nonetheless.

  • Very little, if any, error handling. Yet.

  • No installer, no dependency checking and no manpage. Yet.


    Public Domain - Andrew Oakley - 2007-09-10

    aoakley.com   Back - Home