Getting Real Audio into Podcast

Occasionally, the ABC have items on their programs to which they don’t have the copyright for, and as such they cannot post an MP3 of the program, but will do a Real Audio stream. Meaning you have to use Real Audio to listen to it, and you cannot archive it. Or so it seems. Now, I refuse to use Real Audio: it’s nothing to do with commercial software or anything like that (there is after all a free version), but I just don’t like streaming. I find that on dialup it just doesn’t work well. And, the time I spend at the computer I am generally reading, so listening to anything other than music just doesn’t work well. I much rather listen to Podcasts while commuting. So, how do you get an item into your iTunes Podcast library? You’ll need mplayer. You can find it at the MPlayerOSX Website. Install it, and then add the following to your ~/.profile:

 1     function realdump
 2     {
 3         if test -f $1 ; then
 4             realdump `cat $1` 
 5         else
 6             export temp=${1/#*\//}
 7             export filename=${temp/.*/.wav}
 8             ~/bin/mplayer -cache 128 -vc dummy -vo null -ao pcm -aofile $filename $1
 9         fi
10         if test $# -gt 1 ; then
11         shift
12         realdump $*
13         fi
14     }

You’ll also need something to encode in either MP3, or AAC format. faac is great for the latter, LAME for the former. I use faac, and have the following in my ~/.profile:

1     function faac_podcast
2     {
3         faac -b 64 -w $1
4     }

You’ll want something similar if you use LAME. The ABC has a placeholder MP3 file, that is usually just a short blurb saying they don’t have the ability to put the program up as an MP3. Download this, and then go to the website of the program in question. Find the Real Audio stream, and download the .ram file. Open this in a text editor, and use the Terminal to download the stream using: $ realdump rtsp://www.server.net/path/to/file.ra Then use the following command to encode the file: $ faac_podcast filename.wav This may take some time – although on my computer it was a bit faster than the previous step. In iTunes, ask the Finder to reveal the placeholder file (select it, then use ⌘R, or File – Show Song File). Give the replacement file exactly the same name, except keep the right extension, and copy this file to the same location. If they are the same file format, it will overwrite the placeholder, and you are finished. If not, you need to delete the placeholder file, but not the library entry. Moving the file is not enough, you must delete it! Then, to connect the entry to the replacement file, use ⌘I (Get Info…) and choose to select the file. Choose the replacement file. You can use iTunes to import and convert the file, but for me this was much slower. It requires copying the full WAV file to the library (slow, since mine is on a server), and then converting it to MP3/AAC (again, slow, as it needs to get all of the data back from the server, and then send the new stuff there).

"Rating is no stars" Playlist

I use a “Rating is no stars” playlist, but it seems to pick up the tracks rated 1-19 as well. I’m not surprised, in the light of my recent article on the relative play counts of various rated tracks.

OmniNerd Article: Extended iTunes Rating

OmniNerd – Articles: Extended iTunes Rating

iTunes has the ability to store ratings of a finer gradient than just the number of stars. Higher rated tracks should be played more, but is this always the case? I needed to know the answer to this.

This is the long-awaited article I wrote for OmniNerd, expanding on the results I obtained in my ratings research and experiment using iTunes. Well worth the read, if I do say so myself!

Bypassing iTunes Downloader

My biggest hate about iTunes is that if the download of a Podcast fails, it needs to restart the whole download, rather than just resume. This really sucks if you are 21Mb into a 22.5Mb download. Using the technique illustrated in Adding a Podcast to a Pre-Existing Subscription, it’s possible to download the files in another program, such as wget, which can handle resumes. It also tends not to drop out as much as iTunes does when the network is congested. Which it is automatically when three downloads are concurrently occurring. There are some changes that need to be made to the process, but these are really just simplifications. You need to know the URL of the file you want to get, which can be obtained using the following AppleScript:

1     tell application "iTunes"
2         set the clipboard to address of item 1 of selection
3     end tell

Then, set up your http server, and create the same directory structure from your server root. Go to the relevant directory, and download the files you want to grab. Finally, go offline, and point the domain(s) at your own computer. Go back into iTunes, and use the GET button to grab the files from your own ‘server’. Don’t use the Update Podcasts button, or an error may occur. This removes the need to recreate the XML file, which is the most labour intensive part of the process illustrated in the previous post. It works a treat.