Extract Audio from MPEG to M4B — Free Online Tool

Extract audio from MPEG video files and save it as M4B, an MPEG-4 audiobook format with AAC encoding and chapter support. This is ideal for converting MPEG recordings of lectures, sermons, or long-form content into a bookmarkable audiobook file you can listen to on Apple Books or podcast apps.

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

MPEG files typically carry MP2 audio (the legacy MPEG-1/2 audio standard), which is not compatible with the M4B container. During this conversion, the video stream is completely discarded and the MP2 audio is decoded and re-encoded as AAC at 128kbps — the native codec for M4B. The resulting audio is wrapped in an MPEG-4 container with the .m4b extension, which unlocks chapter markers and playback position bookmarking unavailable in the original MPEG format. The -movflags +faststart flag reorganizes the file's metadata to the front, enabling progressive playback in apps before the full file is loaded.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool. In the browser version of this tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm) — no data is sent to a server.
-i input.mpeg Specifies the input MPEG file, which may use MPEG-1 or MPEG-2 video compression alongside MP2 or MP3 audio — all of which FFmpeg reads natively.
-vn Disables video output entirely, discarding the MPEG-1/2 video stream so only the audio is processed. Without this flag, FFmpeg would attempt to encode video into the M4B container, which does not support it.
-c:a aac Re-encodes the audio stream as AAC, the required codec for the M4B container. Since MPEG files use MP2 audio by default, this transcode step is mandatory — there is no compatible codec to stream-copy directly.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second, a standard quality level well-suited for spoken-word audiobook content. You can increase this to 192k or 256k for music-heavy MPEG sources.
-movflags +faststart Moves the MPEG-4 container's metadata (moov atom) to the beginning of the output file, which is required for M4B files to begin playback in audiobook and podcast apps before the full file is available.
output.m4b The output filename with the .m4b extension, which signals to Apple Books, Overcast, VLC, and other compatible apps that this file is an audiobook, enabling bookmarking and audiobook-specific playback controls.

Common Use Cases

  • Convert a recorded MPEG lecture series from a university course into a bookmarkable M4B audiobook so you can resume exactly where you left off between sessions
  • Transform MPEG recordings of religious sermons or podcasts into M4B files compatible with Apple Books and Overcast, which support per-file bookmarking
  • Strip the audio from an MPEG broadcast recording of a conference talk to create a portable M4B you can listen to during commutes without needing video playback
  • Convert old MPEG training videos into M4B audiobooks for corporate learning platforms that require the audiobook format for compliance tracking
  • Extract narration audio from MPEG educational content and save it as M4B to take advantage of chapter metadata you can add afterward with an audiobook tagging tool
  • Repurpose archived MPEG video interviews or oral histories into distributable M4B audiobook files for podcast feeds or digital library collections

Frequently Asked Questions

Yes, some quality loss occurs because this is a lossy-to-lossy transcode — the original MP2 audio is decoded and re-encoded as AAC. In practice, modern AAC at 128kbps is highly efficient and typically sounds comparable to or better than MP2 at similar bitrates, so for speech-heavy content like lectures or audiobooks the result is usually excellent. If your MPEG file contains music or high-fidelity audio, you can raise the output bitrate to 192k or 256k to minimize the quality gap.
M4B natively supports the MPEG-4 chapter format, but this conversion extracts the raw audio stream from your MPEG file — MPEG does not store chapter metadata, so there are no chapters to carry over. The output M4B will be a single unbroken audio track. To add chapters, you can use a tool like mp4chaps or Audiobook Builder after the conversion to define chapter boundaries manually.
Both .m4a and .m4b are MPEG-4 audio containers using AAC, but the .m4b extension signals to compatible apps like Apple Books, VLC, and Overcast that the file is an audiobook or podcast. This unlocks app-level features like playback speed control, sleep timers, and saved listening position (bookmarking) that are suppressed for standard .m4a music files. The codec and container are technically identical — only the extension and its associated behavior differ.
Replace the value after -b:a in the command with your desired bitrate. For smaller files suitable for speech, use -b:a 64k or -b:a 96k. For higher fidelity, use -b:a 192k or -b:a 256k. The full command with a higher bitrate would look like: ffmpeg -i input.mpeg -vn -c:a aac -b:a 192k -movflags +faststart output.m4b. Keep in mind that M4B is primarily an audiobook format, so bitrates above 128k rarely provide a perceptible benefit for spoken-word content.
Yes. On Linux or macOS, you can loop over all MPEG files in a directory with: for f in *.mpeg; do ffmpeg -i "$f" -vn -c:a aac -b:a 128k -movflags +faststart "${f%.mpeg}.m4b"; done. On Windows Command Prompt, use: for %f in (*.mpeg) do ffmpeg -i "%f" -vn -c:a aac -b:a 128k -movflags +faststart "%~nf.m4b". This is especially useful for converting a series of MPEG lecture recordings into individual M4B chapters.
MPEG files have very limited metadata support compared to MPEG-4 containers, so most MPEG files carry little to no embedded metadata. FFmpeg will pass through any metadata it finds, but in practice you will likely need to tag the output M4B manually. Tools like Mp3tag, Kid3, or iTunes can write proper audiobook metadata fields — including title, author, narrator, and cover art — to the M4B file after conversion.

Technical Notes

MPEG-1 and MPEG-2 containers use MP2 (MPEG-1 Audio Layer II) as their default audio codec, which is a broadcast-era standard distinct from MP3 and largely absent from modern consumer devices. M4B requires audio to be stored as AAC within an MPEG-4 container, making re-encoding mandatory — there is no stream-copy path available for this conversion. The -vn flag ensures the video stream is entirely excluded rather than triggering a video transcode, keeping conversion fast and the output file audio-only. The -movflags +faststart flag is particularly important for M4B files intended for streaming or podcast delivery, as it moves the moov atom (the file's index) to the beginning of the file so apps can begin playback before the download completes. One known limitation is that MPEG files with multiple audio tracks (e.g., dubbed broadcasts) will default to the first audio track; use -map 0:a:1 before the output filename to select an alternate track. The output file size for a 128kbps AAC M4B will be substantially smaller than the original MPEG file, which bundled both video and audio streams.

Related Tools