iTunesJoin 2.0
Scripts for Joining iTunes Audio files
by 3AM Coffee Software
March 6, 2006
Introduction
iTunesJoin is an application and set of scripts that allows you to join multiple iTunes tracks into a single new track. Once installed, they are available directly in iTunes via the script menu. This is great for audiobook users and those who wish to join music tracks for gapless playback (sometimes there is still a short gap).
With the optional ChapterTool software from Apple, they can also automatically generate chapters when you create AAC files. (Chapters will allow you to navigate to the starts times of your original tracks in iTunes and on color iPods.) See the file “Making Chapters” for information on how to get iTunesJoin to automatically add chapters to your AAC files.
There are three scripts available by default. You can also save frequently used options into custom scripts. You may select both the scripts and scripts you save directly from the iTunes script menu. The three default scripts are:
AutoJoin: This joins your tracks in as automatic a way as possible. If all the files are AAC with the same bitrate, it generally joins them into a new AAC track without quality loss. If that is not possible, then the joined tracks are converted using iTunes current settings. If ChapterTool is installed and in a place where iTunesJoin can find it, then chapters will be added. The track will be set so that iTunes and iPod will remember the playback position.
Join with Preferences: This joins your tracks using the preferences last set in iTunesJoin.
iTunesJoin: iTunesJoin runs the main iTunesJoin application, allowing you to select exactly which options you want. You can also save those options into a script that will then be directly accessibly from the iTunes script menu. The iTunes preferences windows looks like this:

The top set of radio buttons selects the join mode. Here is a summary of the various modes and their advantages and disadvantages:
Join losslessly if possible, otherwise Convert: Tries “Join AAC audio losslessly” first and, if that does not work, performs a “Join & Convert.” If “Notify if Convert was needed” is checked then iTunesJoin will warn you if conversion was necessary. Otherwise, it simply perform the conversion without telling you.
Join AAC audio losslessly: Uses QuickTime to join AAC audio tracks into a new AAC audio file without conversion (and hence, without any loss of quality). Once you have checked to make sure that your new joined track functions properly, you may delete your old tracks (but we recommend keeping them just in case).
Time: Moderately long
Size: Same as combined size of original files
Quality: Same as original files; no quality loss
iPod: Plays on iPod
Chapters: Can be added
Duration: Maximum 13½ hours for CD quality audio; longer for voice quality
iTMS: Cannot join protected content from iTunes Music Store.
Limitations: Cannot join files with different bitrates.
Join & Convert: First joins the tracks to a temporary movie and then use iTunes to convert that movie using the current “Importing” settings. Once you have checked to make sure that your new joined track functions properly, you may delete your old tracks (but we recommend keeping them just in case).
Time: Very long
Size: Depends on iTunes “Importing” settings. AAC & MP3 produce small files, Apple Lossless produces large files, WAV and AIFF produce gigantic files.
Quality: Loss of quality if conversion is to AAC or MP3. Conversion to WAV, AIFF, or Apple Lossless entails no quality loss, but may produce larger files if the originals were AAC or MP3.
iPod: Plays on iPod
Chapters: Can be added if iTunes is set to convert to AAC
Duration: Maximum 6¾ hours for CD quality audio; longer for voice quality. If your total duration is more than 6¾ hours but less than 13½, try converting each track to AAC using iTunes and then using “Join AAC audio losslessly”
iTMS: Cannot join protected content from iTunes Music Store.
Join to QuickTime: This joins the tracks (audio or video) into a QuickTime movie with no loss of quality. Once you have checked to make sure that your new joined movie functions properly, it is safe to delete your old tracks (but we recommend keeping them just in case). Under iTunes 6 a joined audio track will appear as a “video” although it will only play audio.
Time: Moderately long
Size: Same as combined size of original files
Quality: Same as original files; no quality loss
Chapters: Added to QuickTime movie, but iTunes does not recognize them; QuickTime Player sees them
iPod: Does not play on iPod. Use “Join AAC audio losslessly” or “Join & Convert” or choose “Convert” from the “Advanced” menu to convert the movie manually. (Note; these files might play on Video iPods; we do not have one to test; if you can test this and tell us, we would be most grateful.)
Duration: Maximum 13½ hours for CD quality audio; longer for voice quality
iTMS: Can join protected content from iTunes Music Store.
Join to QuickTime with Make small pointer files selected: This joins the tracks with no loss of quality into a QuickTime movie that refers to the original tracks. If you use this option, DO NOT DELETE YOUR ORIGINAL TRACKS; the joined movie will cease to function. It is safer (but takes longer and requires more disk space) to use “Join to QuickTime.” Under iTunes 6 the joined track will appear as a “video” although it will only play audio.
Time: Very fast
Size: Very small
Quality: Same as original files; no quality loss
iPod: Does not play on iPod. Use “Join AAC audio losslessly” or “Join & Convert” or choose “Convert” from the “Advanced” menu to convert the movie manually.
Chapters: Added to QuickTime movie, but iTunes does not recognize them; QuickTime Player sees them
Duration: Maximum 13½ hours for CD quality audio; longer for voice quality
iTMS: Can join protected content from iTunes Music Store.
Limitation: Do not delete original tracks! Unselect “Make small pointer files” if you wish to discard them once joining is complete.
Add Chapters to AAC files
If you have installed Apple’s ChapterTool software then iTunesJoin can use it to add chapters to your AAC audio files. There will be one chapter for each joined file. Under iTunes 4.9 or later and with color capable iPods, this will make navigating to a specific time in your joined track much easier. We cannot distribute ChapterTool ourselves; you must download ChapterTool from Apple. If you follow the installation directions that come with ChapterTool or install the command-line application in one of the following locations: /usr/local/bin, ~/bin, then iTunesJoin will automatically find it. Otherwise you can click the “Locate ChapterTool” button to tell iTunesJoin where ChapterTool is.
Limitations: ChapterTool only works with AAC files. ChapterTool only works with files under 500MiB in size (a little more than 9 hours at 128 kbps). We have had reports that ChapterTool does not run on Intel Macintoshes. (We would appreciate confirmation.)
Remember playback position
If this box is checked, then iTunes (5.0 and later) and iPod (Click-wheel or newer) will remember where you stopped or paused the joined track and will begin playing from that point when you play the track again. If you have an older version of iTunes or iPod, then “Remember playback position on old iPods & iTunes” will cause the track’s playback position to be remembered. This only works with AAC tracks and has two side effects: iTunes will list the track as “Protected AAC Audio” (don’t worry; no protection has been added, and it will function like an unprotected track) and iPod will list the track under “Audiobooks” in the menu.
Join Tracks
Join tracks will join the currently selected iTunes tracks with the settings you have chosen. You should not use iTunes until the dialog box tells you it is safe. After that, you can use iTunes normally while the tracks are joining, but do not quit iTunes or delete the tracks you are joining. You can even initiate another join while the first is in progress.
Save As Script…
If you use a particular set of options frequently, click this button to save them as an AppleScript. If you choose to save “for the current user” or “for all users”, the script will be available from the iTunes Scripts menu. When you run a custom script (by selecting it from the iTunes script menu) it will cause iTunesJoin to launch and immediately begin joining the selected tracks with the options you chose when you saved the script. The script will automatically prevent you from using iTunes until it is safe to do so. Do not quit iTunes or delete the tracks you are joining until the script has finished running, though. Once control has returned to you, you can even start another join while the first is in progress.
Additional Information
When iTunesJoin is launched via any script but “iTunesJoin” it will not show the “Preferences” window. You can get the window to show by choosing “Preferences” from the “iTunesJoin” menu.
Sometimes it takes a while for the Cancel button to work.
iTunesJoin uses several helper applications to make it more responsive. Do not be alarmed to see “AppleScriptRunner” and “iTunesJoinMovieServer” running while iTunesJoin is working. They should disappear automatically once the join is complete.
You can perform multiple joins simultaneously. Once it is safe to use iTunes again, select your new tracks and run the appropriate script from the iTunes Script menu or click “Join Tracks” again. iTunes can only process one conversion at a time however. iTunesJoin will automatically wait for one join to finish converting before starting another and will also wait for any conversions or imports that have been started directly from iTunes.
iTunes Music Store Notes
In short, there is no way to join Music Store content without quality loss in such a way that it will play on iPod.
Only the first three options (Join AAC audio losslessly and Join & Convert) will make tracks that play on iPod. Only the last option (Join to QuickTime) will work with music purchased from the iTunes Music Store. This means there is no (easy) way to join music from the iTMS and have the result playable on iPod. It is possible to decrypt iTMS files, although the legality of this is unclear. Even decrypted iTMS files do not work with “Join AAC audio losslessly,” but the other options will work with these files.
iTunes 5 Notes
iTunes 5 was very buggy. iTunesJoin automatically compensates for the three known iTunes 5 bugs that affect it (if you are using QuickTime 7.0.4 or later). Nevertheless we strongly recommend that users of iTunesJoin use iTunes 4.9 or iTunes 6 or better and re-import any music that was imported using iTunes 5. See the Bugs section for more details.
Installation
Double click the install script. If you choose to make the scripts available to all users of your machine, they will be placed into “/Library/iTunes/Scripts” whereas if you choose to make them available to only yourself, they will be placed into “~/Library/iTunes/Scripts.” You can also put the files there yourself; you may have to create some of the folders if they don’t exist.
Once you have installed the scripts, you may need to quit and restart iTunes. Once it is restarted, you should see a script menu (it will have an icon shaped like a scroll). Select some tracks in iTunes and then choose one of the iTunesJoin scripts from the script menu.
If you want to create AAC files with chapters, you will need to install Apple’s ChapterTool utility. Unfortunately, we are not allowed to bundle this utility with iTunesJoin. Please see the file “Making Chapters” for full details.
There are many interesting scripts for iTunes at “Doug’s Applescripts for iTunes” site http://www.dougscripts.com that complement our scripts.
Uninstall
Simply drag all the iTunesJoin related files from “/Library/iTunes/Scripts” or “~/Library/iTunes/Scripts.” You can also trash any scripts you don’t need at any time. Do not delete the iTunesJoin application (which appears as the iTunesJoin script in iTunes) unless you no longer wish to use iTunesJoin.
Compatibility
iTunesJoin should work with the following software versions, although it has not been tested on all of them. Please notify us if it fails to work with one of these versions. It should also work with later versions.
Mac OS 10.3.9, 10.4–10.4.4
iTunes 4.8–6.0.3 (4.9 or higher needed to view chapters; 5.0.x not recommended)
QuickTime 7.0–7.0.4
Cost
iTunesJoin is shareware. You may purchase a license at https://order.kagi.com/?QF8. It costs US$10 for a single computer license. Home users may also install it on other computers that you or your immediate family members own. Commercial use requires a license for each computer; site-license pricing is available.
iTunesJoin has a trial period of 30 days, with a 10-day extension. Once it has expired, you will need to purchase a license and enter the registration code that is sent to you to make it function again; you are also required to purchase a license if you continue to use any joined tracks beyond the expiration date.
Bugs
• “Join AAC audio losslessly” cannot join AAC files with different bit rates. We think this is a bug in QuickTime, although Apple considers it to be a safety measure. We may be able work around this limitation in the future.
• iTunes 5 has several bugs relating to AAC audio files. iTunesJoin can work around these bugs. Nevertheless, we recommended using iTunes 4 or iTunes 6. We also recommend that you re-import / re-convert any AAC tracks that were imported or converted with iTunes 5. Specifically, AAC tracks joined losslessly with iTunesJoin 1.0.3 or earlier and tracks joined under other versions of iTunes will not work correctly on iTunes 5: only the first joined track will be playable. If you need to use such tracks under iTunes 5 you can re-join the original tracks or you can download the “Fix iTunesJoin Tracks” script from our web page. Also, you cannot make a (non-pointer) QuickTime file from AAC files that were created with iTunes 5 unless you are using QuickTime 7.0.4 or later.
• iTunesJoin can create damaged files if you join too many files together. For CD quality sound files, the “Join & Convert” option is limited to about 6 hours 45 minutes of music, while the others are limited to about 13½ hours of music.
The 13½ hour limit comes about because QuickTime does not (easily) allow more than 2 billion samples in a single file. CDs are ripped at 44,100 samples per second (44.1 kHz), so this works out to about 13½ hours. If your tracks have a different sample rate, take 596 and divide by the sample rate that iTunes reports (in kHz) to get the maximum number of hours that iTunesJoin can handle (e.g. 596/44.1 is about 13.5).
The “Join & Convert” limitation is due to the fact that iTunes converts files by first extracting them as AIFF audio files, which can be a maximum of 4GB in size. Each sample is 2 channels (for stereo), and each channel requires 2 bytes, so this works out to 6¾ hours. For other sample rates or number of channels, the limit (in hours) of “Join & Convert” is 596 divided by the sample rate in kHz divided by the number of channels (2 for stereo, 1 for mono).
If your total duration is more than “Join & Convert” can handle but still within the limitations of the other programs, you can try converting to AAC first and then using “Join AAC.”
We are investigating possible workarounds to these problems. We can probably overcome the “Join & Convert” limit (at least for AAC), but this is not high on our priority list since it will still be subject to the same 13½ hour limit as the other programs, and that limit looks like a fundamental problem with QuickTime itself. Even if we can work around the QuickTime limitation, we do not know whether iTunes and iPod will be able to handle the long files.
Future Features
These are some features we are considering for a future release. If you would like to see one of them implemented, or have another suggestion, please email us, since we try to focus our efforts on what users actually want.
• Bring “Join & Convert” up to same 13½ hour limit as the other programs.
• Overcome the 13½ hour limit (may not be possible).
• Allow fades between tracks.
• Allow gap removal when joining.
• “iTunesSplit” to split long files into smaller ones
• “iTunesRateChange” to change the playback rate (and/or pitch) of files
• Copy artwork into new tracks; add artwork to chapters when ChapterTool is used.
• Allow joining of AAC files with different bit rates (may not be possible).
• Allow editing of chapters before ChapterTool is called
• Make a better progress indicator.
• Add Growl notification support
• Make standard Mac OS X Help Book
• Allow (lossless) joining of videos
• Get an icon.
Contact
If you have suggestions, feel free to email. If you encounter any bugs, please send a full bug report. Please include your Console log, any crash logs for iTunesJoin found in ~/Library/Logs/CrashReporter, as well as a description of exactly what you did, the exact wording of any messages you saw (a screenshot may be helpful here), and as much information as you can about the tracks you joined. It would also be helpful if you could send a copy of your system profile. See http://www.3am.pair.com/iTunesJoinDebugging.html for more information.
Version History
2.0 iTunesJoin no longer asks for the location of ChapterTool when "Add Chapters" is mistakenly left checked for QuickTime movies.
2.0β1 Complete rewrite of iTunesJoin in Cocoa. There are very few new features, but this should provide a stable platform for future enhancement (in particular, iTunesJoin should no longer crash due to a bug in AppleScript). The new features / notable changes are:
iTunesJoin is now a separate application with its own Dock icon. All scripts work by instructing the application to perform a join with certain options. Instead of a separate script for each combination of options, you choose the options from a dialog box; you can save useful combinations of options as a script that will make them easily available from the iTunes script menu.
Added a progress bar (although not a very good one).
Can perform multiple joins simultaneously.
Now supports the “remember playback position” option that was introduced in iTunes 5.
Work-around for damage in low bitrate AAC files imported by iTunes 5.
1.1 Released as a series of betas. Please contact us for full release history.
Added “Join AAC to Bookmarkable” and “Join & Convert to Bookmarkable AAC”
Added support for adding chapters if user has installed Apple’s ChapterTool
Noted problems joining AAC files with different bit rates.
Work-around for bug in iTunes 5.0 that made joined AAC files not play correctly. Work-around is only used when iTunes 5 is in use when the script is run.
Added “Fix iTunesJoin Tracks” to make joined AAC tracks compatible with iTunes 5. Needed if tracks created by 1.0.3 of earlier or with 1.1 or later under a version other than iTunes 5.
Fixed bug where changes to iTunes Music folder were sometimes not correctly tracked.
1.0.3 Fixed error that occurred when iTunes Music folder name had non-Roman characters (such as “ƒ”).
1.0.2 Additional limitation of Join & Convert noted and warnings added.
Improved Read Me.
Fixed bug where Join & Convert left behind temp files in iTunes Music folder.
Fixed erroneous Finder info for iTunesJoin programs.
1.0.1 Corrected problem when iTunesJoin was unable to locate iTunes music folder.
Corrected bug finding iTunes music folder when not on the the boot volume or when the boot volume was a network share.
Improved handling of joins of long files to make timeouts less likely.
Added a warning when joined file is so long that it is likely to be corrupted.
1.0 First release