Convert HEVC to Y4M — Free Online Tool

Convert HEVC/H.265 video files to Y4M (YUV4MPEG2) uncompressed format directly in your browser. This conversion decodes the H.265 bitstream using libx265 and outputs raw YUV pixel data in the Y4M container, making it ideal for lossless intermediate workflows and piping into tools like FFmpeg, x265, or video analysis software.

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

HEVC (H.265) is a highly compressed codec — the decoder must reconstruct every frame from inter-frame predictions, motion vectors, and transform coefficients before any pixel data exists in memory. Converting to Y4M fully decodes the H.265 bitstream frame by frame, expanding it into raw, uncompressed YUV planar pixel data wrapped in the YUV4MPEG2 container format. The Y4M file contains a plain-text header per frame that encodes resolution, frame rate, colorspace (e.g., 4:2:0), and interlacing — making it trivially parseable by other tools. Because Y4M stores every pixel explicitly with no compression, the output file will be orders of magnitude larger than the HEVC source. No re-encoding occurs; the process is purely decode-then-dump-raw-frames.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary. In the browser this runs as FFmpeg.wasm compiled to WebAssembly; the command is identical to what you would run in a local terminal.
-i input.hevc Specifies the input file containing the HEVC/H.265 bitstream. FFmpeg will demux the raw HEVC elementary stream or container and pass it to the H.265 software decoder before any output processing begins.
-c:v rawvideo Sets the video output codec to rawvideo, which writes decoded YUV pixel data directly to the output without any re-compression. This is what produces the uncompressed Y4M frames — the H.265 decode happens implicitly on the input side, and rawvideo simply dumps the resulting frame buffers.
output.y4m Specifies the output filename with the .y4m extension. FFmpeg uses this extension to select the yuv4mpegpipe muxer, which wraps the raw YUV frames in the YUV4MPEG2 container format complete with stream and per-frame headers encoding resolution, frame rate, and colorspace.

Common Use Cases

  • Feed decoded HEVC footage into a lossless video processing pipeline (e.g., x265 re-encode with custom parameters) by piping Y4M output through stdin rather than writing intermediate files to disk.
  • Provide a clean, uncompressed source to video quality analysis tools like VMAF, SSIM, or PSNR calculators that require raw YUV or Y4M input and cannot directly decode H.265.
  • Use decoded Y4M frames as input to video filters or grain synthesis tools (e.g., in FFmpeg lavfi or VapourSynth) that need uncompressed frame data to avoid cascading compression artifacts.
  • Extract individual raw frames from an HEVC file for frame-accurate visual inspection or scientific image processing, since Y4M's per-frame header makes frame boundaries explicit and byte-addressable.
  • Prepare HEVC-encoded footage for ingestion into legacy or specialized video editing environments that do not support H.265 decoding but can read uncompressed YUV or Y4M streams.
  • Validate HEVC decoder output by converting to Y4M and comparing raw pixel values against a reference sequence to confirm bit-exact decoding behavior.

Frequently Asked Questions

HEVC is one of the most compression-efficient video codecs available, often achieving quality comparable to older formats at half the bitrate. Y4M stores every pixel of every frame in raw, uncompressed YUV form with no inter-frame prediction or entropy coding. A 1-minute 1080p HEVC file that is 50MB can expand to several gigabytes as Y4M — this is expected and is the nature of uncompressed video. The Y4M format is intended as a short-lived intermediate, not for storage or distribution.
No additional quality is lost during this conversion beyond what was already lost when the original HEVC file was encoded. The H.265 decode process is deterministic — every decoder will reconstruct the same pixel values from the same bitstream. The Y4M output is a lossless representation of those decoded frames. Any compression artifacts visible in Y4M were already present in the HEVC source.
Y4M's header supports basic colorspace signaling (e.g., 4:2:0, 4:2:2) and can carry chroma siting and interlacing flags, but it has no standardized mechanism for HDR10 metadata such as mastertring display luminance, MaxCLL, or SEI messages embedded in the HEVC bitstream. HDR metadata will be lost in the Y4M output. If you need to preserve HDR signaling for downstream processing, you should pipe the decoded frames directly through FFmpeg with explicit metadata flags rather than relying on the Y4M container.
Yes — Y4M was specifically designed for piping between applications, and this is its primary use case. On your local desktop you can run ffmpeg -i input.hevc -c:v rawvideo -f yuv4mpegpipe - | x265 --y4m - --crf 18 -o output.hevc to decode and immediately re-encode without writing an intermediate file to disk. The browser-based tool saves a file, but the displayed FFmpeg command is a starting point you can adapt for piped workflows.
By default, FFmpeg will output Y4M in the pixel format matching the decoded HEVC frames, which may be yuv420p for standard 8-bit or yuv420p10le for 10-bit HDR content. To explicitly force a pixel format, add -pix_fmt yuv420p (for 8-bit) or -pix_fmt yuv420p10le (for 10-bit) before the output filename: ffmpeg -i input.hevc -c:v rawvideo -pix_fmt yuv420p output.y4m. This is important when your downstream tool expects a specific bit depth.
The single-file command can be wrapped in a shell loop for batch processing. In Bash: for f in *.hevc; do ffmpeg -i "$f" -c:v rawvideo "${f%.hevc}.y4m"; done. On Windows Command Prompt: for %f in (*.hevc) do ffmpeg -i "%f" -c:v rawvideo "%~nf.y4m". Be aware that batch converting to Y4M will consume enormous disk space quickly due to the uncompressed output size.

Technical Notes

Y4M (YUV4MPEG2) uses a plain-text stream header followed by per-frame headers and raw planar YUV data. The stream header encodes width, height, frame rate as a ratio, interlacing mode, pixel aspect ratio, and colorspace tag — all of which FFmpeg populates automatically from the decoded HEVC stream. The rawvideo codec in FFmpeg is simply a passthrough that writes decoded frame buffers directly to the output container without any compression step. One notable limitation is that Y4M does not support audio — HEVC files that contain an audio track will have audio silently dropped in this conversion, since Y4M has no audio container infrastructure. Similarly, Y4M cannot carry subtitle streams, chapter markers, or attached metadata beyond the basic frame header fields. For 10-bit or 12-bit HEVC sources (common in HDR content), FFmpeg will preserve the bit depth in the Y4M output if the pixel format is not overridden, resulting in yuv420p10le or similar. Downstream tools must explicitly support high-bit-depth Y4M to consume these files correctly. Because HEVC decoding is computationally intensive and Y4M files are very large, browser-based processing of long or high-resolution HEVC files will be slower and more memory-constrained than desktop FFmpeg; files over 1GB should be processed using the displayed command locally.

Related Tools