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.0.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: m4b_util-0.4.0.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.0.tar.gz
Algorithm Hash digest
SHA256 929b7f0af2220e7135071fcd99bb03673d189dc04abc901f17be9ab95f43c20e
MD5 96c1119bbdd5e3b3342af11a5ad47037
BLAKE2b-256 0e9a9aedbd6cb375b63f6ecfa3a25ba30879494e0564b953ff34f6f070117dcd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: m4b_util-0.4.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9218232818aad98a04e38018cc8b06eeee8231a13f930a3a174d009ae73d14ce
MD5 65319e39fe4da06205a3a7f2e57541f6
BLAKE2b-256 1cbf42bc105449f02470fa65cf5c95bce02b11cceac21fd92a12b8b1c04822f4

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