Skip to main content

m4b-util

A command line utility for creating, editing, and generally working with m4b files.

Sub-commands

This application is split into a number of subcommands which can be run from the main command. For a list of available commands, run m4b-util --help. For details on a specific sub-command, run m4b-util <command> --help.

Bind

The bind sub-command is designed to take a folder of audio files and convert them to a single m4b, treating each individual file as its own chapter. It can get chapter names from the original files' metadata, original files' names, from command line arguments, or just number them sequentially. By default, it only scans for mp3 files, but any file extension can be added via arguments.

Cover

The cover command adds and extracts cover images.

Example:

$ m4b-util cover /path/to/book.m4b --extract /path/to/old/cover.png --apply-cover /path/to/new/cover.png

Labels

The labels command converts between Audacity labels, FFMPEG metadata, and Audiobook chapter metadata. Label end times are ignored, as audiobooks need contiguous, non-overlapping chapters. When converting from a label file, the end time of each segment is set from the start time of the next segment.

Example:

$ m4b-util labels --from-label-file /path/to/labels.txt --to-book /path/to/existing/book.m4b --to-metadata-file /path/to/new_labels.txt

Example:

$ m4b-util bind /path/to/inputs  --title "My Book" --cover /path/to/cover.png -e m4a -e .mp4 --output-dir /path/to/output 

Slide

The slide command moves all chapters in a file by a specified duration, keeping the start and end times the same. It can optionally trim audio from the start of the file, shifting all chapters an equal amount.

Example:

$ m4b-util slide /path/to/input.mp3 --duration 5.1 --trim-start 2.5

Split

The split command takes a mode and a single audio file input, scans for silence or chapters (depending on mode), and writes out individual files containing the audio in-between.

Example:

$ m4b-util split silence /path/to/input.mp3 --output-dir /path/to/output --output_pattern "chapter_{:03d}.mp3"

Release files for m4b-util 2025.4.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for m4b-util 2025.4.16
File Size Uploaded
m4b_util-2025.4.16.tar.gz 47.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for m4b-util 2025.4.16
File Interpreter ABI Platform
m4b_util-2025.4.16-py3-none-any.whl Python 3 none any Details

Total release size: 76.2 kB

Release files / m4b_util-2025.4.16.tar.gz

Download URL m4b_util-2025.4.16.tar.gz
Size 47.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0b8b5f2f04a25dabcb94ad6b8c12781eb43e2915045d0389e2c20b3e4aa1a5d4
BLAKE2b-256 checksum
How to use checksums
3ad158b9d3097d170026216529ac46861427e8cc9b453af280345b76931318ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Release files / m4b_util-2025.4.16-py3-none-any.whl

Download URL m4b_util-2025.4.16-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2af84824665e9b2337fb4761399d230af8dc82133a4c7a899c1b4b6211ec5dbe
BLAKE2b-256 checksum
How to use checksums
e05066673780e4897867980b2b4916b883260c7d25dd8f9e80586b1bf2d08e48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Release history Release notifications | RSS feed

This release

2025.4.16 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page