Convert iTunes MP3 podcasts to normal songs
Aug 03, '07 07:30:01AM
Contributed by: scelis
I subscribe to a few podcasts which provide music as the main type of content. After a while, I got tired of how they were always listed as "Podcasts" in both iTunes and my iPod, preventing me from listening to them if I ever wanted to just shuffle randomly through all of my songs. When you download a podcast, iTunes sets the content type of this file to "Podcast" in an ID3 tag. This hint will describe how to unset that tag, and then even show you how to do it automatically through Automator. Note that this hint only works for MP3 files. I have not found a way to edit the tags of AACs.
First, we have to download and compile a command line program to be able to modify ID3 tags. Ensure that you have the XCode tools installed. Then download id3lib. Now follow these steps:
- Unextract the archive, open a Terminal window, and change to the newly extracted directory.
- Run the following commands to install id3lib:
$ ./configure
$ make
$ sudo make install
- Now you have to download and install the actual command line tool, id3v2.
- Extract the id3v2 archive you downloaded and change to its directory in your Terminal window. Then run the following commands:
$ make
$ sudo make install
- Now we have the tool necessary to strip the content type ID3 tag. To do this we simply run the following command: /usr/local/bin/id3v2 --TCON "" %FILENAME
Since it is a pain to find the podcast in your iTunes Music directory, run this command on it, and then re-add it to your iTunes library. We can also create an Automator workflow to do it all for us:
- First, launch Automator.
- In our new workflow template, find the iTunes » Get Selected iTunes Items action and drag it to the right-hand pane.
- Next, add the Finder » Filter Finder Items action, and set its parameters to: Name Extension -- Is equal to -- mp3. This prevents our workflow from trying to do anything with AAC files.
- Now we need to create a new folder where podcasts will be copied before they are modified. I created one under the Music folder in my home directory called Podcasts to Convert.
- Add the Finder » Copy Finder Items action, and set the destination to the folder you just created.
- Add the Automator » Run Shell Script action. Leave the shell as /bin/bash, and then set the actual script to:
for f in "$@"
do
/usr/local/bin/id3v2 --TCON "" "$f"
done
- Add the Finder » Get Specified Finder Items action. Select the Files/Folders drop-down in the title bar of this action, and set it to Ignore Results from Previous Action. Then, add the folder that we created in step four.
- Add the Finder » Get Folder Contents action.
- Create a new playlist in iTunes. I called mine Imported Podcasts.
- Add the iTunes » Add Files to Playlist action. Select the new playlist you just created.
- Repeat steps seven and eight.
- Add the Finder » Move to Trash action.
- Select File » Save As Plug-in from the menu bar, and name the script whatever you like. Set the 'Plug-in for' pop-up to Script Menu, so that we can easily run the script whenever we like. Save it.
Now you are done! Whenever you would like to convert podcasts to normal songs, simply select them in iTunes, and then select your script from the scripts menu in the top-right of your screen. Once the script has been run and the songs have been added to your new playlist, feel free to delete the actual podcasts from the Podcasts section in iTunes.
[robg adds: I haven't tested this one.]
Comments (17)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20070801091107346