Trim M4B — Free Online Tool

Trim an M4B audiobook or podcast file to a precise start and end point, preserving the AAC audio stream via stream copy — no re-encoding, no quality loss. Ideal for extracting a specific chapter excerpt, removing unwanted intro/outro segments, or isolating a passage from a long audiobook file.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

This tool uses FFmpeg's stream copy mode (`-c copy`) to cut the M4B file at the specified start (`-ss`) and end (`-to`) timestamps without decoding or re-encoding the AAC audio stream. Because M4B is a container format built on the MPEG-4 specification (essentially a renamed .m4a), the audio data is extracted byte-for-byte between the cut points and wrapped into a new M4B container. The `-movflags +faststart` flag repositions the MOOV atom to the beginning of the output file, which improves compatibility with audiobook players that need to read metadata before buffering audio. Note that because stream copy cuts on keyframes rather than exact sample boundaries, the actual trim point may be offset by a fraction of a second from what you specified — this is a known characteristic of keyframe-based cutting in AAC streams.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary. This is the entry point for all FFmpeg operations; everything that follows is an argument passed to this program.
-i input.m4b Specifies the input M4B audiobook file. FFmpeg reads the MPEG-4 container, identifies the AAC audio stream and any chapter metadata, and makes them available for processing.
-ss 00:00:00 Sets the trim start point — in this case, the very beginning of the file. Placed after `-i`, this is an output-side seek, which is slower than input-side seeking but more accurate when used with stream copy, as it avoids the risk of missing keyframes near the cut point.
-to 00:00:10 Sets the trim end point to 10 seconds into the file. Combined with `-ss 00:00:00`, this produces a 10-second output clip. Replace this value with any target timestamp in `HH:MM:SS` format to adjust the end of the trimmed M4B segment.
-c copy Instructs FFmpeg to copy all streams (in this case, the AAC audio stream) directly from the input to the output without re-encoding. This makes the trim operation fast and lossless — the AAC data is not decoded or recompressed, so audio quality is fully preserved.
output.m4b Specifies the output filename and format. The `.m4b` extension tells FFmpeg to write an MPEG-4 container with audiobook-compatible settings, preserving chapter atoms and metadata structure expected by applications like Apple Books, Overcast, and other M4B-aware players.

Common Use Cases

  • Extract a single chapter from a long multi-chapter M4B audiobook to share or review without distributing the entire file
  • Remove a lengthy publisher or narrator introduction from the beginning of an M4B audiobook before loading it into a podcast app
  • Isolate a specific passage from an M4B lecture recording to create a reference clip for study or review
  • Cut down an M4B podcast episode to remove extended sponsor segments or outro music before archiving
  • Create a preview excerpt from an M4B audiobook file — for example, the first 10 minutes — to use as a sample for promotional purposes
  • Split a single large M4B file into multiple smaller segments corresponding to individual chapters for more granular bookmarking control

Frequently Asked Questions

It depends on which chapters fall within the trimmed range. FFmpeg's stream copy mode does carry chapter metadata forward, but chapters that begin outside the specified trim window will be dropped, and chapter timestamps that remain may not be recalculated relative to the new start time — they retain their original absolute values. If precise chapter marker preservation is critical, you should manually inspect and edit the chapter metadata in the output file using a tool like mp4chaps or a tag editor that supports M4B chapters.
No. The command uses `-c copy`, which performs a stream copy — the AAC audio data is taken directly from the source file without decoding or re-encoding. This means there is zero generation loss from the trim operation itself. The output audio quality is bit-for-bit identical to the original for all content within the trimmed range.
AAC audio in M4B files is encoded in frames, and FFmpeg's stream copy mode can only cut at frame boundaries — it cannot split a single audio frame in half. As a result, the actual cut point will snap to the nearest AAC frame boundary, which may be up to ~20–50 milliseconds away from your target timestamp. For most audiobook and podcast use cases this is imperceptible, but if sample-accurate cutting is required, you would need to re-encode the audio (remove `-c copy` and specify a codec like `-c:a aac`), which will introduce a small amount of transcoding loss.
Modify the values after `-ss` (start time) and `-to` (end time) using the format `HH:MM:SS` or `HH:MM:SS.mmm` for millisecond precision. For example, to extract from 1 hour 15 minutes to 1 hour 45 minutes, use `-ss 01:15:00 -to 01:45:00`. You can also use `-t` instead of `-to` if you want to specify a duration rather than an end timestamp — for instance, `-ss 00:05:00 -t 00:30:00` would extract 30 minutes starting from the 5-minute mark.
Global metadata tags such as title, author, narrator, and cover art embedded in the M4B container are preserved by the stream copy operation and will appear in the output file. However, chapter-specific metadata may be incomplete or have misaligned timestamps as noted above. Some audiobook applications like Apple Books or Bookmobile rely on this metadata for library organization, so verifying tags in the output file with a tool like MediaInfo or Kid3 is recommended.
The command as shown processes a single file. To batch-process multiple M4B files in a terminal, you can wrap it in a shell loop — for example in Bash: `for f in *.m4b; do ffmpeg -i "$f" -ss 00:00:00 -to 00:10:00 -c copy "trimmed_$f"; done`. This would apply the same start and end timestamps to every M4B file in the current directory. For files larger than 1GB, running FFmpeg locally via the command line is recommended since the browser-based tool supports files up to 1GB.

Technical Notes

M4B is structurally identical to the M4A container — both are MPEG-4 Part 14 files — with the distinction being the file extension and the presence of chapter atom data (`chpl` or `nero` chapters) that audiobook applications use for navigation. Because the format uses AAC as its default codec (a lossy format), the audio quality of any given M4B is fixed at the bitrate it was originally encoded at — common values are 64 kbps (mono, speech-optimized) for budget audiobooks and up to 128 kbps for higher-quality productions. Stream copy trimming preserves this bitrate exactly. The `-movflags +faststart` flag is particularly important for M4B files intended for use in streaming-capable audiobook players, as it ensures the MOOV atom (which contains duration, chapter, and codec metadata) is located at the start of the file rather than the end. Without this flag, some players may refuse to play or seek within the trimmed file until it is fully buffered. If the source M4B was encoded with an unusual codec variant (such as HE-AAC or AAC-LD), the stream copy will preserve that codec unchanged in the output, which may cause compatibility issues on devices that only support standard AAC-LC.

Related Tools