You will need mplayer and mencoder, as well as the win32 codecs in order to convert .rm files to their mpeg equivalent. So if you haven't already got them installed you can get them with:
sudo apt-get install mplayer mencoder wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2 tar jxfv essential-20071007.tar.bz2 sudo mkdir -p /usr/lib/win32 sudo mv -i essential-20071007/* /usr/lib/win32/
Next you need to download the realplayer feed you want to convert. First of all download the realvideo file you want and then view it to see the realtime streaming protocol (RTSP) url inside:
wget http://www.bbc.co.uk/england/realmedia/politicsshow/south/bb/politicsshow_16x9_bb.ram cat politicsshow_16x9_bb.ram // displays something like rtsp://rm-acl.bbc.co.uk/england/politicsshow/south/bb/politicsshow_16x9_bb.rm
Now you can use mplayer to dump the stream to your local disk:
mplayer -dumpstream rtsp://rm-acl.bbc.co.uk/england/politicsshow/south/bb/politicsshow_16x9_bb.rm
This will take as long as it would take to view the stream normally. Once it's finished you can then use mencoder to convert the stream to your required file format. To have H264 (mpeg 4) video, and mp3 audio you would use:
mencoder stream.dump -o bbc-politics.avi -ovc x264 -oac mp3lame
You can get a list of all supported formats with mencoder -ovc help.