Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M4B Splitter CLI

A robust Python CLI tool to split .m4b audiobooks into individual files by chapter.

Features

  • Formats: Support for mp3 (default), aac, flac.
  • Meta-data Preserved: Track titles and numbers are set in the output files.
  • Auto-Bitrate: Automatically detects the bitrate of the source file to match quality (or specify your own).
  • Organized Output: Creates a folder named after the Album (or filename) containing the split files.

Installation

  1. Ensure ffmpeg is installed on your system:

    brew install ffmpeg  # macOS
    sudo apt install ffmpeg  # Ubuntu/Debian
  2. Create a virtual environment and install dependencies:

    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  3. Or install directly from Git:

    pip install git+https://github.com/ShinChven/splitm4b.git

Usage

Run the tool from the project root:

# Basic usage (defaults to mp3, auto-bitrate)
splitm4b /path/to/audiobook.m4b

Options

  • --format, -f: Output format. Choices: mp3, aac, flac. Default: mp3.
  • --bitrate, -b: Audio bitrate (e.g., 128k, 192k). If omitted, tries to match source.

Examples

Convert to FLAC:

splitm4b my_book.m4b --format flac

Convert to MP3 with specific bitrate:

splitm4b my_book.m4b --bitrate 64k

License

This project is licensed under the terms of the MIT License.

About

Split m4b audiobook to audio files.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages