Skip to main content

A collection of command line utilities for creating, editing, and generally working with m4b files.

Project description

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"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

m4b_util-0.4.1.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

m4b_util-0.4.1-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file m4b_util-0.4.1.tar.gz.

File metadata

  • Download URL: m4b_util-0.4.1.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for m4b_util-0.4.1.tar.gz
Algorithm Hash digest
SHA256 a37ee7cc5b313ca6e1c059f751c522b68f46e40d9cecddd6d283a109ab564245
MD5 48fb65b04cafe6d2196eed9fe0b5b8c2
BLAKE2b-256 9edc4a720ae49d7805f7414ac885065ce3169abb17908d2db6d6a92f79d12ee7

See more details on using hashes here.

File details

Details for the file m4b_util-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: m4b_util-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for m4b_util-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1dd8ebbb759a175e0790ebd73249d068d2b1e49568cd580747b45c6860c6979f
MD5 2e7163e996b280374b6e1473d30c1b6b
BLAKE2b-256 d6a97649808f7a7d1e22faa7ed265161f4532477238b3a64f324ae5f91087570

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page