Welcome to BlogDogIt Thursday, March 28 2024 @ 04:16 AM EDT

Recording Internet Radio Programs On Your PC

  • Contributed by:
  • Views: 2,778
K+Club

Listening to daytime talk radio is practically impossible in my current employment. Oh, I have tried but between needing to take telephone calls and otherwise concentrating on duties of the job, it is hardly worth the effort. If only there was a way I could record these programs and listen to them at a time of my choosing. Listening on my commute would be ideal. Challenge accepted!

A web-search of "recording internet radio" will present a great  many options for accomplishing the task (perhaps such a search has led you to this article.) The easiest way to record from the internet involves using audio recording tools (such as Audacity) that basically capture the sounds coming from your PC speakers. While this is easy enough to do, problems arise in doing this while also working on your computer. For instance, if you capture your speaker (or mixer) output you will also pick up system sounds and besides, you don't want the program playing at work, you want to listen later. The method detailed here will download the broadcast directly to a file on your hard drive to listen to later.

There are software solutions for sale that promise to do what we want but if you were inclined to buy software it is doubtful that you would have read this far into this text. The solution I am suggesting involves no cash outlay because it utilizes freely available software (open source software and/or freeware.) However, unlike some advertized Free Downloadable software this technique will not require the installation of malware or software of any kind. The programs required to accomplish our mission are portable (meaning they may even be run from a USB-Key if desired.)


To make your life easier, you may download this ZIP file which contains the minimum required files to perform the steps outlined in this tutorial:

RecordInternetRadio.zip [8.6MB] (Windows x86)

If you would rather sort-out the downloads yourself, you will need the following executable files
(available from web sites shown ):


 

The Plan

  1. Use mplayer.exe to record broadcast to hard-drive in raw audio WAV format.
  2. Use lame.exe to convert WAV file into MP3 format file.
  3. Use Mp3Splitter-lite.exe to break single, large MP3 file into smaller parts (for easier consumption.)

[ Continue Reading to Learn More... ]

 

 

Locate the Feed URL for Your Station

Most radio stations that offer their broadcasts via the internet do so in the web-browser by way of a Flash or Javascript application. For example if we wanted to listen to WIBC Radio in Indianapolis, Indiana we could "Listen Live" by going to http://www.wibc.com/other/ando_wibc.html. While knowing the direct address to the stations pop-up player is very handy, what we need to discover is called it's "Feed URL." This is the URL (Universal Resource Locator) that the widget connects to in order to bring us the broadcast.

There are several ways to go about finding a station's Feed URL but the best way I have found is through the http://www.radio-locator.com/ web site (see iframe below.)


iFrame above: http://www.radio-locator.com/

Using the search functions of  radio-locator.com you will be presented with a link for "Audio Feed" for your desired station which if clicked on will allow you to listen to the station's feed in Windows Media Player (or other default media player.) The provided link is typically pointing to a PLS or M3U playlist file. Rather than left-clicking to play the feed you should right-click the link and choose to "Save Link As" or "Save Target As" (depends on browser) and save the file to your desktop or other location where you can easily locate the saved file.

By opening the playlist file in notepad (or other text editor) you will find the Feed URL listed in plain text. This is the address we will use to directly access the radio station feed.

Use MPLAYER to play the Feed URL

You should confirm that mplayer can play the direct Feed by entering the following on the command line:

<PATH TO MPLAYER>mplayer <FEED_URL>

So... if mplayer.exe is in the folder: C:\TOOLS and your discovered Feed URL is http://MyRadioStreamer.com:80/feed_AAC you would enter:

C:\TOOLS\mplayer http://MyRadioStreamer.com:80/feed_AAC

Needless to say; if you are unfamiliar with the Windows command line, you have a bit of catching up to do.

If all goes well, entering the above code will cause the audio feed to play through your PC speakers.

You now have the ability to listen to the internet radio station without the need of a resource hogging web browser or graphical media player. This in itself is a great use of MPLAYER but by simply adding to the command we can actually send the audio to the hard-drive rather than the speakers.

Save Audio Stream To Hard-drive With MPLAYER

The following command will save the broadcast to a file named RADIO.wav
You will have to search to find where your computer is writing the file. In my Windows7 (64bit) I found RADIO.wav was being written into C:WindowsSysWOW64 folder, On XP it will likely be in the folder that contains the mplayer.exe file. I just know you'll find it (you're that good.)
 

C:\TOOLS\mplayer -benchmark -vc null -vo null -ao pcm:waveheader:fast:file=RADIO.wav http://MyRadioStreamer.com:80/feed_AAC

To end the recording press [Ctrl+C] while in the command window.

There you go... you have recorded the broadcast to the hard-drive. You may now listen at your convenience by simply playing the newly created RADIO.wav file. Windows Media Player will handle the playback or you can have mplayer.exe play it. You may even associate WAV files with mplayer.exe to have mplayer play the file when you double click it. If you do not understand how to do this, you really do need to learn to use your computer more effectively.

Once you have your command all figured out you should put it in a batch file so you don't have to type the command every time. This will also help you automate the recording by creating a scheduled task to run the batch file. I know you will be able to sort that out too. NOTE: Windows 7 requires that all of these commands be run as administrator (another reason I so enjoy XP.)

Use lame.exe to convert RADIO.wav to an MP3 file.

The thing about WAV files is they can get really quite large. Unless you are going to listen to the recording right away then you will need to convert it to MP3 format to get back your hard-drive space. LAME is probably the best tool for the job.

The command for converting the file could hardly be easier:

lame --preset 32 RADIO.wav RADIO.mp3

The section of the command "--preset 32" will assure you an average bitrate of 32kbps which is pretty low quality but good enough for talk radio (IMO.) If you have a more discerning ear or your recording contains much music you might prefer to go with "--preset 96" or "--preset 128" for better quality. Just remember that streaming internet radio is never the greatest quality to begin with and converting with a high bitrate will do nothing to improve the original broadcast.

Of course the usual rules regarding a programs path still applies with this command (lame.exe will allow you to specify source and destination paths as well.)

Divide large MP3 file into smaller segments with Mp3Splitter-lite

Just run the Mp3Splitter-lite program. It has a very user-friendly GUI. You simply select your source MP3 file, assign a base name for the segments and select a target folder location to store the smaller parts. You can split by size or by number. There is also the option to add 1/4 sec of previous part to following part. You will probably want to check that box. The program automatically appends the sequential part number to your chosen base-name. You're going to love it!

If this process just seems too far outside of your comfort zone (so far as computers are concerned) you may be a candidate for a commercially available software solution to to get you what you desire. I have absolutely no recommendation as to what is available for sell out there and caution you to be very careful when buying software on-line. Be sure you have a good antivirus functioning and be careful what you click.

The steps I have outlined here should be pretty safe to use on about any computer system but you should be aware that the recording, conversion and saving of streaming media will most certainly add to the wear and tear you put on your computer. Bear this in mind when deciding to perform these tasks on a mission critical computer system. My advice would be to rescue an old Pentium4 computer with Windows XP from the land-fill and re-purpose it to be your own personal Internet Radio Recorder. Needless to say... Never redistribute any of your recorded files - utilize for personal use only. I assume no liability for anything that may result from you dabbling in these techniques. This article was created for educational/entertainment purposes only. [insert any other appropriate disclaimer here]

Happy Hacking!

 

http://www.radio-locator.com/cgi-bin/finder?s=C&band=&country=&scope=&count=20&format=

Share
  • Facebook
  • Google Bookmarks
  • Digg
  • Twitter
  • Reddit