A web-based tool for converting audio files into M4B audiobook format, perfect for iOS Books and other audiobook players.
Audiobook Binder transforms your audio files into properly formatted M4B audiobooks with:
- Audio Conversion: Convert MP3, AAC, M4A, and M4B files to M4B format optimized for audiobooks
- Metadata Embedding: Add title, author, narrator, and cover image to your audiobook
- Chapter Support:
- File-based chapters (each file becomes a chapter)
- Auto-detection of chapters from silence patterns in audio
- Multiple File Support: Merge multiple audio files into a single audiobook
- Drag & Drop Interface: Reorder files with an intuitive drag-and-drop UI
- Real-time Progress: Track conversion progress with live updates
- Python 3.x
- FFmpeg - Required for audio processing and conversion
- Flask - Web framework (installed via pip)
macOS (using Homebrew):
brew install ffmpegUbuntu/Debian:
sudo apt update && sudo apt install ffmpegWindows: Download from ffmpeg.org and add to your PATH.
-
Clone the repository:
git clone <repository-url> cd audiobook-binder
-
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install flask
-
Start the Flask server:
python app.py
-
Open your browser and navigate to:
http://127.0.0.1:5000 -
Using the application:
- Add a cover image for your audiobook
- Enter book metadata (title, author, narrator)
- Upload one or more audio files
- Optionally enable auto chapter detection to detect chapters from silence
- Click "Convert to .m4b" and download your audiobook
audiobook-builder/
├── app.py # Flask application with conversion logic
├── static/
│ ├── css/
│ │ └── styles.css # Application styles
│ └── js/
│ └── app.js # Alpine.js application logic
├── templates/
│ └── index.html # Web interface template
├── uploads/ # Temporary upload storage
├── outputs/ # Generated M4B files
└── README.md
The frontend uses Alpine.js for reactive state management:
- Declarative bindings:
x-model,x-show,x-forfor automatic UI updates - Event handling:
@click,@change,@dragoverfor user interactions - Reactive state: Automatic UI updates when data changes
- SortableJS: Drag-and-drop file reordering (integrated with Alpine.js)
No build step required - Alpine.js is loaded via CDN.
MIT License
