Creating an audiobook from a list of mp3 files

I recently got my hands on an audiobook with a collection of mp3 files. I like to listen on an iPhone and creating a playlist wasn't working the way I intended.

So, I wanted to explore making an audiobook from the mp3 files.

I tried concatenating all the audiofiles together into a single file. While the files concantenated fine, I was running into trouble with the metadata and the way iTunes was recognizing it.

The following steps seem to fix the issues I faced ... atleast so far!

cd /Volumes/Seagate\ Slim/Books/Option\ B\ Facing\ Adversity,\ Building\ Resilience,\ and\ Finding\ Joy\ by\ Sheryl\ Sandberg

# Requires files to be named correctly. checking a simple `ls`
ls *.mp3

#Concatenate mp3 files
cat *.mp3 > Option-B-full.mp3

# Fix the metadata (iTunes issue?)
# Credit: https://stackoverflow.com/questions/3255674/convert-audio-files-to-mp3-using-ffmpeg
# Credit: https://superuser.com/questions/996223/using-ffmpeg-to-copy-metadata-from-one-file-to-another
ffmpeg -i Option-B-full.mp3 -i Option-B-full.mp3 -map 1 -c copy -map_metadata:s:a 0:s:a Option-B-final.mp3

# Delete the unncessary file
rm Option-B-full.mp3

# Terminal screencast created using: https://github.com/nbedos/termtosvg
# Code image crated using: https://carbon.now.sh/

After the creation of the audibook file, I simply needed to import into itunes and change the Song Info to Audiobook

If everthing worked as intended, you should be able to open up the audiobook using iBooks or the Audible app on the iPhone!

Few audiobooks ran into issues and I tried to solve with this hack!

ffmpeg -i Antifragile-final.mp3 -af volume=1 -vsync 2 Antifragile-final-new.mp3

# Credit: https://stackoverflow.com/questions/13043334/error-when-trying-to-convert-mp3-with-image-to-mp4-using-ffmpeg
ffmpeg -i Antifragile-final.mp3 -vn Antifragile-final-new.mp3

Credit: http://howto-pages.org/ffmpeg/
ffmpeg -i Antifragile-final-new.mp3 -acodec mp3 -ab 64k Antifragile-final-new-64.mp3

Other possibilities (?)