Convert Y4M to OGG — Free Online Tool

Convert Y4M (YUV4MPEG2) uncompressed video files to OGG audio using Vorbis encoding. This tool extracts and encodes the audio stream from a raw Y4M intermediate file into an open-format OGG container — useful in lossless video pipelines where you need a standalone, distributable audio output.

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 headerless, uncompressed raw video format commonly used as an intermediate in video processing pipelines — it carries no compressed video codec and typically no audio metadata. When converting to OGG, FFmpeg reads the raw stream from the Y4M file and encodes any available audio using the libvorbis codec (Vorbis), storing it in an OGG container. Because Y4M contains no video codec data that OGG supports, the video component is effectively discarded and only the audio survives in the output. The Vorbis encoder applies lossy compression at quality level 4 (out of 10), which targets roughly 128–160 kbps and is well-suited for general listening use.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles demuxing the Y4M input, decoding its raw streams, encoding to Vorbis, and muxing into the OGG container.
-i input.y4m Specifies the input Y4M file. FFmpeg will detect the YUV4MPEG2 format automatically, reading uncompressed rawvideo frames and any accompanying audio stream from this file.
-c:a libvorbis Selects the libvorbis encoder for the audio stream, producing Vorbis-encoded audio inside the OGG container. Vorbis is the native and most widely compatible audio codec for OGG files.
-q:a 4 Sets the Vorbis variable bitrate quality level to 4 on a scale of 0–10, targeting approximately 128–160 kbps. This is a sensible general-purpose quality setting balancing file size and audio fidelity for the OGG output.
output.ogg Defines the output filename and tells FFmpeg to use the OGG container format. The .ogg extension causes FFmpeg to mux the Vorbis audio stream into a standard Xiph.Org OGG container.

Common Use Cases

  • Extracting a clean audio track from a Y4M intermediate file produced by a video processing pipeline (e.g., after passing through AviSynth or VapourSynth) to produce a standalone OGG audio file for distribution.
  • Converting raw uncompressed Y4M captures from screen recording or video synthesis tools into compressed OGG audio for use in open-source games or web applications that require the Vorbis format.
  • Archiving the audio component of a Y4M lossless master as an OGG/Vorbis file for space-efficient long-term storage while preserving reasonable audio fidelity.
  • Preparing OGG audio assets from Y4M source files for use in HTML5 web projects, where OGG/Vorbis has broad browser support as an open and royalty-free format.
  • Separating voice or soundtrack audio from Y4M files used in animation or motion graphics pipelines to deliver audio independently to sound editors or clients.
  • Producing OGG chapter-tagged audio files from Y4M sources for podcast or audiobook distribution, taking advantage of OGG's native chapter support.

Frequently Asked Questions

Y4M files can technically carry audio data, but in practice most Y4M files produced by tools like FFmpeg, VapourSynth, or AviSynth contain video only with no audio stream. If your Y4M file has no audio track, the resulting OGG file will be empty or FFmpeg will throw a warning about no audio streams being found. Always verify your Y4M source contains audio before expecting a valid OGG output.
OGG is fundamentally an audio container — while Theora video technically exists in the OGG ecosystem, this tool targets audio-only OGG output using Vorbis. Y4M's rawvideo stream is incompatible with standard OGG audio containers, so the video component is dropped. If you need the video preserved, consider converting to a format like WebM or OGV that supports Theora video.
The quality of the Vorbis encoder is controlled by the -q:a flag, which accepts values from 0 (lowest, ~64 kbps) to 10 (highest, ~500 kbps). The default used here is 4, which targets approximately 128–160 kbps. To increase quality, change -q:a 4 to -q:a 6 or higher — for example: ffmpeg -i input.y4m -c:a libvorbis -q:a 6 output.ogg. For near-transparent audio quality, -q:a 8 or above is commonly recommended.
Yes — OGG supports multiple audio codecs including Opus and FLAC in addition to Vorbis. To use Opus (which offers better quality-per-bit at low bitrates), replace -c:a libvorbis with -c:a libopus and use -b:a instead of -q:a (e.g., -b:a 128k). For lossless output, use -c:a flac. The resulting file will still use the .ogg container. Note that Opus in OGG has slightly different compatibility than Vorbis on older players.
Y4M has no support for chapters or metadata tags, so no chapter information exists in the source file to carry over. However, the OGG container itself natively supports chapters and metadata, meaning you could add chapter markers manually using a tool like FFmpeg metadata injection or a tag editor after conversion. The conversion itself will not generate chapters automatically.
Y4M is an uncompressed raw format, so Y4M files are extremely large relative to their content. The OGG/Vorbis output will be dramatically smaller because Vorbis applies lossy compression — a Y4M file of several gigabytes may yield an OGG audio file of only a few megabytes. The compression ratio depends on audio duration and quality setting, but the size reduction from uncompressed Y4M to compressed Vorbis is typically orders of magnitude.

Technical Notes

Y4M (YUV4MPEG2) is designed as a lossless intermediate format for piping raw video data between tools — it encodes frames in planar YUV colorspace with no inter-frame compression and no audio codec. Because OGG is an audio-first container with no meaningful support for rawvideo streams, FFmpeg will discard the Y4M video plane entirely and attempt to mux only the audio into the OGG output using libvorbis. The Vorbis encoder is a mature, royalty-free lossy codec well-supported across Linux, browsers, and open-source media players, though it has largely been superseded by Opus for new projects. Quality mode (-q:a) is a variable bitrate mode that adapts encoding complexity to the signal — unlike CBR, it does not guarantee a specific bitrate. One notable limitation of this conversion is that if the Y4M file was generated without audio (which is common in purely video-oriented pipelines), FFmpeg will produce no valid audio output. OGG's chapter support and metadata tag capabilities are preserved in the container structure even after conversion, though no metadata will be populated from the Y4M source since that format carries none.

Related Tools