i don't
quite know

.com

Macs, Movies, Games, Books, etc. The Rants of a Mad Man.

The Secret of iTunes’ Downloaded Artwork

July 26th, 2007 by Raj

No Album Artwork
Recently I had the unfortunate experience of my Mac dying on me, luckily the important stuff was backed up on an external drive and I was able to restore the Mac by wiping her clean and doing a fresh install of OS X. Everything went rather swimmingly as far as disaster recovery goes that was until I went to play my recently reimported music collection via Front Row and I noticed that all my beautiful cover art had disappeared! The music was there, none of that was lost, it was playing fine, all the Artist, Album and other tags were correct, but where had all my beautiful cover art gone? This would just not do and although I could easily download the artwork through iTunes’ “Get Album Artwork” feature I had the compelling requirement like any good nerd to find out what was really going on!

The Problem
Apple have been providing us with beautiful high resolution artwork from the day they started selling music in the iTunes Music Store but it wasn’t until the introduction of iTunes 7 and it’s new “Cover Flow” browsing feature that it allowed us to retrieve cover art for music we had imported from our own CD’s. For myself and every other anal retentive iTunes user that fastidiously manicures their iTunes library to perfection this made life a lot easier than scraping images from Amazon or Google and then manually applying them to relevant tracks in iTunes or using applications like Clutter and CoverScout. This was a fantastic feature and a very kind one on Apple’s behalf, even if only to make the new Cover Flow feature look nice to use, I could quite quickly and simply update my library with the correct artwork. One thing that Apple didn’t tell us however is that the lovely artwork its displaying isn’t actually embedded in the track’s file like it does when you manually add artwork, rather its stored in some strange little files buried away in your “iTunes” folder with a strange .ITC extension. This explained my loss of artwork when my main drive, storing the magic iTunes Library file and these strange ITC files, died it deleted my artwork. When I re-imported the raw AAC files those for which I had downloaded their artwork through iTunes no longer had it’s relevant ITC file for artwork.

So what’s an ITC file?
As far as I understand it no one is exactly sure of the ITC files in their entirety. It’s common thought that ITC may stand for “iTunes Cover Flow” or “iTunes Cover File” but even that’s not concrete. The files reside in a folder called “Album Artwork” which is then split into “Local” and “Downloaded”. Obviously it’s the Downloaded ones we’re interested in but its interesting to note that inside the Local folder you’ll find a cached copy of ITC files that are created from cover art that you have embedded in your music files. The thought behind this folder is that it’s used for Cover Flow to quickly access artwork rather than extracting it from your music as you browse through your albums.
Essentially an ITC file contains your cover art as JPG but there’s some other information in there that links the file to the relevant track/album in your library. If you were to open the file in a text editor you’d be greeted with a bunch of text that makes no sense at all, open it up in a hex editor however and you get some real information that although quite interesting doesn’t make life any more simple in extracting the artwork. There’s a great article over at Fasle Cognate that explains the file structure and naming conventions in-depth if you’d like to know more.

The Solution
Ideally what I would like is for all of that beautiful artwork to be extracted from the ITC files and then re-embedded into the AAC file itself, as you’d normally expect your artwork to be stored. Fortunately there are some clever people out there that have written a couple of AppleScripts to do just that, or there abouts.

The first script (link) allows you to drag the ITC file on to it and then rip out the JPG file to then recreate it on your desktop as “cover.jpg”. This is fantastic, we now have the actual artwork however the downfall is you then have to open up the file to see what album the artwork actually belongs to and then drag it on to the relevant items in iTunes. If your entire iTunes library uses nothing but downloaded artwork you can see that this would soon become a tiresome task.

The second (link) is the bees knees, this is script you’ll want that just does the work for you and makes everything happy again. It comes from our wonderful friends over at Doug’s AppleScripts, an excellent AppleScript resource for any Mac application. This wonderful little script will actually go through your iTunes library looking for tracks that are using downloaded artwork in an ITC file, extract that artwork and finally embed the image in its correct home being the music file itself.

Conclusion
To many people this may all be a little too much, “Why bother having your artwork embedded in the music file when iTunes can just download it again?” you might say. Well for me I like to know how things work, its interesting to delve into these little secrets but more importantly what if I want to play this music using another piece of software on another computer, Windows, Linux and I can’t use iTunes? There’d be no lovely artwork with the file would there and frankly that’d just be sad.

Filed under Mac, Tech having 3 Comments »