Extract Audio from Y4M to AIF — Free Online Tool
Extract audio from a Y4M (YUV4MPEG2) video file and save it as a lossless AIF file using PCM 16-bit big-endian encoding. Since Y4M is an uncompressed intermediate format primarily used in video pipelines, this tool lets you pull out any embedded audio track and preserve it at full quality in Apple's native lossless audio container.
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 designed for lossless inter-application piping rather than final delivery. When a Y4M file contains an audio track, that audio is typically stored as uncompressed PCM. This tool discards the raw video stream entirely using FFmpeg's -vn flag, then re-encodes the audio into PCM 16-bit big-endian (pcm_s16be), which is the native codec of the AIF container format. Because both the source and destination audio representations are uncompressed PCM, this is effectively a lossless remux of the audio data into Apple's AIF wrapper — no audio quality is lost in the process.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool, which powers this browser-based conversion through its WebAssembly build (FFmpeg.wasm). The same binary handles the conversion both in the browser and when run locally on your desktop. |
-i input.y4m
|
Specifies the input Y4M file. FFmpeg reads the raw YUV4MPEG2 video stream and any accompanying audio stream from this uncompressed intermediate format file. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore the raw video stream from the Y4M file. Since Y4M video frames are uncompressed and very large, this flag ensures only the audio track is written to the AIF output. |
-c:a pcm_s16be
|
Encodes the output audio as 16-bit signed PCM in big-endian byte order, which is the native and required codec for AIF files. This matches Apple's AIFF specification and ensures the file will open correctly in Logic Pro, GarageBand, and any other AIFF-compatible application. |
output.aif
|
Specifies the output filename and format. The .aif extension tells FFmpeg to wrap the pcm_s16be audio stream in an Audio Interchange File Format container, producing a lossless uncompressed audio file ready for use in Apple's software ecosystem or professional audio applications. |
Common Use Cases
- Extracting a reference audio track from a Y4M file produced by a lossless video encoding pipeline, such as those generated by ffmpeg pipe workflows or tools like AviSynth and VapourSynth.
- Saving the audio from a Y4M intermediate file in AIF format for import into Apple Logic Pro, GarageBand, or Final Cut Pro, which prefer or natively handle AIF files on macOS.
- Archiving the audio component of a Y4M capture separately from the bulky uncompressed video, reducing storage while retaining full audio fidelity in a widely recognized format.
- Isolating a clean, uncompressed audio stem from a Y4M file used in a film or broadcast production pipeline, ready for delivery to an audio post-production team.
- Pulling audio out of a Y4M test file used in codec benchmarking or quality analysis workflows, where the audio needs to be reviewed or logged independently of the video.
- Converting a Y4M file's audio to AIF so it can be burned to a CD or used with hardware devices and DAWs that require standard big-endian PCM audio in an AIFF container.
Frequently Asked Questions
The Y4M format specification has limited and inconsistent audio support across applications. Many Y4M files generated by tools like VapourSynth or ffmpeg piping workflows contain no audio track at all, since Y4M was designed primarily as a raw video container for lossless video data. If you run this tool on a Y4M file with no audio stream, FFmpeg will produce an empty or invalid AIF file. You can verify whether your Y4M file contains audio by checking the FFmpeg output log for an audio stream before attempting extraction.
No, provided your Y4M file's audio is stored as uncompressed PCM. The output AIF file uses pcm_s16be (16-bit big-endian PCM), which is a lossless format. If the source audio in the Y4M file is already 16-bit PCM, this conversion is a bit-perfect transwrap with no quality degradation. If the source audio is at a higher bit depth such as 24-bit or 32-bit, there will be a downward conversion to 16-bit, which involves bit-depth reduction — you can avoid this by modifying the FFmpeg command to use pcm_s24be or pcm_s32be instead.
AIF (Audio Interchange File Format) is Apple's native lossless audio container and uses big-endian PCM encoding, making it the preferred format for professional audio work on macOS and within Apple's software ecosystem including Logic Pro and Final Cut Pro. WAV uses little-endian PCM and is more common on Windows, while FLAC uses lossless compression. AIF is the right choice when you need uncompressed, full-fidelity audio that integrates seamlessly with Apple tools or hardware samplers and synthesizers that expect AIFF files.
Replace pcm_s16be in the command with another supported AIF codec to change the bit depth. For 24-bit audio use pcm_s24be, for 32-bit integer use pcm_s32be, for 32-bit float use pcm_f32be, and for 64-bit float use pcm_f64be. For example: ffmpeg -i input.y4m -vn -c:a pcm_s24be output.aif. If your source audio was recorded at 24-bit depth, using pcm_s24be will preserve the original resolution without any truncation.
Yes, you can adapt the command into a shell loop for batch processing on your desktop. On Linux or macOS, use: for f in *.y4m; do ffmpeg -i "$f" -vn -c:a pcm_s16be "${f%.y4m}.aif"; done. On Windows PowerShell, use: Get-ChildItem *.y4m | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a pcm_s16be ($_.BaseName + '.aif') }. This is particularly useful given the large file sizes typical of Y4M files, where batch processing through the browser tool would be impractical.
This is expected and intentional. Y4M stores raw, uncompressed video frames, which makes video files extremely large — a few seconds of Y4M video can easily be several gigabytes. By extracting only the audio track and discarding the video entirely with -vn, you are keeping only a tiny fraction of the original file's data. The resulting AIF file contains only the PCM audio stream, which is dramatically smaller than the uncompressed video frames that dominated the Y4M file's size.
Technical Notes
Y4M files store video as raw YUV pixel data with no compression, making them unusually large but perfectly suited for lossless video processing pipelines. Audio support in Y4M is non-standard and tool-dependent — not all Y4M files will contain an audio stream, and the bit depth or sample rate of any embedded audio will vary by source. The output AIF format uses pcm_s16be by default, meaning 16-bit signed integer samples in big-endian byte order, which matches the AIFF specification's native encoding. AIF does not support metadata fields like embedded album art or chapter markers, but standard tags such as title and artist can be preserved if present in the source. Because both formats are uncompressed, there is no codec decompression overhead during extraction — the operation is fast and CPU-light. Users working with 24-bit or 32-bit source audio should adjust the -c:a flag to pcm_s24be or pcm_s32be respectively to avoid unnecessary bit-depth reduction. The -b:a bitrate flag is not meaningful for PCM codecs and should not be used in this context, as PCM audio bitrate is determined solely by sample rate and bit depth.