Voxbound / Guides / Combine MP3 files into an M4B

How to combine MP3 files into one M4B audiobook with chapters on Windows

A folder of MP3s plays as dozens of separate tracks. An MP3 to M4B converter that also joins the files makes the folder one audiobook: converted from MP3 to M4B and combined into one file, the book keeps your place, shows a chapter for each part, and carries its title, author and cover into Apple Books, Audiobookshelf, Prologue and most other audiobook players.

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

Updated 28 October 2026. Every command on this page is tested with FFmpeg 8.1 and 9.0.

Before you start: get the order right

Every method here joins the files in name order, and each file becomes one chapter. Open the folder and check that sorting by name gives the order you want.

Watch out for numbers without leading zeros. Windows File Explorer sorts 2.mp3 before 10.mp3, but many tools compare names letter by letter and put 10 first. Voxbound and the manual way below both sort numbers properly, but renaming to 01, 02 … 10 removes any doubt.

If a book was ripped from CDs, the files may sit in one folder per disc, such as CD1 and CD2, with the track numbers starting again at 01 on each disc. Voxbound plays the discs in turn, so CD2 comes before CD10, and each file becomes one chapter (how it orders files). The manual way below reads one folder only. For a ripped book, copy all the files into one folder first and rename them so the names run straight through, for example 0101 - Chapter 1.mp3 for disc 1, track 1 and 0201 - Chapter 12.mp3 for disc 2, track 1. The script drops the number and dash from the front of each name when it makes the chapter title.

You'll also want a cover image if the MP3s don't already have one. A square JPEG of at least 600 × 600 pixels works well.

If the parts are already M4B files, a plain join drops the chapters inside them; our guide to merging M4B files covers that case.

The quick way: Voxbound

Voxbound is our Windows app for this job. It takes a few clicks, and when it's done it checks the finished file against the Apple Books, Audiobookshelf or Prologue profile, whichever player you're making it for.

  1. Drag the book's folder onto the window, or click Choose folder. Files are put in natural order, so 2 comes before 10, and each filename becomes a chapter title with a leading track number such as 01 - removed. Drag rows to reorder them.
  2. Voxbound fills in the title, and the author where it can, from the folder name. Check them, or click Import tags to copy them from the first file. Click Look up to search online and fill in the description, publisher, year and cover from the match you pick. If the first file has cover art inside it, that's used automatically; click Choose to use a different image.
  3. To check or edit the chapters, open the Chapters tab and click Auto-generate from files. It lists one chapter per file with its start time; click a title or a time to change it, or import a .cue or .txt file instead.
  4. Under Output, click Change and pick the profile for your player: Apple Books, Audiobookshelf, Prologue or Generic M4B. Then click Merge files. When it finishes, Voxbound shows the file's codec, sample rate, chapters and cover, and whether it passes that profile.
Voxbound's editor with twelve MP3 files loaded in order, a cover image, and M4B output set to the Apple Books profile.
Twelve MP3s loaded, with a cover and the Apple Books profile selected.
Voxbound's export summary: the M4B passed validation, with twelve chapters and embedded cover art.
The summary after merging: twelve chapters, cover embedded, validation passed.

It costs €9.99 once, plus VAT or sales tax where it applies. What else it does is covered below.

The manual way: FFmpeg and PowerShell

FFmpeg is the free, open-source tool that many audio converters use under the hood, Voxbound included. You can drive it yourself, but you take on every job the app would do for you.

What the manual way asks of you, for every book:

The first time, you also install FFmpeg. The steps below are tested and work, and the next section covers the ways it goes wrong.

1. Install FFmpeg

Open PowerShell from the Start menu and run:

winget install --id Gyan.FFmpeg.Essentials

Then close PowerShell and open it again, so it can find the new ffmpeg and ffprobe commands.

2. Open PowerShell in the book's folder

In File Explorer, open the folder with the MP3 files, click the address bar, type powershell and press Enter. A PowerShell window opens in that folder.

3. Build the file list and chapters

Paste this whole block into the PowerShell window and press Enter. It writes two text files: files.txt, the list of MP3s in order, and chapters.txt, one chapter per file, timed from each file's real length and named after the file with any leading track number such as 01 - removed.

$files = Get-ChildItem -Filter *.mp3 | Sort-Object { [regex]::Replace($_.Name, '\d+', { $args[0].Value.PadLeft(8, '0') }) }
$list = @()
$meta = @(';FFMETADATA1', 'title=Book title', 'artist=Author name', 'album=Book title', 'genre=Audiobook', '')
$start = 0
foreach ($f in $files) {
    $path = $f.FullName.Replace('\', '/').Replace("'", "'\''")
    $list += "file '$path'"
    $seconds = [double](ffprobe -v error -show_entries format=duration -of csv=p=0 "$($f.FullName)")
    $end = $start + [math]::Round($seconds * 1000)
    $title = ($f.BaseName -replace '^\d+\s*[-_.]\s*', '') -replace '([\\=;#])', '\$1'
    $meta += '[CHAPTER]', 'TIMEBASE=1/1000', "START=$start", "END=$end", "title=$title", ''
    $start = $end
}
if (-not $files) { throw "No MP3 files found in $PWD" }
$utf8 = New-Object System.Text.UTF8Encoding $false
[IO.File]::WriteAllText("$PWD\files.txt", ($list -join "`n") + "`n", $utf8)
[IO.File]::WriteAllText("$PWD\chapters.txt", ($meta -join "`n") + "`n", $utf8)
"Wrote files.txt and chapters.txt for $($files.Count) files"

If it says no MP3 files were found, first check the folder really has MP3s in it. If it does, PowerShell didn't open in that folder. That happens when the folder, or any folder above it, has square brackets in its name, such as [Unabridged]: rename those folders without them and open PowerShell there again.

Two details in the script matter on Windows. Windows PowerShell's usual ways of saving text, Set-Content -Encoding UTF8 and Out-File, produce files FFmpeg refuses to read, so the script writes them a different way. And an apostrophe in a folder or file name, such as O'Brien, has to be escaped in the list or FFmpeg can't find the file.

Now open chapters.txt in Notepad, replace Book title (twice) and Author name, and rename any chapters you like. The script escapes the titles it writes. If you type new ones, put a backslash in front of any =, ;, # or \, as FFmpeg's documentation asks. A single backslash in the middle of a title disappears without a warning: a chapter called AC\DC Live comes out as ACDC Live. Save the file as UTF-8 in Notepad, not UTF-8 with BOM.

4. Merge

With a cover image saved in the folder as cover.jpg, run:

ffmpeg -f concat -safe 0 -i files.txt -i chapters.txt -i cover.jpg -map 0:a -map 2:v -map_metadata 1 -map_chapters 1 -c:a aac -b:a 128k -ar 44100 -ac 2 -c:v mjpeg -disposition:v attached_pic -movflags +faststart "Book title.m4b"

Without a cover image, run this instead:

ffmpeg -f concat -safe 0 -i files.txt -i chapters.txt -map 0:a -map_metadata 1 -map_chapters 1 -c:a aac -b:a 128k -ar 44100 -ac 2 -movflags +faststart "Book title.m4b"

This re-encodes the audio to AAC at 128 kbps, 44.1 kHz stereo, which every major audiobook player accepts, and it copes with MP3s recorded at different sample rates. A 10-hour book comes out at roughly 550 MB at 128 kbps. Change 128k to 64k to halve that.

5. Check the result

To list the chapters FFmpeg wrote:

ffprobe -v error -show_chapters -of compact "Book title.m4b"

You should see one line per chapter with its start time, end time and title. Then open the file in your player and skip between a couple of chapters.

For the next book, everything from step 2 onwards starts again: a new folder, new lists, the title, author and chapters edited again in chapters.txt, and the merge command with the new book's name.

Where the manual way goes wrong

FFmpeg says "unknown keyword"

The file list was saved with an invisible byte-order mark, or as UTF-16. That's what Windows PowerShell's Set-Content -Encoding UTF8 and Out-File do. Run the script in step 3 again rather than editing files.txt by hand. Or skip the lists and merge this book free in Voxbound.

FFmpeg says "Invalid data found when processing input"

This time it's chapters.txt that was saved with a byte-order mark or as UTF-16, usually by saving it as "UTF-8 with BOM" or "UTF-16" in an editor. Save it again as plain UTF-8 and run step 4 again.

FFmpeg says "Impossible to open"

A path in the list doesn't match a file. Usually an apostrophe in a folder or file name wasn't escaped, or a file was renamed or moved after the list was made. Run step 3 again.

The script says no MP3 files were found

If the folder does contain MP3s, PowerShell opened somewhere else, which happens when the folder or any folder above it has square brackets in its name. See step 3 for what to do.

Part of the book is missing

The script only picks up .mp3 files. Any M4A, FLAC or WAV parts in the same folder are left out, and nothing warns you. Convert them first, or use Voxbound, which reads MP3, M4A, M4B, AAC, FLAC and WAV in one book.

A chapter title lost a character

A backslash in a title you typed wasn't doubled, so FFmpeg dropped it. Fix the title in chapters.txt and run step 4 again.

The chapters are in the wrong order

The files were sorted differently from what you expected. Rename them with leading zeros, run step 3 again, and check the order in files.txt.

The player doesn't show chapters

Check the file ends in .m4b and that the command included -map_chapters 1. Then run the check in step 5. If it lists the chapters, the file has them, and the player may need the book removing and adding again to refresh it. If that doesn't help, our guide to M4B chapters not showing covers more causes.

There's no cover

The no-cover command doesn't carry over artwork from inside the MP3s. Save the image as cover.jpg in the folder and use the command with the cover.

The two ways side by side

Voxbound and the manual way, compared
VoxboundManual (FFmpeg)
Setting upBuy, install and enter your licence keyInstall FFmpeg with winget, then reopen PowerShell
Each bookDrop the folder in, check the title and author, pick a profile, click Merge filesOpen PowerShell in the folder, paste the script, edit chapters.txt, run the merge command
File types in one bookMP3, M4A, M4B, AAC, FLAC and WAVMP3 only, as written
Special characters in titlesHandled for youEscape by hand; an unescaped backslash can disappear
CoverTaken from the first file, or choose oneSave a separate cover.jpg
Check for your playerAutomatic, against the Apple Books, Audiobookshelf or Prologue profileNone; check it yourself
Loudness and silenceSwitch on in the output optionsExtra FFmpeg filters you'd add yourself
A shelf of booksQueue them, or use a watch folderRepeat steps 2 to 5 for each book
Cost€9.99 once, plus VAT or sales tax where it appliesFree

Voxbound is the more complete option, for €9.99 once, plus VAT or sales tax where it applies. On top of the merge, it:

The manual way costs nothing and works for a one-off book, if you don't mind the command line and checking the result yourself. Some free apps do the basic merge too. Before you pick one, check whether it verifies the finished file for your player, handles a queue of books, and normalises loudness. Voxbound does all three, and our guide to choosing an audiobook merger lists the other questions to ask.

Going the other way? Our guide to converting an M4B to MP3 covers one file that keeps the chapters, or one file per chapter.

Rather skip the commands?

Voxbound does all of this in a few clicks, then checks the result for your player.

Try one book free Buy Voxbound