Voxbound / Guides / Edit M4B chapters

How to add or edit chapters in an M4B file without re-encoding

You can add, rename or move the chapters of an M4B you already have without re-encoding it: FFmpeg copies the audio untouched and writes an edited chapter list into a new file. In Voxbound, the Chapters tab loads a finished book's chapters and Update tags only writes your edits back, also without re-encoding.

Free to try: Voxbound makes one complete book before you pay.

Updated 29 September 2026. Every command on this page is tested as printed with FFmpeg 8.1 in Windows PowerShell. The Voxbound steps describe version 4.3.0.

Before you start

The commands need FFmpeg, which includes ffprobe; our MP3 to M4B guide shows how to install it. Run them in Windows PowerShell, in the folder that holds the book, with the file name in place of book.m4b.

Every command here writes a new file and leaves the original as it is, so keep the original until you have played the new one. None of them re-encodes the audio, so its quality and size don't change; the file itself changes slightly, because its index and chapter list are written again. Copy-protected files can't be edited with these commands or with Voxbound.

See the chapters you have

Start by listing what the book holds:

ffprobe -v error -show_chapters -of compact "book.m4b"

Each chapter prints as one line with its start time and end time in seconds, and its title. No lines means the book has no chapters yet. Run the same command on the new file after each change below.

The free way: FFmpeg and a text file

FFmpeg can write a book's tags and chapters to a plain text file in its FFMETADATA format, and read an edited copy back in. Editing the text file is how you rename, move, add or remove chapters.

1. Write the chapters to a text file

ffmpeg -v error -i "book.m4b" -f ffmetadata "chapters.txt"

This is the extraction command in FFmpeg's documentation, with -v error added to keep the output short. The file starts with the line ;FFMETADATA1 and the book's tags, followed by one block for each chapter:

[CHAPTER]
TIMEBASE=1/1000
START=30000
END=60000
title=Middle

TIMEBASE=1/1000 means START and END count milliseconds, so this chapter runs from 30 seconds to 60 seconds. A book with no chapters gets the tags and no blocks. If chapters.txt already exists, FFmpeg asks before replacing it.

2. Edit the text file

Open chapters.txt in Notepad. Leave the lines above the first [CHAPTER] alone: the command in the next step takes the book's tags from the book, so changes there have no effect. Then:

For a book with no chapters, add one block for each chapter at the end of the file. Three chapters of 30 minutes look like this:

[CHAPTER]
TIMEBASE=1/1000
START=0
END=1800000
title=Prologue

[CHAPTER]
TIMEBASE=1/1000
START=1800000
END=3600000
title=Chapter 1

[CHAPTER]
TIMEBASE=1/1000
START=3600000
END=5400000
title=Chapter 2

The last END should be the book's length in milliseconds. This prints the length in seconds. Multiply it by 1000 and drop the decimals, because START and END are whole numbers: 5400.043 becomes 5400043.

ffprobe -v error -show_entries format=duration -of csv=p=0 "book.m4b"

Two details from FFmpeg's description of the format matter when you edit. A title containing =, ;, # or a backslash needs a backslash in front of each of those characters, and a backslash itself is written as two: AC\\DC Live is read as AC\DC Live. And every block needs its TIMEBASE=1/1000 line: the documentation says that without one, START and END are read as nanoseconds, and in our test the chapters' times collapsed towards the start of the book.

Save the file as UTF-8 without a byte order mark. In our tests FFmpeg refused a chapters file that starts with one, with the error Invalid data found when processing input, and wrote nothing; ordinary Windows line endings were fine. In Notepad, choose File, then Save as, and set Encoding to the plain UTF-8 choice, not the one that mentions BOM. UTF-8 keeps accented titles intact.

3. Write the chapters into a copy of the book

ffmpeg -i "book.m4b" -i "chapters.txt" -map 0:a -map 0:v? -map_metadata 0 -map_chapters 1 -c copy -disposition:v attached_pic -movflags +faststart "book-edited.m4b"

What each part does:

FFmpeg writes the chapters both as a QuickTime chapter track and as a Nero chapter list, the two formats players read.

4. Check the result

List the new file's chapters with the command from the start, this time on book-edited.m4b. To confirm the audio is the same, print a fingerprint of the audio in each file:

ffmpeg -v error -i "book.m4b" -map 0:a -c copy -f md5 -

Run it once on book.m4b and once on book-edited.m4b. The two MD5= lines are identical when the audio wasn't touched. Then open the new file in your player and skip between a few chapters. Once it is right, put it in place of the original under the original's name.

Rules that keep the chapters working

The Voxbound way

Voxbound 4.1.14 and later edit a finished book's chapters in a table, without a text file, and write them back without re-encoding. Update tags only isn't part of the free trial; it needs a licence key.

  1. Drop the M4B onto the Voxbound window. Load from file and Update tags only work only when the list holds one finished book: a single .m4b, .m4a or .mp3 file. The other chapter tools work on any list.
  2. In the Book card, click Import tags to fill in the book's current details from the file. Update tags only writes every box in the card into the file, and removes a tag whose box is empty; its dialog names any that would go.
  3. Open the Chapters tab and click Load from file. The book's chapters appear in a table with each chapter's start time and length. If the book has none, it says so.
  4. Click a title to rename a chapter, or a start time to move it. A start time is written as 1:04:30, 4:30 or in seconds. The toolbar has + Add, Split, Merge ↓, ↑ Move up, ↓ Move down and Delete. If the list has empty, out-of-order or overlapping chapters, a bar says so and Auto-fix repairs them.
  5. Click Update tags only at the bottom of the window. The dialog says how many chapters will replace the book's own, and that the audio is copied as it is. Choose Update this file, or Save a copy… to keep the original.

If the book has no chapters yet, the Chapters tab has other ways to fill the table: + Add and type the times, Import .cue or Import .txt, or Paste chapter list for a list copied from a web page. Find chapters online opens a search for the book's chapter list in your browser, and you copy the list it shows into Paste chapter list; Voxbound sends nothing. Voxbound doesn't find chapters from the audio itself: you supply the times.

Updating a file in place writes a temporary file, checks that it is as long as the original, to within two seconds, and then swaps it in, so a failure leaves the original as it was. Chapters are put in time order before they are written, and the dialog after the update lists anything Voxbound corrected. The audio, and the cover unless you chose a new one, are copied unchanged.

The two ways side by side

Editing the chapters of an M4B you already have
FFmpegVoxbound
You editA text file, in millisecondsA table: click a title or a start time
The audioCopied, not re-encodedCopied, not re-encoded
Chapters out of orderWritten as given; you keep the list in orderPut in order before writing, with a note of what changed
The originalUntouched; the result is a new fileUpdated in place, or a copy if you choose Save a copy…
CostFreeNeeds a licence key; not part of the free trial

To see whether a book's chapters are the problem before you edit anything, our guide to M4B chapters not showing covers the common causes, and what an M4B file is covers the file itself.

Questions

Short answers about editing M4B chapters.

How do I add chapters to an M4B?

Write the chapters to a text file with FFmpeg, add a block for each chapter with TIMEBASE=1/1000, its title, and its start and end in milliseconds, and write the list into a copy with -map_chapters and -c copy. In Voxbound, add them in the Chapters tab and click Update tags only.

Is there an M4B chapter editor?

Voxbound's Chapters tab is one: it loads a finished book's chapters, and you rename, move, add or delete them in a table. The free way is FFmpeg with an edited text file.

How do I rename the chapters in an M4B?

Change the title= line of each chapter in the text file and write it back with the command on this page. In Voxbound, load the chapters, click a title to change it, and click Update tags only.

Can I edit M4B chapters without re-encoding?

Yes. FFmpeg with -c copy and Voxbound's Update tags only both copy the audio as it is. Comparing an MD5 fingerprint of the audio before and after shows it is unchanged.

How do I add chapters to an M4B that has none?

Export the tags to a text file, add a chapter block at the end of the file for each chapter, and write it into a copy. In Voxbound, add the times in the Chapters tab or paste a chapter list, then click Update tags only. Neither finds chapters from the audio: you supply the times.

Why don't my new chapters show in Audiobookshelf?

By default, Audiobookshelf's own metadata file takes priority over the tags in the audio file, and it uses the chapters saved there when there are any. Correct them in its chapter editor, or change the library's metadata order and scan again.

Fix chapters without a text file

Voxbound loads a finished book's chapters, lets you edit them in a table and writes them back without re-encoding the audio.

Buy Voxbound Try one book free