Convert Y4M to CAF — Free Online Tool
Convert Y4M (YUV4MPEG2) video files to CAF (Core Audio Format) by extracting and encoding the audio stream as uncompressed PCM audio in Apple's extensible container. This is useful when you need Apple-compatible audio output from an intermediate video pipeline — CAF's support for large file sizes and high-resolution audio makes it a strong choice for professional macOS and iOS 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 format used almost exclusively as an intermediate format — it carries rawvideo frames and, if present, an audio stream. During this conversion, FFmpeg discards the raw video data entirely and targets only the audio stream. The audio is encoded using PCM signed 16-bit little-endian (pcm_s16le), which is uncompressed linear PCM, and wrapped in Apple's Core Audio Format (CAF) container. Because Y4M audio is typically already raw PCM, this is effectively a remux with minor format wrapping rather than a lossy transcode, preserving full audio fidelity. CAF was designed to overcome the 4GB file size limit of AIFF and WAV, making it suitable for very long or high-sample-rate audio sessions.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary. In this browser tool, this runs as FFmpeg.wasm compiled to WebAssembly, executing entirely client-side without any server upload. |
-i input.y4m
|
Specifies the input Y4M file. FFmpeg reads the YUV4MPEG2 container, identifying the rawvideo stream and any audio stream present. Y4M files are typically very large due to being uncompressed. |
-c:a pcm_s16le
|
Sets the audio codec to signed 16-bit little-endian PCM, which is uncompressed linear audio. This is the default and most compatible PCM format for CAF and is natively supported by Apple's Core Audio framework on macOS and iOS. |
-b:a 128k
|
Specifies a target audio bitrate of 128 kbps. For the pcm_s16le codec used here this flag has no effect — uncompressed PCM bitrate is determined entirely by sample rate and channel count — but it would apply if you switched to a compressed codec like AAC or libopus. |
output.caf
|
Defines the output file as a CAF (Core Audio Format) container. FFmpeg infers the CAF format from the .caf extension and writes the PCM audio stream into Apple's extensible chunk-based container, which supports files larger than 4GB unlike WAV or AIFF. |
Common Use Cases
- Extracting reference audio from a Y4M intermediate file produced by a video processing pipeline (e.g., after ffmpeg or libav piping chains) for use in Logic Pro or GarageBand on macOS.
- Archiving the audio component of a lossless Y4M master in a format natively supported by Apple's Core Audio APIs, ensuring compatibility with macOS and iOS audio toolchains.
- Generating large, uncompressed PCM audio files in CAF format from long Y4M recordings where WAV or AIFF's 4GB limit would be exceeded.
- Supplying a CAF audio file as an input asset to Xcode or an iOS/macOS app project, derived from a Y4M source produced by a lossless video encoding tool like x264 in lossless mode or a video synthesis tool.
- Separating audio from a Y4M file produced by a scientific or broadcast video tool to perform standalone audio analysis in a macOS-native audio application.
- Creating a high-fidelity PCM audio master in CAF from a Y4M intermediate before further lossy encoding steps, preserving full quality at the extraction stage.
Frequently Asked Questions
Y4M (YUV4MPEG2) is primarily a raw video format and most Y4M files do not contain an audio stream — the format was originally designed for lossless video piping between tools. If your Y4M file has no audio track, FFmpeg will either produce an empty or invalid CAF file, or throw an error. You should confirm that your Y4M source actually carries audio before running this conversion; if it does not, you would need to combine it with a separate audio source first.
If the source audio in your Y4M file is already 16-bit PCM, there is no quality loss — the data is effectively rewrapped into the CAF container without re-encoding. However, if the source audio is higher bit-depth (e.g., 24-bit or 32-bit float), encoding to pcm_s16le will reduce bit depth and introduce quantization, which is technically a lossy step. In that case, you could modify the FFmpeg command to use pcm_s24le or pcm_f32le instead to preserve full bit depth, since CAF supports those codecs.
CAF removes the 4GB file size ceiling that affects both WAV and AIFF, which matters when extracting audio from long Y4M files at high sample rates or bit depths. CAF also supports a wider range of audio codecs within a single container and is natively supported across all Apple platforms. If your Y4M source is a lengthy recording — common in broadcast or scientific use cases — CAF is safer than WAV for guaranteed file integrity.
The default command uses pcm_s16le, which is uncompressed and ignores the -b:a bitrate flag (bitrate is determined by sample rate and bit depth for PCM). To use a compressed codec instead, replace '-c:a pcm_s16le' with a supported CAF codec such as '-c:a aac -b:a 192k' for AAC or '-c:a flac' for lossless FLAC compression. CAF also supports libopus, libvorbis, pcm_s24le, pcm_s32le, and pcm_f32le, giving you flexibility depending on your downstream requirements.
Yes. On macOS or Linux you can use a shell loop: 'for f in *.y4m; do ffmpeg -i "$f" -c:a pcm_s16le "${f%.y4m}.caf"; done'. On Windows PowerShell, use 'Get-ChildItem *.y4m | ForEach-Object { ffmpeg -i $_.FullName -c:a pcm_s16le ($_.BaseName + ".caf") }'. This is especially relevant for Y4M files over 1GB, which exceed the browser tool's limit but work fine with the desktop FFmpeg command.
Yes. CAF with pcm_s16le audio is fully supported by Apple's Core Audio framework, meaning it will play natively in QuickTime Player on macOS and is readable by iOS audio APIs. However, some third-party media players on non-Apple platforms may not support CAF, so if you need broad cross-platform compatibility you might prefer WAV — but for Apple ecosystem workflows, CAF is the native and recommended container.
Technical Notes
Y4M carries video as uncompressed YUV frames using the rawvideo codec, and audio support in Y4M is minimal and not universally implemented — many tools that write Y4M omit audio entirely. When audio is present, it is typically raw PCM. The FFmpeg command maps the audio stream to pcm_s16le inside a CAF container, discarding all video data. CAF's internal structure uses chunk-based layout similar to AIFF but without the 32-bit size field limitation, allowing files beyond 4GB — critical for high-sample-rate or multichannel audio over long durations. The -b:a 128k flag in the command is technically meaningless for pcm_s16le since uncompressed PCM bitrate is fixed by sample rate and channel count, not a target bitrate parameter; it will be ignored by FFmpeg. No metadata from the Y4M header (such as frame rate or pixel format) is carried into the CAF output since CAF is audio-only. If your Y4M file was produced by a tool that encodes audio as floating-point or 24-bit, be aware that the default pcm_s16le output will truncate bit depth — inspect your source with 'ffprobe input.y4m' before converting if fidelity is critical.