Joining MP3 Files
I listen to a lot of audio books and since I recently got an android phone, I want to put my books on that. The problem though, is many of the audio books I have are formatted for CDs. This means I have a bunch of tiny mp3 files organized into folders labeled by disc.
I don’t like it, it’s cumbersome and sloppy. I’d rather just have one mp3.
I started looking around for a piece of software that could mash all the mp3s into a single file. I didn’t need to edit them or anything, and all the files were the same bitrate and frequency and all that, I just needed them to lego up with each other and make a nice single file… aaaaahhh symmetry.
I saw a bunch of people advocating using software like Audacity or some other audio editing package. In a previous life I was an audio engineer, so I knew all those options, but they all seemed excessive. I also didn’t want to get the audio degredation that would come from decoding and re-encoding… some of these recordings started on tape many moons ago, one more encoding might reduce them to Cannibal Corpse lyrics.
I’m on Mac OSX, so my thoughts turned to the bastard son of Jobs, the Terminal. Turns out, like most simple things, Unix has our back. It’s the “CAT” command, which I can only assume, stands for concatenate, since that’s what it does.
I opened up a new terminal window, navigated to the folder that housed all my mp3s and typed:
cat *.mp3 > onefile.mp3
… and the magic did happen. A couple seconds later, I had a single mp3 where there had been many. Actually, it doesn’t delete the old mp3s, it just creates a new one. Also, when I did this, all my mp3s were already named by number (1.mp3, 2.mp3, etc) so the wildcard (*.mp3) still joined them up in sequence. You may need to rename the mp3s if they’re not in a sequential order, or else you might get a single file with a bunch of chapters in the wrong order.
You can also merge files individually. This is done like this:
cat 1.mp3 2.mp3 3.mp3 > onefile.mp3
Hope this helps someone out, I know it saved me time and SD card clutter.

No comments yet.