Convert Y4M to M4B — Free Online Tool
Convert Y4M (YUV4MPEG2) video files to M4B audiobook format by extracting and encoding the audio stream to AAC at 128k bitrate. This tool is ideal for pulling narrated or spoken-word audio from uncompressed Y4M video pipelines and packaging it into an audiobook-ready container with chapter and bookmarking support.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your Y4M file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
Y4M is a raw, uncompressed video format with no audio compression — it stores video frames in YUV colorspace and is typically produced by tools like FFmpeg, x264, or video processing pipelines. When converting to M4B, FFmpeg discards the raw video stream entirely and focuses on extracting whatever audio track exists in the Y4M file, encoding it to AAC (Advanced Audio Codec) at 128k bitrate. The resulting file is wrapped in an MPEG-4 container with the .m4b extension, which Apple and other audiobook players recognize for chapter navigation and playback position bookmarking. The -movflags +faststart flag reorganizes the file's metadata to the beginning of the output, which enables progressive playback and is a best practice for M4B files used in streaming or podcast contexts.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool, which handles all reading, decoding, encoding, and muxing steps in this conversion pipeline. |
-i input.y4m
|
Specifies the input Y4M file. FFmpeg reads the raw YUV video frames and any accompanying audio stream from this uncompressed YUV4MPEG2 source file. |
-c:a aac
|
Sets the audio codec to AAC (Advanced Audio Codec) using FFmpeg's built-in AAC encoder. AAC is the required codec for M4B audiobook files and is natively supported by Apple Books, iOS, and most podcast applications. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second, which provides good speech intelligibility for audiobooks and narration while keeping file sizes compact. This is the first lossy encoding step the audio undergoes if the Y4M source contained raw PCM audio. |
-movflags +faststart
|
Moves the MPEG-4 container's metadata (moov atom) to the beginning of the output file. This is a best practice for M4B audiobooks because it allows players to read chapter markers, bookmarks, and playback metadata immediately without seeking to the end of the file. |
output.m4b
|
Specifies the output filename with the .m4b extension, which signals to FFmpeg to write an MPEG-4 container formatted for audiobook playback. The .m4b extension is what Apple Books and compatible podcast players use to enable bookmarking and chapter navigation features. |
Common Use Cases
- Extracting narrated audio from a Y4M video produced by a professional video editing pipeline to distribute as an audiobook on Apple Books or Audible-compatible platforms
- Converting a spoken-word screen recording or lecture captured in Y4M format into an M4B podcast episode that listeners can bookmark and resume
- Packaging audio commentary from a Y4M intermediate video file into an M4B container for use with chapter markers in podcast production workflows
- Pulling audio from a Y4M file generated by a lossless video processing chain (e.g., ffmpeg pipe output) to create a self-contained audiobook file for offline listening on iOS devices
- Repurposing a Y4M video of a recorded meditation, yoga class, or guided session into an M4B audiobook format for distribution to subscribers who prefer audio-only playback
Frequently Asked Questions
Y4M (YUV4MPEG2) files rarely contain audio in practice — the format is designed primarily as a raw video transport and piping format, and most Y4M files contain only video frames. If your Y4M file has no audio track, FFmpeg will produce an empty or invalid M4B file because there is no audio to encode to AAC. You should verify your Y4M source contains an audio stream before attempting this conversion, for example by running 'ffmpeg -i input.y4m' and checking the stream list.
M4B is a pure audio container format — it does not support video streams. The M4B specification is built around AAC audio for audiobooks and podcasts, and no video data is written to the output file regardless of what video content the Y4M source contains. This is intentional: the conversion extracts only the audio track from the Y4M file and packages it for audiobook playback. If you need to preserve the video, you should convert to a video-capable format like MP4 instead.
The audio quality is controlled by the -b:a flag, which sets the AAC bitrate. The default in this command is 128k, which is a good balance for spoken-word content like audiobooks. For higher fidelity narration or music-heavy content, you can increase it to 192k or 256k by replacing '128k' with your desired value, e.g., '-b:a 192k'. For audiobooks with speech only, you can reduce it to 64k or 96k to significantly shrink file size with minimal perceptible quality loss at normal listening speeds.
M4B natively supports chapter markers, but this FFmpeg command does not add chapters automatically — it only creates the M4B container. If your Y4M source file had embedded chapter metadata (which is extremely rare given the Y4M format's simplicity), FFmpeg would attempt to carry it over, but Y4M has no chapter specification. To add chapters to the resulting M4B, you would need a separate step using a tool like mp4chaps or by passing a chapter metadata file to FFmpeg via the -map_metadata or -i flags.
The size reduction is dramatic. Y4M stores raw uncompressed video frames in YUV colorspace, which results in extremely large files — a single minute of 1080p Y4M video can exceed 3GB. The M4B output contains only AAC-encoded audio at 128k bitrate, which produces roughly 1MB per minute of audio. A 10-minute Y4M file that might be 30GB on disk could produce an M4B audiobook of under 10MB, because all video data is discarded and only the compressed audio remains.
AAC is the standard and most compatible codec for M4B files, and it is what Apple Books, iOS, and most podcast players expect. M4B technically supports other codecs like ALAC or MP3 within the container, but using anything other than AAC risks compatibility issues with Apple devices and dedicated audiobook players. For spoken-word content like audiobooks, AAC at 128k is more than sufficient — the codec is highly efficient at encoding human speech. Changing to a non-AAC codec like FLAC would likely break playback on the majority of M4B-compatible applications.
Technical Notes
Y4M files encode video as raw planar YUV frames with no interframe compression, making them large but pixel-perfect — a quality that is irrelevant for this conversion since all video data is dropped when targeting M4B. The audio stream in Y4M, if present, is typically raw PCM, which FFmpeg reads and re-encodes to AAC using its native encoder. This re-encoding step introduces lossy compression for the first time in the audio chain, so if the original audio was captured losslessly, the 128k AAC output represents the first quality reduction. The -movflags +faststart flag is technically important for M4B files: it moves the 'moov' atom to the front of the file, which allows audiobook apps to begin reading chapter metadata and playback position without parsing the entire file. M4B does not support subtitle tracks, multiple audio tracks, or transparency, so none of those features from a hypothetical multi-stream Y4M source would survive into the output. ID3-style metadata tags (title, author, artist) can be embedded in M4B and are used by Apple Books and podcast clients to display book information, but they must be added separately as Y4M carries no such metadata.