Extract Audio from Y4M to AAC — Free Online Tool

Extract audio from a Y4M (YUV4MPEG2) video file and save it as an AAC file encoded at 128 kbps. Y4M is a raw, uncompressed intermediate format used in video processing pipelines — this tool pulls any embedded audio stream and encodes it into AAC, the widely compatible lossy format used by Apple, YouTube, and most streaming platforms.

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 is an uncompressed raw video container primarily used as an intermediate format for piping between tools like FFmpeg, x264, and video encoders — it stores raw YUV video frames with no compression. Because Y4M carries no video codec complexity, FFmpeg skips video decoding entirely (via the -vn flag) and focuses solely on the audio stream. That audio stream is then encoded using FFmpeg's native AAC encoder at 128 kbps, producing a standalone .aac file. Note that Y4M files often contain no audio at all, since the format is most commonly used for pure video data in encoding pipelines — if your Y4M file has no audio stream, the conversion will produce an error or empty output.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the same underlying engine that powers this browser tool via FFmpeg.wasm compiled to WebAssembly. Running this command locally on your desktop produces identical output.
-i input.y4m Specifies the input Y4M file. FFmpeg reads the plain-text YUV4MPEG2 header to determine frame dimensions, frame rate, and color space, then scans for any audio stream alongside the raw video frames.
-vn Disables video output entirely, telling FFmpeg to ignore the raw YUV video frames in the Y4M file. Since the goal is audio extraction, this prevents FFmpeg from attempting to encode or pass through the large uncompressed video stream, which would either fail or bloat the output.
-c:a aac Selects FFmpeg's built-in native AAC encoder to compress the audio stream. This produces AAC-LC (Low Complexity) output, the most universally compatible AAC profile, supported by iOS, Android, iTunes, and all major streaming platforms.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second — the standard default that balances file size and audio quality for stereo content. You can raise this to 192k or 256k for higher fidelity, or lower it to 96k for voice-only content where bandwidth is a concern.
output.aac Specifies the output filename with a .aac extension, which tells FFmpeg to write a raw AAC bitstream file. This is an unwrapped AAC stream without an MP4 or M4A container — rename it to .m4a and remux into MP4 if you need metadata support or iTunes compatibility.

Common Use Cases

  • Extracting a narration or voiceover track from a Y4M file that was captured as part of a lossless video processing workflow, to use the audio independently in a podcast or video project.
  • Pulling audio from a Y4M intermediate file generated by a screen capture or animation pipeline so it can be delivered separately as an AAC file for use in iOS or Apple ecosystem apps.
  • Isolating audio from a Y4M file used in a video encoding chain (e.g., output from avisynth or vapoursynth) to verify the audio content before encoding the full video.
  • Converting raw audio carried within a Y4M test file — such as one generated for codec benchmarking or quality testing — into a portable AAC format for playback on mobile devices.
  • Archiving the audio component from a Y4M source file separately before discarding the large uncompressed video data, since Y4M files are often several gigabytes even for short clips.

Frequently Asked Questions

Y4M (YUV4MPEG2) technically supports an audio stream, but in practice the vast majority of Y4M files contain no audio whatsoever. The format is designed primarily as a raw video pipe format — tools like x264, FFmpeg, and VapourSynth use it to pass uncompressed video frames between processes, and audio is typically handled separately. If you attempt this conversion on a Y4M file with no audio stream, FFmpeg will return an error indicating no audio stream was found.
Yes — AAC is a lossy format, so encoding to AAC at 128 kbps introduces compression artifacts compared to the original uncompressed audio. However, if the source audio in the Y4M file was already captured at normal listening quality (e.g., 44.1 kHz stereo speech or music), 128 kbps AAC is generally transparent for most listeners. If you need archival quality, consider using a lossless output format like FLAC instead, since the Y4M source carries uncompressed audio.
Change the value after the -b:a flag in the command. For example, use -b:a 192k for higher quality or -b:a 96k for a smaller file size. For music or high-fidelity content, 192k or 256k AAC is recommended. For voice-only content like speech or podcasts, 96k or even 64k AAC is typically sufficient and produces a much smaller file.
Yes — if your FFmpeg build includes libfdk_aac (it is not included in standard FFmpeg binaries due to licensing), you can replace -c:a aac with -c:a libfdk_aac in the command. The libfdk_aac encoder is widely considered to produce better-sounding AAC output than FFmpeg's native aac encoder, especially at lower bitrates like 96k or below. The browser-based tool here uses FFmpeg.wasm which typically includes only the native aac encoder.
Y4M stores raw, uncompressed YUV video frames — even a few seconds of video at 1080p can be several gigabytes because every pixel value is stored without any compression. The AAC output contains only the audio stream encoded at 128 kbps, which is a tiny fraction of the total Y4M file size. This size difference is entirely expected and reflects the extreme nature of uncompressed video data versus compressed audio.
The command shown is for a single file, but you can batch process on your desktop using a shell loop. On Linux or macOS: for f in *.y4m; do ffmpeg -i "$f" -vn -c:a aac -b:a 128k "${f%.y4m}.aac"; done. On Windows PowerShell: Get-ChildItem *.y4m | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a aac -b:a 128k ($_.BaseName + '.aac') }. The browser tool processes one file at a time, making the desktop FFmpeg command especially useful for bulk workflows.

Technical Notes

Y4M (YUV4MPEG2) is a minimalist container spec that stores raw planar YUV video with a plain-text header — it has no notion of compression, seeking indexes, or rich metadata, and its audio support is rudimentary and rarely used in real-world files. When FFmpeg reads a Y4M file, it uses the rawvideo decoder for the video stream and passes any audio stream through to the encoder stage. The -vn flag suppresses the video entirely, so no video decoding overhead occurs. FFmpeg's native aac encoder (used here) is a solid general-purpose encoder that produces standards-compliant MPEG-4 AAC-LC output. The resulting .aac file is a raw AAC bitstream — not wrapped in an MP4 or M4A container — which means it lacks an ID3 or MP4 metadata container, so embedding title, artist, or album tags requires an additional muxing step into an M4A container. For broad compatibility (iTunes, iOS, Android, YouTube), AAC-LC at 128 kbps in an M4A wrapper is ideal, but the raw .aac file will play correctly in most modern media players. If the Y4M source has no audio stream — which is the common case — FFmpeg will exit with an error and produce no output file.

Related Tools