Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'How to convert a podcast into a normal iTunes entry' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to convert a podcast into a normal iTunes entry
Authored by: Yuckandmuck on Dec 06, '06 03:43:41PM
I found a solution for this a while back. I wanted to create separate copies of certain podcasts as regular mp3 files that I could hang onto, yet leave the original podcast files in place and not mess with their auto-delete settings, etc.. I also wanted to be able to do this in one step.

After researching a little, it seemed clear the only difference between a podcast mp3 and a regular mp3 was certain fields in the header. It seemed a waste (at least of time) to use the "Convert selection to..." option, when all I really needed was the mp3's header data fixed. This earlier post turned me on to id3v2 as a means of dealing with the mp3 header information. After installing that and fidding around with the options, I found that the only way to reliably remove the header info that identifies an mp3 as a podcast was to blow away the header entirely using id3v2 -D filename.mp3. I then wrote an AppleScript for iTunes to do the following:

  1. save the header tags and other file settings I wanted to preserve
  2. make a copy (copy.mp3) of the selected podcast mp3 outside of iTunes to work on
  3. blow away the entire mp3 header of the copy using id3v2 -D copy.mp3
  4. add the headerless mp3 back into iTunes
  5. apply the saved header tags & settings to the copy, exept for the genre, which I change from "Podcast" to "xPodcast"
  6. set the new track as bookmarkable
  7. remove the external copy
I've trimmed out my other customizations and the resulting script is below.

Note that I borrowed some ideas from Doug's AppleScripts for iTunes but I can't remember which parts. Thanks for the great site Doug!

	tell application "iTunes"
		-- get a list of track references
		set these_tracks to the selection of browser window 1
		if these_tracks is {} then error "No tracks are selected in the front window."
		set these_files to {}
		-- get the file path of each of the selected tracks
		repeat with i from 1 to the count of these_tracks
			set orig_Track to (item i of these_tracks)
			set origFile to location of orig_Track
			tell contents of orig_Track
				set orig_Name to name
				set orig_Album to album
				set orig_Artist to artist
				set orig_Comment to comment
				set orig_Year to year
				set orig_Startpos to start
				set orig_Stoppos to finish
			end tell
			set pfile to quoted form of POSIX path of origFile
			set output_file to "/tmp/copy.mp3"
			do shell script ("cp -f " & pfile & " " & output_file)
			do shell script ("/opt/local/bin/id3v2 -D " & output_file & " > /dev/null 2>&1")
			set ofile to (POSIX file output_file) as string
			set new_Track to (add ofile)
			tell contents of new_Track
				set name to orig_Name
				set album to orig_Album
				set artist to orig_Artist
				set comment to orig_Comment
				set year to orig_Year
				set genre to "xPodcast"
				set start to orig_Startpos
				set finish to orig_Stoppos
				set bookmarkable to true
			end tell
			do shell script ("rm " & output_file)
		end repeat
	end tell
end try
Compile this in "Script Editor" and save as an application (maybe call it "Convert Podcasts") under [username]/Library/iTunes/Scripts/.

Normally I would just save this as a script (*.scpt), but for reasons I haven't been able to figure out (probably an applescript bug), it only works via iTunes' script menu when saved as an app.

Once in place, you can select the podcasts you want to convert, then run "Convert Podcasts" (or whatever you called it) from iTunes' script menu. The copies should show up in the Music section of your iTunes library.

Anyway, this works for me. Hopefully it will be helpful to others.

[ Reply to This | # ]

How to convert a podcast into a normal iTunes entry
Authored by: Yuckandmuck on Dec 06, '06 09:59:34PM
Using id3v2 via my script above, there's no need for lawn mowing whatsoever. That is, there's no converting being done to the audio at all (hence, no potential loss of quality). Only the header info is changed. Yes, there's a little up-front effort involved in installing the id3v2 tool, but it's not all that difficult.

Darwinports is one way to do this. To use darwinports, you need to have Apple's Xcode installed if you don't already. You can then download darwinports from here. The installation may take a few minutes to complete, but once it's done, you can input a few simple Terminal commands to download, build & install id3v2 as described on this page. Once installed, you can access it via the Terminal command line or through scripts such as the one above.

There may be an easier way to install id3v2 or perhaps there's a pre-compiled version out there somewhere. There may also be other tools that can wipe out the mp3 header info (to unmark as a podcast), which could be used instead of id3v2 in my script above.

[ Reply to This | # ]

How to convert a podcast into a normal iTunes entry
Authored by: DougAdams on Dec 07, '06 06:24:28AM
Excellent. I was never sure if iTunes maintained the "podcastness" of a track in its own database or whether this info was stowed in the file. Results of experiments were ambiguous (copy file of podcast episode to Desktop; delete original track and file; re-add copied file back; it shows up in the Podcast playlist; how'd it do that?).

Anyway, thanks for the trick and the nice words about my site.

Doug's AppleScripts for iTunes

[ Reply to This | # ]

What about the other way?
Authored by: Steve Hoge on Jan 13, '07 04:29:18PM
I've used the excellent AtomicParsley command line tool to manipulate the "podcastness" of AAC (.m4a) files. AtomicParsley operates by editing various tags in MPEG-4 files (sorry, no MP3 support).

After processing the file with AtomicParsley you must (re-)add it to the iTunes library. iTunes will use the track's Album name as the Podcast name, creating a new directory by that name if necessary in the iTunes Music/Podcast folder and placing the file there if you have iTunes Preferences ->Advanced ->General -> "Copy files to iTunes Music Folder when adding to Library" checked.

[ Reply to This | # ]

How to convert a podcast into a normal iTunes entry
Authored by: artypop on Jan 02, '07 10:15:20PM


great script, but I have a strange problem, perhaps anyone can help : it seems (on my computer) to work until it should copy the new file to the library : it does not. So the script correctly add a new entry which is tag xPodcast but the file is nowhere... (if I delete the rm line ("do shell script ("rm " & output_file)") then I can go to /tmp/ and copy the file but it's boring as I need to do one file by one file...

So if anyone can help, I would be really happy !

[ Reply to This | # ]
How to convert a podcast into a normal iTunes entry
Authored by: geerolla on Apr 16, '08 10:06:41PM

This works great at converting them to the library, thanks! However I'm not sure if Leopard has broken some of this script, because the rewriting of the ID3 tags doesn't appear to be happening. The conversion does work, however only a blank MP3 (named 'copy' of course) imports into the library. Anything that can fix this?

[ Reply to This | # ]