Convert Y4M to M4A — Free Online Tool

Convert Y4M (YUV4MPEG2) video files to M4A audio, extracting and encoding the audio stream as AAC at 128k bitrate inside an MPEG-4 audio container. Since Y4M is a lossless uncompressed intermediate format with no embedded audio, this tool is most useful when Y4M files are paired with a separate audio source or when stripping the video portion for downstream processing.

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 (YUV4MPEG2) is a raw, uncompressed video format that carries no audio data by design — it stores only planar YUV video frames with a simple text header, used primarily as a lossless intermediate in video processing pipelines. Because Y4M contains no audio stream, FFmpeg will produce a silent M4A file unless audio is supplied from another source. The conversion discards the raw video frames entirely (via the -vn flag), and if any audio were present, it would be encoded using the AAC codec into an MPEG-4 audio container (.m4a) — the format Apple popularized for iTunes and podcast distribution. The resulting M4A file benefits from AAC's efficient lossy compression, producing significantly smaller files suitable for playback on virtually any modern device.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that powers this conversion both in your browser (via FFmpeg.wasm/WebAssembly) and on the desktop command line.
-i input.y4m Specifies the input file — a Y4M (YUV4MPEG2) uncompressed raw video file. FFmpeg reads the YUV4MPEG2 header to determine frame dimensions, frame rate, and colorspace, though for this audio extraction workflow the video data itself is discarded.
-c:a aac Sets the audio codec to AAC (Advanced Audio Coding) using FFmpeg's built-in AAC encoder. AAC is the native codec of the M4A container and is required for maximum compatibility with Apple devices, iTunes, and podcast platforms.
-b:a 128k Sets the audio bitrate to 128 kilobits per second, which is the standard default for AAC and provides a good balance between file size and audio quality suitable for music, speech, and podcast content. Increase to 256k for higher fidelity or decrease to 96k to reduce file size.
-vn Disables video output entirely, which is essential here because M4A is an audio-only container and cannot hold video streams. This flag also discards the massive uncompressed Y4M video frame data, which would otherwise cause FFmpeg to error when trying to write video into an M4A file.
output.m4a Specifies the output filename with the .m4a extension, which tells FFmpeg to use the MPEG-4 audio container format. The .m4a extension distinguishes this as an audio-only MPEG-4 file, ensuring correct handling by iTunes, Apple Music, and most media players.

Common Use Cases

  • Extracting a silent audio placeholder or verifying audio stream absence in a Y4M file generated by a video synthesis or rendering pipeline before muxing with a separate audio track
  • Converting a Y4M file that has been muxed with an audio stream by a custom tool or wrapper into a portable M4A file for playback on Apple devices or iTunes
  • Dropping the massive uncompressed video payload from a Y4M intermediate file to produce a lightweight M4A for podcast or voiceover review when only the audio content matters
  • Archiving the audio channel of a Y4M-based screencasting or animation workflow output as an AAC-encoded M4A for long-term storage with broad compatibility
  • Preparing audio from a Y4M file produced by tools like libvpx or x264 encoding pipelines for upload to platforms like Apple Podcasts or Spotify that require M4A or AAC
  • Testing FFmpeg audio extraction commands in a local browser environment before scaling the same ffmpeg -vn workflow to large Y4M files on a desktop machine

Frequently Asked Questions

Standard Y4M (YUV4MPEG2) files do not carry audio — the format specification only defines raw planar video frames and a minimal text header with frame rate and colorspace metadata. If your Y4M was produced by a standard encoder or piping tool, the resulting M4A will be a valid but silent file. Some custom wrappers or muxers do embed audio alongside Y4M video, so it is worth inspecting your file with FFmpeg's -i flag to confirm whether an audio stream is actually present before converting.
Y4M stores every video frame as fully uncompressed raw YUV data, making file sizes enormous — a few seconds of 1080p Y4M can exceed hundreds of megabytes. The M4A output discards all of that video data entirely and encodes only the audio (if present) using AAC at 128 kbps, a highly efficient lossy codec. The size difference is almost entirely explained by removing the uncompressed video payload, not just by audio compression.
AAC at 128 kbps is a lossy codec, so yes — some audio quality is lost compared to a lossless source. However, 128 kbps AAC is considered transparent (indistinguishable from the original) for most listeners on typical audio content like speech or music. If you need lossless audio output, you could modify the FFmpeg command to use -c:a flac instead, which is also supported inside the M4A container, though FLAC in M4A has more limited player compatibility than AAC.
Replace the 128k value in the -b:a 128k flag with your desired bitrate. For example, use -b:a 256k for higher quality or -b:a 96k for a smaller file. Supported options for AAC in M4A typically range from 64k (acceptable for speech) to 320k (high fidelity music). The command would look like: ffmpeg -i input.y4m -c:a aac -b:a 256k -vn output.m4a.
Yes — on Linux or macOS, you can wrap the command in a shell loop: for f in *.y4m; do ffmpeg -i "$f" -c:a aac -b:a 128k -vn "${f%.y4m}.m4a"; done. On Windows Command Prompt, use: for %f in (*.y4m) do ffmpeg -i "%f" -c:a aac -b:a 128k -vn "%~nf.m4a". This is especially useful when processing output from a rendering pipeline that produces many Y4M intermediates. The in-browser tool handles files one at a time.
M4A with AAC encoding is natively supported on all Apple devices, iTunes, Apple Music, Apple Podcasts, Android (via built-in media players), Spotify, and most modern web browsers. It is one of the most universally compatible audio container and codec combinations available. The MPEG-4 audio container also supports chapter markers, which makes M4A a popular choice for audiobooks and podcast distribution platforms.

Technical Notes

Y4M (YUV4MPEG2) is defined by the YUV4MPEG2 header standard and stores raw planar YUV frames — most commonly in 4:2:0 colorspace — with no compression whatsoever. Because the format has no audio specification, FFmpeg will report no audio stream when you inspect a standard Y4M file. The -vn flag in the command is critical: it instructs FFmpeg to ignore or discard any video stream, which is necessary here because M4A is a pure audio container and cannot carry video. Without -vn, FFmpeg would error or warn about incompatible streams. The default AAC encoder used here is FFmpeg's native aac encoder, which produces solid quality at 128k and is universally compatible with MPEG-4 players. If you require higher fidelity, the libfdk_aac encoder (if available in your FFmpeg build) is generally considered superior to the native aac encoder. M4A technically uses the same MPEG-4 container as MP4, but the .m4a extension signals to players and operating systems that the file is audio-only. Chapter metadata is supported in M4A and can be added with third-party tools post-conversion, though this FFmpeg command does not inject chapter data. iTunes-style metadata tags (artist, album, title) can be added by appending -metadata flags to the command.

Related Tools