Linux command
m4b-tool 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Merge a folder of MP3s
m4b-tool merge [folder/] --output-file=[audiobook.m4b]
Split an audiobook
m4b-tool split --audio-format=mp3 [audiobook.m4b]
Refresh embedded chapter
m4b-tool chapters --adjust-by-silence [audiobook.m4b]
Merge with full metadata
m4b-tool merge [folder/] --output-file=[book.m4b] --name="[Title]" --artist="[Author]" --album="[Series]"
Convert a single MP3
m4b-tool merge [file.mp3] --output-file=[file.m4b]
Add a cover image
m4b-tool meta --cover=[cover.jpg] [audiobook.m4b]
说明
m4b-tool is a PHP-based command-line wrapper around ffmpeg and mp4v2 that creates, splits, retags, and inspects M4B audiobook files. The merge subcommand concatenates a directory of audio files (MP3, M4A, WAV, FLAC, etc.) into a single AAC-encoded M4B, automatically inserting chapter markers based on the order of input files or an accompanying chapters.txt. The split subcommand reverses the process, exporting each chapter as a separate file in a chosen format. chapters allows inspecting or rewriting the chapter table, optionally aligning markers to detected silences with --adjust-by-silence for better playback experience. meta edits ID3/MP4 tags and can embed cover artwork. A persistent cache speeds up repeated runs across the same files; disable it with --no-cache when input changes are not being detected.
参数
- merge
- Combine multiple input files into one M4B with chapters preserved.
- split
- Split an M4B by chapter into one file per chapter.
- chapters
- Inspect, generate, or rewrite chapter markers (supports --adjust-by-silence).
- meta
- Read or update tags such as title, artist, cover art, and description.
- --output-file _FILE_
- Path to the output file (M4B).
- --audio-format _FORMAT_
- Output audio format for split (m4b, m4a, mp3, ...).
- --name _TITLE_
- Book or album title.
- --artist _NAME_
- Author or narrator name.
- --album _TEXT_
- Album/series name.
- --cover _FILE_
- Embed a cover image (JPEG or PNG).
- --jobs _N_
- Number of parallel encoding jobs.
- --no-cache
- Disable caching of intermediate analysis results.
FAQ
What is the m4b-tool command used for?
m4b-tool is a PHP-based command-line wrapper around ffmpeg and mp4v2 that creates, splits, retags, and inspects M4B audiobook files. The merge subcommand concatenates a directory of audio files (MP3, M4A, WAV, FLAC, etc.) into a single AAC-encoded M4B, automatically inserting chapter markers based on the order of input files or an accompanying chapters.txt. The split subcommand reverses the process, exporting each chapter as a separate file in a chosen format. chapters allows inspecting or rewriting the chapter table, optionally aligning markers to detected silences with --adjust-by-silence for better playback experience. meta edits ID3/MP4 tags and can embed cover artwork. A persistent cache speeds up repeated runs across the same files; disable it with --no-cache when input changes are not being detected.
How do I run a basic m4b-tool example?
Run `m4b-tool merge [folder/] --output-file=[audiobook.m4b]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does merge do in m4b-tool?
Combine multiple input files into one M4B with chapters preserved.