Hi all!
A lot of my audiobooks come from thrift store as CDs which rip into dozens of MP3 files each. I find these a lot easier to manage as one M4B or Opus file with chapters and cover art. I couldn't find a Linux tool that did it the way I wanted, so I built one.
It's called mp3tom4b. It's free and open source:
https://github.com/MelSpec975/mp3tom4b
**What it does**
* Joins a folder of MP3s into one audiobook file
* Makes a chapter for each MP3, named from the track titles
* Pulls the cover art, title, author and year from the files
* Saves as M4B for Apple Books, or as MP3 with chapters, Opus or MKA
* Comes as a desktop app and a command line tool
It only works with plain MP3 files. It doesn't touch DRM.
**Install**
You need ffmpeg and Python. The desktop app also needs PySide6.
Arch:
sudo pacman -S ffmpeg python pyside6
Debian or Ubuntu:
sudo apt install ffmpeg python3 python3-pyside6.qtwidgets
Then:
git clone https://github.com/MelSpec975/mp3tom4b.git
cd mp3tom4b
sudo ./install.sh
**Using the app**
- Open MP3 to M4B from your app menu.
- Drag in a folder of MP3s.
- Check the order and the details. Drag rows to reorder them. Double click a chapter to rename it.
- Pick a format and press Convert.
**Using the command line**
For most books this is all you needis: mp3tom4b ~/Audiobooks/Dune/
A few other CLI options:
mp3tom4b ~/Audiobooks/Dune/ -n "Scott Brick" # add the narrator
mp3tom4b ~/Audiobooks/Dune/ -F opus # smallest files
mp3tom4b ~/Audiobooks/Dune/ --dry-run # preview the chapters first
**Which format?**
* M4B if you listen on an iPhone, iPad or Mac.
* MP3 with chapters if you want it to play anywhere. It skips re-encoding, so it's done in seconds.
* Opus if you want the smallest files.
* MKA if you want an archive copy of the original audio.
This is my first Python project, and I built it with a lot of help from Claude. Feedback and bug reports are welcome!