Convert Y4M to AC3 — Free Online Tool
Convert Y4M (YUV4MPEG2) video files to AC3 Dolby Digital audio by extracting and encoding the audio stream using FFmpeg's ac3 encoder at 192kbps by default. This is useful when a Y4M intermediate file carries embedded audio that needs to be delivered as a standalone Dolby Digital track for DVD, Blu-ray, or broadcast workflows.
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 container typically used as an intermediate format in professional video pipelines — it stores raw YUV frames with no compression and occasionally carries a PCM audio stream. During this conversion, FFmpeg reads the Y4M input, discards the raw video stream entirely (since AC3 is a pure audio format), and encodes the audio content using the Dolby Digital AC3 codec at 192kbps. The result is a standalone .ac3 bitstream file — a raw Dolby Digital audio file with no container wrapping — ready for muxing into a DVD, Blu-ray, or broadcast transport stream.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that handles reading the Y4M input, decoding its raw PCM audio, and encoding the output AC3 Dolby Digital bitstream. |
-i input.y4m
|
Specifies the input Y4M file. FFmpeg reads the YUV4MPEG2 container, identifying any video (rawvideo YUV frames) and audio (PCM) streams present. Only the audio stream will be used in this conversion. |
-c:a ac3
|
Selects FFmpeg's native AC3 encoder to encode the audio stream into Dolby Digital format. This produces an ATSC A/52-compliant bitstream suitable for DVD, Blu-ray, and broadcast delivery. |
-b:a 192k
|
Sets the AC3 audio bitrate to 192 kilobits per second, which is the standard bitrate for stereo Dolby Digital tracks on DVDs. Increase this value (e.g., 384k or 448k) for 5.1 surround content to maintain multichannel fidelity. |
output.ac3
|
Defines the output filename and tells FFmpeg to write a raw AC3 bitstream file. The .ac3 extension produces a bare Dolby Digital bitstream with no container wrapper, which is the correct format for muxing into DVD VOB, MKV, or MPEG-TS containers downstream. |
Common Use Cases
- Extracting and encoding the audio track from a Y4M intermediate file produced by a lossless video processing pipeline into a Dolby Digital AC3 file for DVD or Blu-ray authoring.
- Preparing a standalone AC3 audio track from a Y4M source to mux into an MPEG-2 program stream or transport stream for broadcast television delivery.
- Converting the audio component of a Y4M file generated by tools like ffmpeg, mjpeg-tools, or rav1e into an AC3 track compatible with hardware Dolby Digital decoders and AV receivers.
- Producing a Dolby Digital audio deliverable from a YUV4MPEG2 intermediate without needing to re-encode or transcode the video portion of a production workflow.
- Archiving or delivering the audio commentary or score track embedded in a Y4M proxy file as a discrete .ac3 file for post-production integration.
Frequently Asked Questions
Y4M files can optionally contain a PCM audio stream, but many Y4M files produced by tools like ffmpeg piping or mjpeg-tools are video-only with no audio track. If your Y4M file has no audio stream, FFmpeg will produce an empty or zero-duration AC3 file. You should verify your Y4M file contains audio before converting — running 'ffmpeg -i input.y4m' will show you whether an audio stream is present.
192kbps is a common AC3 bitrate for stereo content and is the standard used for many DVD audio tracks. It delivers acceptable quality for stereo and surround mixes, though for 5.1 surround sound, 384kbps or 448kbps is generally recommended to maintain fidelity across all six channels. For broadcast or Blu-ray mastering workflows, consider using 384kbps or higher to match professional delivery specifications.
Replace the '-b:a 192k' flag with your desired bitrate. AC3 supports values of 96k, 128k, 192k, 256k, 320k, 384k, 448k, and 640k. For example, to encode at 384kbps for a 5.1 surround mix, use: ffmpeg -i input.y4m -c:a ac3 -b:a 384k output.ac3. The 640k option is the maximum AC3 bitrate and is appropriate for high-fidelity 5.1 or 7.1 Dolby Digital masters.
Yes. The raw .ac3 bitstream output can be muxed into MKV using mkvmerge or FFmpeg, into a VOB/MPEG-2 program stream for DVD authoring, or into a transport stream for broadcast. MP4 containers technically support AC3 but compatibility on consumer devices is inconsistent — MKV or MPEG-TS are more reliable containers for AC3 delivery. To mux directly with FFmpeg, use: ffmpeg -i output.ac3 -c:a copy final.mkv.
AC3 is a pure audio format — it has no video container capability whatsoever. The conversion intentionally extracts only the audio stream and discards all video data. This is the correct behavior for producing a standalone Dolby Digital audio file. If you need to keep the video alongside the AC3 audio, you should target a container format like MKV, MP4, or MPEG-TS instead.
Yes. On Linux or macOS, you can loop over files with: for f in *.y4m; do ffmpeg -i "$f" -c:a ac3 -b:a 192k "${f%.y4m}.ac3"; done. On Windows Command Prompt, use: for %f in (*.y4m) do ffmpeg -i "%f" -c:a ac3 -b:a 192k "%~nf.ac3". This will process each Y4M file and output a matching .ac3 file for each — particularly useful when batch-converting audio tracks from a multi-file Y4M production pipeline.
Technical Notes
Y4M (YUV4MPEG2) is a headerless, uncompressed video format primarily designed for inter-application piping and lossless intermediate storage, standardized as part of the mjpeg-tools project. Its audio support is minimal and non-standardized — many decoders and encoders ignore the audio portion entirely or expect raw PCM in a very specific format. Because Y4M carries uncompressed raw YUV frame data, these files are extremely large relative to their duration; a single minute of 1080p Y4M can exceed several gigabytes. The AC3 encoder in FFmpeg (the native 'ac3' encoder) produces a raw Dolby Digital bitstream compliant with ATSC A/52. FFmpeg will not insert a file container around the output — the .ac3 extension produces a bare bitstream, which is correct for most muxing workflows but cannot be played directly by all media players without a container. AC3 is inherently lossy, so any audio in the Y4M source (which is uncompressed PCM) will undergo lossy compression during this conversion; the degree of quality loss depends on the chosen bitrate. AC3 supports up to 5.1 channels natively within the Dolby Digital standard; if your source audio has more channels, FFmpeg will downmix accordingly. Metadata such as channel labels and dialogue normalization values (dialnorm) can be set via additional FFmpeg flags like '-dialnorm' if needed for broadcast compliance.