1489 words on iTunes
Forgetting my destructive tendencies for a second, I thought I should try to get the best of podcasting, now that it is supported by iTunes 4.9. Naturally the best of podcasting hasn’t got to do with the ‘phenomenon’ of podcasting itself but merely is a side-effect of it.
As I noted in my remarks about iTunes 4.9, Apple made quite an effort to enable multi-chapter podcasts. I.e. an audio file can contain a table of contents along with several bits of cover art and links for certain points in time. I assume that, thanks to the wide scope/ generality / design of the mp4/ aac/ quicktime file format, it may have been possible to embed such information into the file for quite a while. But with iTunes 4.9 we finally have a widespread application that can make use of them. (Although I’d like to note that none of the extra text you can embed into the file will be indexed by Spotlight.)
Seeing the technically nice podcast files done by Apple, I immediately wanted to have the same techniques for my own use. Not for podcasts of course but for some of the files in my music library. The files I had in mind were those where I had to rip several tracks of a CD into a single file to avoid those nasty skips that deficiencies of the MP3 and AAC file formats force you to have between tracks. When songs are crossfaded on a CD with no silence being between them, it’s advisable to rip them into a single file – which iTunes will happily do for you if you ask nicely.
However, after doing that you’ll have a rather large file containing several songs and you can’t navigate between those. That has never been nice. But now that there is the ability of iTunes to have chapters within a single AAC file this shortcoming can be resolved by including chapter information for the different tracks contained in the file. And you can even have separate cover art and internet links for each track as well.
At this point in time the key to achieving that goal is Apple’s ‘ChapterTool’, a command line utility. Browse around the Podcast section in iTMS to find a link to it.
I stopped linking to stuff on Apple’s site a while ago. Almost every single link on their pages seems to change every now and again or have content that may be completely different the next time you look. That’s not a basis to spread links and trust on. And thus nothing I want to link to.
After a large download you’ll get a little command line tool that needs to be run from the Terminal. And, appropriately, an AAC file explaining how to use the tool in audio and with pictures. When clicking the cover art area in iTunes to get a large image you’ll note that only the small cover art window will update as the audio progresses but the large one won’t. Instead you can get a window for every single picture there is in the file. Whatever that’d be good for.
Using the tool is straightforward with the example files that come with it. They key is to write an XML file containing the information you want to add to the file. Key elements are the times at which new chapters start. After having set those, you can specify a chapter’s title (only chapters with a title will actually be listed by the new menu-button appearing next to iTunes’ status display) or new cover art and links should appear. That way you are quite flexible to have changing cover art while a track is playing or you can put up and remove links. While this may bloat files, it may be cool to have a slideshow to go along with a song, trying to reflect a potential video or suchlike. Adding a link to some comments of your own could be cool as well.
But for the time being I’ll limit myself to adding information for the different songs contained in a single file. E.g. for the first four tracks of Sigur Rós’ ( ) album, which needed to be ripped into a single file, I made this XML file:
<?xml version="1.0" encoding="utf-8"?> <chapters version="1"> <chapter starttime="00:00"> <title>Untitled 1</title> <!-- <picture>/Users/ssp/Desktop/burn/Bilder%20alt/SigurRos().jpeg</picture> --> <link href="http://earthlingsoft.net/ssp/blog/2003/05/sigur_rs">Sigur Rós on qlc</link> </chapter> <chapter starttime="06:39"> <title>Untitled 2</title> </chapter> <chapter starttime="14:11"> <title>Untitled 3</title> </chapter> <chapter starttime="20:44"> <title>Untitled 4</title> </chapter> </chapters>
The XML isn’t fancy. It specifies four chapters with titles ‘Untitled 1’ through ‘Untitled 4’ (as those songs are supposedly untitled). The first chapter also includes a link to a post on Sigur Rós which I wrote a while ago. And it includes a reference to cover art for that chapter. But I commented that out later on for reasons I’ll get into later.
What I found strange about the XML was that (at this stage) the command line tool can’t handle spaces in the paths for cover art and those need to be percent escaped – the documentation doesn’t mention what happens to other characters that’d see special encoding in URLs, though. Another seemingly limiting fact is that the start of a chapter has to be given in ‘mm:ss’ format. Meaning that you’ll be limited to first 100, or possibly 60, minutes in the file in where chapters can start. While that’s not a problem for me, I could imagine that it limits the usefulness of chapters for things like audio books.
Saving that XML file on my desktop as ‘Sigur Rós ( ) 1-4.xml’, I ran the command
/Users/ssp/Desktop/Incoming/ChapterTool/ChapterTool -x "/Users/ssp/Desktop/Sigur Rós ( ) 1-4.xml" -a "/Users/ssp/Music/Sigur Rós/( )/01 Untitled 1-4.m4a" -o /Users/ssp/Desktop/test.m4a in the Terminal. It took a while to run, presumably because the file in question – which needs to be an AAC file – is quite large and finally gave me a new sound file on my desktop.
Dragging that file to iTunes gave the desired menu next to iTunes’ status display that let me jump between tracks. To do these jumps, you don’t need to use that menu, though, but you can also shift-click the previous/next buttons or use the new menu commands for this feature. On a modern iPod with the latest software update using the next and previous buttons will make the iPod skip to the next and previous chapters in the track rather than going to the next and previous tracks. (A feature that Apple seem to be inable to support on my third generation iPod by the way. Thanks to G for confirming what happens on a more modern iPod.)
As I mentioned above, I chose not to include cover art for each of the tracks within the file as they all have the same cover art anyway. Instead I added the cover art using the usual iTunes method which has the advantage that iTunes can display the cover art when the track isn’t playing as well. Unfortunately, adding per-chapter cover art and per-file cover art seem to be completely different processes. You can’t see the per-chapter cover arts in the info window’s cover art section. Making all this more unified would be good. I also had the impression that parts of my song metadata vanished in the process of adding the chapter information.
The bottom line of this little experiment is that you can do rather nice things with ChapterTool. But actually doing them is still too much effort due to its command line and XML nature. Integrating this into iTunes, so I can drop URLs and images on my files might be nice. But it might be overdoing it as well. A feature that wouldn’t be overdoing anything would be the automatic inclusion of chapter information when importing several tracks into a single file from a CD.
As a final note, be amused by QuickTime sort-of being able to handle the enhanced AAC files. The file I created with a link and chapters only opens nicely in QuickTime Player, with an extra control to jump between chapters and the link showing. The files with images as provided by Apple just cause QuickTime Player to display an error message, though. Similarly, the Finder will display the file I created with its link, but the link isn’t clickable and it won’t display any preview for Apple’s files. In addition, the Spotlight information for the file I made tells me that it conatins AAC and Text tracks while no QuickTime Spotlight information seems to be available at all for the more sophisticated files created by Apple. VLC can also play the file I made with ChapterTool, claiming it has two subtitle channels but it’s driven crazy by Apple’s files. Could there be a problem with those?
I’m curious to see what this will be used for. Slideshows? Presentations? Documentaries? And what about Karaoke? Nothing will be sick enough to avoid being considered and tried out.
Wow that was a very informative article about podcast chapters. I had no idea that you could view the resulting files in quicktime with those results. Very imaginative.
I’ve created a wiki about this tool and how to use it here: http://www.voxmedia.org/wiki/PodcastChapterTool — I hope you can contribute to it and I hope you find it useful :)
I wanted to add that if you name the file M4B that the chapters WILL be enabled on ALL IPODS! Ok not sure about shuffle. But try it!
I added a section to the Podcast ChapterTool wiki about playing chapter enabled podcasts in quicktime, complete with credit to you and a link back to your blog.
Interesting resource Walter.
Strangely I can’t view the podcasts with images in QuickTime. I just get an error message. Can you give me more details on that? Are you using QT Pro? I’m using the standard version, which is the only possible difference I could imagine.
Oh man you can’t see the images? I know your using the standard version of quicktime but may I enquire as to the version number of quicktime you are using? I’m using version 6.5.2 and I’ve tried it succesfully with both pro and non pro versions on seperate computers.
Though I haven’t tried the non-pro version on a mac yet so maybe on macs the non-pro version does not play back images. Hmm. Do you have access to a pc to try this?
Sorry for being so imprecise, Walter.
Personally I am using QuickTime 7.0.1 (Standard) on MacOS X.4.1.
I am seeing the playing problems there. Files with images just won’t be opened. I don’t have access to a Windows computer.
Hmm. I haven’t tried QuickTime 7, maybe thats the problem. I’ll try it and report back.
I also created a tool to help create the XML file for this if your interested: http://celerityfm.com/podcastchaptermaker/
I guess since you are using Tiger you can’t go back, but if you could I’d try using a previous version of Quicktime and see how that goes because I’ve had reports that this works in QT 7.0..
Also here is yet another tool to help make chapters in podcasts, though this time not created by myself: http://www.celerityfm.com/podcastenhancer/
I have confirmation now that this is a QuickTime 7 problem. I suppose I could just download the QuickTime 6 downgrade, but I’m not caring enough about podcasts to do that… rather wait for QuickTime 7.0.2…
In case you are interested, I wrote a little applescript this weekend to create the XML chapter files from a iTunes track listing.
You can add the script to ~/Library/iTunes/Scripts, and have access to it from iTunes.
So it was a QT 7 problem after all. Darn. Ahh well :)
You all have inspired me! I have written a tutorial about how I am using this information to make gapless cd’s and aac files with iTunes. Of course I credit you all.
Thanks! Here’s the link: http://gapless.itunes.wanderingfocus(DOT)com/
Received data seems to be invalid. The wanted file does probably not exist or the guys at last.fm changed something.