A little Python app that merges any audio files into a chapterised audiobook, ready for most modern audiobook readers.
- Grab
chapterize.py
- Make sure you've got
ffmpeg
andpython 3.2+
installed - Run
python chapterize.py -h
, which shows simple usage
python chapterize.py aesops-fables.m4b /downloads/fables/*.mp3
This will take all mp3 files in the given directory, and merge them into a single .m4b file.
There will be one chapter per input mp3 file, all labeled sequentially as Chapter 1
through Chapter N
.
Audio will be re-encoded using the standard aac
encoder in ffmpeg
.
python chapterize.py aesops-fables.m4b /downloads/fables/*.mp3 --interactive
As above, but will give you more opportunity to see what's happening, and stop the process if something doesn't work.
--encoder [ffmpeg-encoder]
lets you specify an ffmpeg encoder other thanaac
, for exampleaac-at
maybe work best on macOS systems.--title [title]
overrides the automatically used title metadata, which is pulled from the first audio file--author [author]
overrides the automatically used author metadata, which is pulled from the first audio file--cover-image [image path]
lets you specify an image to be set as a thumbnail/cover--keep-chapter-names
will stop the default behaviour of using sequential chapter numbering, and instead use the title metadata from each audio file
Inspired by this repo. Thanks!