This free Windows utility is for internet radio broadcasts that are distributed in RealAudio, but you want them converted into mp3 or as podcasts.
The source code is available:
rm2podcast is copyright (c) 2007 Lucian Wischik. You may use the source code in your derivative works. But if your derivative work is a commercial one then you must acknowledge me and include a pointer to this website either in your About dialog or your splash-screen or (for command-line utilities) in your command-line help.
For music that is available for you to listen to, I'm sure that converting it to mp3 for personal use is within your "fair use" rights.
rm2podcast downloads the web-page you specified. Within the HTML source of that page, it looks for the first occurence of the after text that you gave. If this text appeared inside an <a>...</a> tag, it jumps to the start of that tag. Then it looks for the first subsequent occurence of the before text. And then, inside that selection, it looks for the first text of the form "...://... .ram ..."
When you click the Test button, it will give you useful diagnostics on what it's doing and what text it has found. You should also experiment with View>Source in your web-browser to look at the HTML source yourself.
Once it's found a .ram link, it downloads that. RAM files are shortcuts. They contain a list of rtsp links, like this:
rtsp://webserver.com/advertisment.rm rtsp://webserver.com/file2.rm?start=30:00 --- pnm://webserver.com/advertisment.rm pnm://webserver.com/file2.rm?start=30:00
rm2podcast will pick the last of these rtsp links. (it is unable to handle pnm links).
Next: it runs mplayer to stream down the .RM file onto your hard disk. Then it runs mplayer to convert that .RM into a .0.WAV. Then it runs mplayer to trim it into a .WAV that starts at the indicated start time. Then it runs lame to encode the .WAV into a .MP3
Some broadcasters use the same filename (e.g. "file2.rm") for their broadcast from week to week. Other broadcasters use a new filename each time (e.g. "file-jan5-2007.rm" and later "file-jan7-2007.rm"). rm2podcast can't know which is which. So what it does is it downloads the RM regardless, and converts it to MP3. Once it has that MP3 it checks for any previously-downloaded MP3s in the same directory. If it finds any, and if they are identical, then it figures that the latest MP3 must be redundant and so it deletes it. To check identity it uses CRC32.
Next: it scans all the MP3s that have been downloaded from this webpage so far, and it creates a podcast file for them. Podcast files have type ".xml". Unfortunately, these podcast files aren't a lot of use here. Most music software only works if the podcast files and the MP3s reside on an internet server. That's a big shame.