Extract Audio from Y4M to AU — Free Online Tool
Extract audio from a Y4M (YUV4MPEG2) video file and save it as a Sun AU file encoded with 16-bit big-endian PCM. Y4M files are lossless uncompressed video containers typically used in video processing pipelines — this tool strips the raw video stream and packages any embedded audio into the classic Unix AU format.
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 headerless, uncompressed video format primarily used as an intermediate format for piping raw video between tools like FFmpeg, x264, and VapourSynth. It stores raw YUV pixel data and, less commonly, audio. When extracting audio, FFmpeg discards the entire uncompressed video stream entirely (using -vn) and re-encodes — or in many cases directly maps — the audio into the AU container using the pcm_s16be codec (signed 16-bit PCM, big-endian byte order). AU is a straightforward container with a minimal header, so no complex muxing occurs: the output is essentially a stream of raw PCM samples wrapped in Sun's legacy audio envelope. Because both the source audio and the target codec are PCM-based, the conversion is lossless — no audio quality is lost in the process.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool. In the browser-based version of this tool, FFmpeg runs locally via WebAssembly (ffmpeg.wasm) — your file never leaves your device. |
-i input.y4m
|
Specifies the input file in Y4M (YUV4MPEG2) format. FFmpeg reads the uncompressed raw video frames and any embedded audio stream from this file. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore the raw YUV video stream in the Y4M file. Since Y4M video is uncompressed and very large, excluding it is essential — the AU format cannot contain video anyway. |
-c:a pcm_s16be
|
Sets the audio codec to signed 16-bit big-endian PCM, which is the standard and default encoding for Sun AU files. This matches the byte order expected by Unix and Java AU implementations and produces lossless audio output. |
output.au
|
Specifies the output filename with the .au extension, which tells FFmpeg to write the result as a Sun AU container. The minimal AU header will include the sample rate, channel count, and encoding type derived from the source audio. |
Common Use Cases
- Extracting a narration or voice-over track from a Y4M intermediate file produced by a lossless video editing pipeline for use in a Unix-based audio processing workflow
- Capturing audio from a Y4M file generated by a screen-capture or scientific visualization tool that pipes raw frames, in order to archive or analyze the audio separately
- Producing AU audio files for use with legacy Unix applications, Java applets, or Sun workstation software that specifically requires the .au format
- Isolating a PCM audio track from a Y4M file used in an ffmpeg pipe chain, so it can be inspected or compared against the original audio source without recompressing it
- Converting Y4M files with embedded audio into AU format for use in early internet or retro computing contexts where AU was the dominant streaming audio format
- Extracting raw PCM audio from a Y4M lossless intermediate for further processing in audio editors that accept Sun AU as an input format, such as Audacity or SoX
Frequently Asked Questions
No — this conversion is fully lossless. Y4M files store uncompressed video, and any audio they carry is typically uncompressed PCM. The AU output uses pcm_s16be (signed 16-bit big-endian PCM), which is a lossless representation. As long as the source audio is already at or below 16-bit depth, no quality is lost whatsoever. If the source audio were at 24-bit depth, you would lose some dynamic range precision in the downcast, but this is an uncommon scenario for Y4M files.
Y4M is primarily a video-only format used in processing pipelines, and it very often contains no audio stream at all. If FFmpeg reports 'Output file is empty, nothing was encoded' or produces a near-zero-byte AU file, your Y4M source simply has no audio track embedded. This is normal for Y4M files created by tools like VapourSynth or raw video encoders that pipe only video. You would need to source the audio separately.
pcm_s16be stands for signed 16-bit PCM with big-endian byte ordering. It is the default and most widely compatible audio codec for the Sun AU format, matching the byte order that Sun's SPARC-based systems originally used. It produces uncompressed audio suitable for playback on Unix systems, Java environments, and legacy software. If you need a different encoding within AU — such as G.711 mu-law (pcm_mulaw) or A-law (pcm_alaw) for telephony use — you can modify the -c:a flag in the FFmpeg command shown on this page.
Yes. The AU format supports several codecs beyond pcm_s16be, including pcm_s8, pcm_u8, pcm_alaw, and pcm_mulaw. To use G.711 mu-law encoding (common in telephony), replace '-c:a pcm_s16be' with '-c:a pcm_mulaw' in the command. Note that mu-law and A-law are lossy companded encodings, while pcm_s16be, pcm_s8, and pcm_u8 are all lossless PCM variants. The AU format does not support bitrate-based quality settings the way compressed formats do; quality is determined by your choice of codec and sample rate.
The command shown converts a single file, but you can batch process on the command line using a shell loop. On Linux or macOS, run: for f in *.y4m; do ffmpeg -i "$f" -vn -c:a pcm_s16be "${f%.y4m}.au"; done. On Windows PowerShell, use: Get-ChildItem *.y4m | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a pcm_s16be ($_.BaseName + '.au') }. This is particularly useful for processing large batches of Y4M files from a rendering or video pipeline.
Y4M files are notoriously large because they store raw, uncompressed YUV video frames — a few seconds of Y4M video can easily be several gigabytes. The resulting AU file will be vastly smaller because it contains only the audio stream, which is a tiny fraction of the total data. For example, a 1GB Y4M file with one minute of stereo 44.1kHz audio would produce an AU file of roughly 10MB. The audio size itself is determined by sample rate, bit depth, and duration — not the size of the Y4M source.
Technical Notes
Y4M (YUV4MPEG2) is a format designed for lossless video interchange and piping, not as a delivery container, and its audio support is minimal and rarely used in practice. Most Y4M files produced by tools like VapourSynth, raw2y4m, or FFmpeg pipe operations contain no audio at all. When audio is present, it is typically raw PCM. The Sun AU format has a simple fixed-size or extensible header followed by raw audio data, making it well-suited for streaming and Unix toolchain integration. The default codec pcm_s16be matches the big-endian architecture of Sun's original hardware and is the most universally recognized AU encoding. AU does not support metadata tags, album art, chapters, or multiple audio tracks, so none of these will be present in the output regardless of what the source contained. Sample rate and channel count are preserved from the source audio. The AU format is natively supported in Java (javax.sound.sampled) and tools like SoX and Audacity, making it useful in specific technical contexts, though it has been largely superseded by WAV and FLAC for general audio storage.