Extract Audio from Y4M to AIFF — Free Online Tool

Extract audio from a Y4M (YUV4MPEG2) video file and save it as a lossless AIFF file using PCM 16-bit big-endian encoding. Since Y4M is an uncompressed intermediate format rarely carrying embedded audio, this tool isolates whatever audio stream exists and packages it into Apple's professional-grade AIFF container — perfect for macOS workflows requiring uncompressed audio fidelity.

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 a raw, uncompressed video format designed primarily as a lossless intermediate for piping between video processing tools — it carries rawvideo as its only video codec and rarely includes an audio stream. When a Y4M file does contain audio, this conversion discards the raw video stream entirely and re-encodes the audio as PCM signed 16-bit big-endian (pcm_s16be), writing it into an AIFF container. Since both the source audio and AIFF use uncompressed PCM representations, the process is essentially a sample-format repack with no perceptual quality loss — the audio data is preserved with full fidelity. AIFF uses big-endian byte ordering by Apple convention, which pcm_s16be directly satisfies without any sample-rate or bit-depth conversion unless the source differs.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles demuxing the Y4M container, decoding the audio stream, and encoding it into AIFF format.
-i input.y4m Specifies the input Y4M file. FFmpeg reads the YUV4MPEG2 container, which may contain a raw uncompressed video stream and optionally an audio stream that will be extracted.
-vn Disables video output entirely, discarding the rawvideo stream from the Y4M file. This is essential because AIFF is an audio-only container and cannot hold video data.
-c:a pcm_s16be Encodes the output audio as signed 16-bit big-endian PCM, the standard and most compatible codec for the AIFF format. Big-endian byte ordering is required by the AIFF specification, and 16-bit depth covers CD-quality audio while maintaining full lossless fidelity.
output.aiff Specifies the output filename with the .aiff extension, which tells FFmpeg to write an Audio Interchange File Format container — Apple's professional uncompressed lossless audio format, natively supported across macOS and most DAWs.

Common Use Cases

  • Extracting a voiceover or sync audio track from a Y4M intermediate file produced by a lossless video processing pipeline, so it can be imported into Logic Pro or GarageBand on macOS.
  • Archiving the audio component of a Y4M master file separately as a standalone AIFF for long-term preservation alongside other professional audio assets.
  • Isolating audio from a Y4M file generated by a tool like VapourSynth or AviSynth that also piped in an audio stream, for use in a DAW that natively reads AIFF.
  • Preparing a reference audio track from a Y4M quality-check render to compare timing and sync against a separately encoded video file.
  • Delivering an uncompressed AIFF audio file to a post-production studio that requires Apple-native lossless audio, sourced from a Y4M intermediate in a Linux-based encoding workflow.
  • Separating audio from a Y4M file before re-muxing the video into a different container, keeping the audio as a lossless AIFF backup before any lossy encoding step.

Frequently Asked Questions

Y4M (YUV4MPEG2) was originally designed as a raw video-only format for piping uncompressed frames between applications, and in the vast majority of cases it carries no audio stream at all. However, some extended implementations and tools do embed an audio track alongside the raw video frames. If your Y4M file has no audio stream, FFmpeg will produce an empty or errored AIFF file — you can check for an audio stream first by running 'ffprobe input.y4m' and looking for an audio stream in the output.
No, there is no perceptual quality loss. AIFF with pcm_s16be is an uncompressed lossless format, and if the source audio in the Y4M file is already 16-bit PCM, the conversion is a direct repack of the audio samples into a new container. If the source audio is at a higher bit depth (e.g., 24-bit), FFmpeg will dither it down to 16-bit, which is the only transformation that occurs. In that case, you can modify the command to use pcm_s24be or pcm_s32be to preserve the original bit depth.
AIFF requires big-endian PCM encoding by specification, and pcm_s16be (signed 16-bit big-endian PCM) is the format's default and most compatible codec. Simply specifying the output as .aiff already implies this codec, but making it explicit ensures predictable behavior regardless of the source audio format. Using '-c:a copy' would only work if the Y4M file's audio stream is already encoded in a format AIFF can contain, which is uncommon — explicitly specifying pcm_s16be guarantees a valid, playable AIFF file.
Replace '-c:a pcm_s16be' with your desired PCM codec: use 'pcm_s24be' for 24-bit (common in professional audio), 'pcm_s32be' for 32-bit integer, 'pcm_f32be' for 32-bit float, or 'pcm_f64be' for 64-bit float — all of which AIFF supports. For example, the command becomes: ffmpeg -i input.y4m -vn -c:a pcm_s24be output.aiff. Higher bit depths increase file size proportionally but preserve more dynamic range headroom from the source.
Yes. On Linux or macOS, you can loop over files in a shell: 'for f in *.y4m; do ffmpeg -i "$f" -vn -c:a pcm_s16be "${f%.y4m}.aiff"; done'. On Windows Command Prompt, use: 'for %f in (*.y4m) do ffmpeg -i "%f" -vn -c:a pcm_s16be "%~nf.aiff"'. This is especially useful since Y4M files are often produced in bulk by batch video processing scripts.
The AIFF output will be dramatically smaller than the Y4M source because Y4M stores raw uncompressed video frames, which dominate file size — a single minute of 1080p Y4M video can exceed several gigabytes, while the same minute of stereo audio at 16-bit/44.1kHz AIFF is only about 10MB. The AIFF file size depends solely on audio duration, sample rate, bit depth, and channel count, completely independent of the video resolution that inflated the Y4M source.

Technical Notes

Y4M files store raw YUV video frames with no compression, making them enormous but lossless — they are almost exclusively used as intermediates in encoding pipelines (e.g., output from x264 or VapourSynth in lossless mode). Audio support in Y4M is not part of the original spec and is inconsistently implemented across tools, so always verify with ffprobe that your Y4M file actually contains an audio stream before running the conversion. The output AIFF uses pcm_s16be — Apple's standard for AIFF — which is natively readable by macOS Core Audio, Logic Pro, Pro Tools, Audacity, and virtually all professional DAWs. AIFF does not support chapters, embedded subtitles, or multiple audio tracks, so if the Y4M source contained multiple audio streams, only the first will be extracted. Metadata (title, artist tags) from the Y4M source is unlikely to be present given Y4M's minimal header structure, so the output AIFF will typically have no embedded metadata beyond technical stream parameters.

Related Tools