Quick and Dirty FREE Joining of MP3 files on a Mac!

Understatement
By Andrew Davidson
on December 20, 2010

I love DJ Mix CD's but I hate when the 'iTunes shuffle' turns it into a convoluted mess of song snippets

Maybe it's akin to enjoying whole album sides, vs. the single-song download of this day and age, but I prefer the DJ mix as the DJ designed it. It should be a simple thing to rip the CD as one long track, keeping the overall vibe and flow of the set as a whole. It's not.

If you use iTunes to 'rip' your source audio files to MP3 files, it also immediately includes ID3 tags, including rarely-used data such as track length. This makes 'joining' MP3 files a pain, as the ID3 tag information is lumped into the file (usually after the song/music information), and iTunes ignores the actual length of the track, and instead, relies on the internal counter. In order to counteract this, we'll specifically remove all ID3 tags from the MP3 files, making them suitable to join.

It's not as simple as checking boxes in iTunes and hoping the information goes away. The ID3 tags may be empty, but the XML container is still present, adding a few kilobytes of useless data to your MP3 files. Plus, there's no easy way of removing song length from ID3 tags with iTunes.

Mashing the MP3's

In this case, we'll mash together the latest release from Girl Talk, called 'All Day', this album was released as multiple MP3 files (and as a single mix), and I want to join my local copy into a continuous mix.

StripID3

We'll use this free application to remove all ID3 tags (both Versions 1 and 2). http://homepage.mac.com/gweston/macware/StripID3.zip Update 2013: The previous link is long dead, here's my mirror of the same file. Upon downloading and running StripID3, you're presented with a dialog box to select the MP3 files you want to work on. Simple select all the files in the folder (you'll note I made a copy of the MP3's in case I mess up)

Almost as quick as it started, you're done. The files have all been processed. These MP3 files only had ID3v2 tags in them, and StripID3 removed them. Next up, go run the Terminal application, and we'll do a bit of command-line magic to 'join' the MP3 files.

To start, you need to cd to the working directory of MP3 files. I simply type cd then space bar, then drag & drop the folder I'm working with into the Terminal window, then hit return. The drag and drop action passes the directory information into the window, making it so you don't have to type the longhand directory structure.

Now that you're in the working directory, type ls and hit return, you'll see the list of MP3 files you'll be joining. As they're already in alphabetical order, they're ready to be joined. This step isn't required, it's just to get you used to looking inside directories with the command line.

Next, the most complicated of Terminal commands: we'll be using the cat command to join the mp3 files. Type cat *.mp3 >> result.mp3 then hit return.

This simple command basically says to select all the files that end in .mp3 in this directory, and join them into a file named 'result.mp3′. This procedure is also pretty fast, and you'll note the 'new' joined file in the same directory. In my illustrated version above, you'll note in my illustration that I named my file 'AllDay.mp3′, which is the album name. I discovered this hint on one of my favorite sites, Mac OS X Hints.

Simply drag the resulting file into iTunes, and re-add the ID3 tag information. Since the album is already in the database, the auto-finish makes this step pretty quick and painless. You can even copy the art from the original files into the new combined MP3.

Final Caveat

If you don't remove the ID3 tags, the newly joined file will be huge (the combination of all the files) but only have a run length of the first track, and it'll stop after it reaches that point in playback.

TL;DR

  1. Use iTunes to 'rip' the files into MP3 format.
  2. Make a copy of the MP3 files as a backup
  3. Strip the ID3 Tags from the MP3 files, using free StripID3 software
  4. Use the cat command in the terminal to join the MP3 files free of ID3 tags
  5. Re-import the new joined original into iTunes, note the new length!
  6. Re-add meta-data and ID3 tags... This is the slightly annoying part, but still free!