Extract Audio from Y4M to AC3 — Free Online Tool

Extract Dolby Digital AC3 audio from a Y4M (YUV4MPEG2) video file using the AC3 encoder at 192kbps. Y4M is a raw, uncompressed intermediate format used in video processing pipelines — this tool strips the uncompressed video stream and encodes any embedded audio directly to the AC3 format used in DVDs, Blu-rays, and broadcast television.

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

Y4M files store raw, uncompressed video frames with no inter-frame compression, making them very large but lossless. When extracting audio from a Y4M file, FFmpeg discards the entire rawvideo stream and re-encodes the audio track using Dolby Digital's AC3 codec. Unlike container-switching workflows where streams can sometimes be copied without re-encoding, the audio here is actively transcoded from whatever source format it was in to AC3 with a target bitrate of 192kbps. The resulting .ac3 file contains only the audio — there is no video data, no container overhead beyond the AC3 bitstream itself — making it immediately compatible with Dolby Digital playback systems, disc authoring tools, and broadcast workflows.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg command-line tool, which is running here as a WebAssembly binary (FFmpeg.wasm) entirely within your browser — no data is sent to a server.
-i input.y4m Specifies the input Y4M file. FFmpeg reads the YUV4MPEG2 container, which contains a rawvideo stream of uncompressed frames and, optionally, an audio stream that will be extracted.
-vn Disables video output entirely, telling FFmpeg to ignore the rawvideo stream in the Y4M file. Without this flag, FFmpeg would attempt to include video in the output, which is not possible for a bare .ac3 audio file.
-c:a ac3 Selects the AC3 encoder (Dolby Digital) for the audio stream. This actively transcodes the source audio into the AC3 bitstream format required for DVD, Blu-ray, and broadcast delivery.
-b:a 192k Sets the AC3 audio bitrate to 192 kilobits per second, which is the standard default for stereo Dolby Digital content and meets DVD audio specification requirements. You can increase this to 384k for surround sound content or up to 640k for Blu-ray.
output.ac3 Defines the output filename with the .ac3 extension, producing a raw Dolby Digital bitstream file containing only the encoded audio — no video, no wrapper container — ready for use in disc authoring or broadcast systems.

Common Use Cases

  • Extracting the audio track from a Y4M intermediate file produced by a video processing pipeline (e.g., AviSynth or VapourSynth scripts) to prepare it for DVD or Blu-ray disc authoring in AC3 format
  • Separating audio from a Y4M master file used in lossless video editing so the audio can be independently mixed, mastered, or delivered in Dolby Digital format
  • Converting the audio portion of a Y4M file output by ffmpeg piping workflows into AC3 for use in broadcast television production systems that require Dolby Digital compliance
  • Generating an AC3 audio track from a Y4M source to pair with a separately encoded video stream during DVD multiplexing with tools like DVDAuthor or MuxMan
  • Archiving the audio commentary or dialogue track from a Y4M intermediate — produced during color grading or VFX work — into a compressed, delivery-ready AC3 file without retaining the massive uncompressed video
  • Preparing a Dolby Digital audio stream from a Y4M test signal file for QC or broadcast compliance verification

Frequently Asked Questions

Y4M (YUV4MPEG2) was originally designed as a video-only pipe format, and in most real-world usage it contains no audio at all — just raw video frames. However, some implementations and tools do embed audio data into Y4M files. If your Y4M file has no audio track, FFmpeg will produce an empty or zero-length AC3 output and may report an error like 'Output file does not contain any stream.' Always verify your Y4M source contains audio before running this extraction.
Yes — AC3 is a lossy codec, so encoding to AC3 at 192kbps involves psychoacoustic compression that permanently discards some audio information. The degree of perceptible quality loss depends on the source audio's original quality and format. At 192kbps, AC3 is considered broadcast-acceptable for stereo and standard surround content, but if you need lossless output, you should target a format like FLAC or WAV instead. There is no way to produce lossless audio from a lossy AC3 encode.
DVD specifications allow AC3 audio at bitrates from 96kbps up to 448kbps, with 192kbps being the common default for stereo and 384kbps frequently used for 5.1 surround content. Blu-ray supports AC3 up to 640kbps. For DVD authoring, 192kbps is generally sufficient for stereo tracks, while 384kbps is recommended for surround. You can change the bitrate in the FFmpeg command by replacing '-b:a 192k' with your target value, for example '-b:a 384k' for a higher-quality 5.1 mix.
The bitrate is controlled by the '-b:a' flag in the command. To change it, replace '192k' with any AC3-supported value: 96k, 128k, 192k, 256k, 320k, 384k, 448k, or 640k. For example, to produce a higher-quality encode suitable for a 5.1 surround track on Blu-ray, you would use: ffmpeg -i input.y4m -vn -c:a ac3 -b:a 384k output.ac3. Note that AC3 does not support arbitrary bitrates — it must be one of the standard values defined by the Dolby Digital specification.
Y4M stores raw, uncompressed video frames — a single second of 1080p Y4M video can easily exceed 100MB. Since this tool discards the entire rawvideo stream and outputs only the audio as compressed AC3, the output file will be dramatically smaller — typically a few megabytes per minute of audio at 192kbps. This size difference reflects the fundamental nature of the conversion: you are throwing away a massive uncompressed video payload and retaining only a lossy-compressed audio bitstream.
The FFmpeg command shown processes a single file, but you can batch process on the command line using a shell loop. On Linux or macOS: for f in *.y4m; do ffmpeg -i "$f" -vn -c:a ac3 -b:a 192k "${f%.y4m}.ac3"; done. On Windows PowerShell: Get-ChildItem *.y4m | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a ac3 -b:a 192k ($_.BaseName + '.ac3') }. This is particularly useful for processing Y4M files over 1GB, which exceed the browser tool's file size limit.

Technical Notes

Y4M is a minimal container format with limited metadata support — it stores basic frame rate, resolution, and colorspace information in a plain-text header, but no title, artist, or chapter metadata. As a result, no meaningful metadata will be carried into the AC3 output beyond what AC3 itself supports (which is also very limited). AC3 natively supports up to 5.1 channels (six discrete audio channels), so if your Y4M source contains a multichannel audio stream, the AC3 encoder will preserve the channel layout provided the source is compatible. However, channel counts above 5.1 are not supported by the AC3 specification and FFmpeg will downmix accordingly. The AC3 codec in FFmpeg uses fixed bitrate encoding rather than VBR, meaning '-b:a 192k' produces a constant 192kbps stream — consistent with the CBR requirement of the Dolby Digital standard. One important limitation: because Y4M is primarily used as a pipe format between applications, Y4M files with audio are relatively uncommon in practice; most Y4M files encountered in the wild are video-only, and this tool will produce no meaningful output in that case.

Related Tools