How to merge tracks from audiobooks so they are one file instead of 100 separate tracks

audiobookitunesmerge

Some of my audiobooks download as 1 7-hour long track. Others are in iTunes as 50-100 separate tracks (that sometime get out of order). I would like to merge the tracks so each audiobook appears as one long file/track. How do I do this?

Best Answer

I do this in the terminal with ffmpeg.

  1. Install ffmpeg. Download it from https://evermeet.cx/ffmpeg/, extract the 7z archive, and copy ffmpeg to /usr/local/bin. Alternately, if you use Homebrew or MacPorts, you can brew install ffmpeg or sudo port install ffmpeg, respectively.
  2. cd into a directory containing all the audiobook segments you want to join together. Make sure the file path does not contain any spaces.
  3. Run: ffmpeg -safe 0 -f concat -i <(for f in $PWD/*.EXT; do echo "file '$f'"; done) -codec copy full.EXT, replacing both instances of "EXT" with the file extension used by your audiobook (mp3, m4a, etc).

This will, of course, not work with DRM'd audiobooks. The same will be true for any tool that does not strip the DRM.