by Derek—2005.12.21 @ 0954
In preparing our podcasts, I read about ChapterTool, the command-line program from Apple that allows you to add images, chapter markers, and even URLs to audio files. These “enhanced” files provide a whole bunch of options not available in a plain MP3 or AIFF sound file and make the process of referring to online content easier than spelling out “double-you, double-you, double-you, dot, derek-and-melissa, dot-com, slash, adventures.”
ChapterTool comes with enough documentation to get you started, but it is a very “hands-on” program requiring command-line interaction with the Terminal application. You also hand-code your own chapter list and feed all of that into an AAC audio file through ChapterTool. Not for the faint of heart. There are some other GUI applications for adding chapters, images, and URLs to your audio files, but I haven’t tested any of them as of this writing.

When complete, an enhanced audio file will show images and URLs in the “Now Playing” pane in iTunes. If you’ve added chapters with titles, they’ll appear in the iTunes chapter drop-down menu near the top.


Enhanced audio files also play in Quicktime, although not as eloquently. In Quicktime, images are scaled to fit the playback indicator and the URLs are generic. But, it works!


ChapterTool is very straight forward, and the only problem I had was an error in my XML file when I pointed to an image that didn’t exist. Unfortunately, ChapterTool just died and didn’t tell me what was wrong.
I created a /bin/ directory in my home folder for all of my CLI tools. This was a natural place for me to put ChapterTool as I could easily access it from anywhere in Terminal. I had to modify my .tcshrc file to look for executable files in my home directory:
set path=( ~ ~/bin /sw/{bin,sbin} /bin /sbin
/usr/{games,sbin,bin,local{,/bin,/mysql/bin},
X11R6/{bin,sbin}} )
The XML file is the real workhorse, but it has to set up perfectly. It’s really a simple XML schema with multiple <chapter> blocks inside one master <chapters> block. The only terms are:
<title>...</title><link href="...">...</link><picture>path/to/image.jpg|gif|tiff|png</picture>Here’s an example XML file:
<?xml version="1.0" encoding="utf-8"?>
<!-- DerekandMelissa.com Podcast Episode #1 "Sounds From Home" -->
<chapters version="1">
<chapter starttime="02:32">
<title>Introduction</title>
<picture>images/intro.jpg</picture>
<link href="http://www.derekandmelissa.com/">DerekandMelissa.com</link>
</chapter>
<chapter starttime="00:00">
...
</chapter>
</chapters>
Using Titles If you want the chapters to appear in the dropdown menu (in both iTunes and Quicktime) you need to explicitly add the <title> tag to your <chapter> block. Without it, however, images and URLs are still visable, which is also a handy feature.
For podcasts, I put everything for the episode into a new folder, including the .mp4, images, and XML file:
/Episode 2
episode-2.xml
episode-2.m4a
/images
splash.png
intro.jpg
credits.jpg
When everthing is in place, just launch Terminal, navigate to your podcast folder, and run ChapterTool:
% ChapterTool -x xmlfile.xml -a audio.m4a -o output.m4a
If everything went well, you should see the output.m4a file in your folder. I usually name my files with the date of the publication and a short descriptor:
20051225-merry-christmas.m4a
Thanks for signing in, . Now you can comment. (sign out)
(If you haven’t left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)