Convert Y4M to MOD — Free Online Tool

Convert Y4M (YUV4MPEG2) uncompressed video files to MOD format using H.264 video encoding and AAC audio, producing camcorder-compatible MPEG-PS container files directly in your browser. This conversion compresses raw planar YUV pixel data into a highly efficient H.264 stream, dramatically reducing file size while targeting the MPEG-2-based MOD container used by JVC and Panasonic camcorders.

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 files store raw, uncompressed YUV video frames with no inter-frame compression — every frame is stored in full, making these files enormous but perfectly lossless. During conversion, FFmpeg reads the raw YUV planar data from the Y4M container and encodes it using the libx264 H.264 encoder, which applies spatial and temporal compression via techniques like motion estimation, discrete cosine transforms, and entropy coding. Since Y4M carries no audio stream (it is a video-only intermediate format), FFmpeg will encode silence or pass no audio unless an audio source is provided — the AAC encoder is configured but will produce an empty or absent audio track. The output is wrapped in a MOD container, which is a modified MPEG-PS (Program Stream) structure that JVC and Panasonic camcorders use natively. The CRF 23 setting controls the quality-to-size tradeoff of the H.264 encode, and this step is inherently lossy — the pristine uncompressed source is compressed for the first time in this pipeline.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that powers both this browser-based tool (via WebAssembly) and the local desktop command. All subsequent flags configure how it reads, transcodes, and writes the Y4M-to-MOD conversion.
-i input.y4m Specifies the input Y4M file. FFmpeg reads the YUV4MPEG2 header to determine frame dimensions, frame rate, and chroma subsampling, then streams the raw uncompressed YUV frames into the encoding pipeline.
-c:v libx264 Selects the libx264 H.264 encoder for the video stream, compressing the raw YUV frames from the Y4M source using inter-frame motion estimation and DCT-based encoding — the first lossy compression this uncompressed source will ever undergo.
-c:a aac Configures the AAC audio encoder for the output MOD file. Since Y4M carries no audio, this encoder will produce no output in practice, but specifying it ensures the command is ready if an audio stream is later added via a second input source.
-crf 23 Sets the Constant Rate Factor for H.264 encoding to 23, which is libx264's default quality level offering a reasonable size-to-quality tradeoff. Because the Y4M source is perfectly lossless, reducing this value (e.g., to 18) is advisable when preserving fine detail from precision-rendered or synthesized source material.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second — a standard perceptually transparent bitrate for stereo audio. This flag has no practical effect when the Y4M input provides no audio track, but becomes relevant if a separate audio source is added to the command.
output.mod Specifies the output filename with the .mod extension, which signals FFmpeg to wrap the encoded H.264 video in an MPEG-PS-based MOD container — the format used natively by JVC Everio and Panasonic camcorder file systems.

Common Use Cases

  • Archiving raw Y4M output from tools like FFmpeg pipe chains or video synthesis software into a compact camcorder-compatible MOD file for playback on legacy JVC or Panasonic devices
  • Converting uncompressed Y4M test sequences generated by video quality benchmark tools into MOD format for distribution or review on camcorder-based playback systems
  • Packaging raw YUV video frames exported from color grading or compositing workflows into MOD files for clients who use JVC Everio or Panasonic camcorder ecosystems
  • Encoding lossless Y4M source material to MOD as a final delivery step when the target workflow requires MPEG-PS container compatibility
  • Compressing large uncompressed Y4M intermediates produced by animation or CGI rendering pipelines into a manageable MOD file for storage or review
  • Producing MOD files from synthetic or procedurally generated Y4M video content for testing camcorder-based editing software that ingests MOD natively

Frequently Asked Questions

Yes — this conversion is lossy for the first time in the Y4M file's history. Y4M stores raw, uncompressed YUV pixel data with no quality loss, but encoding to MOD via H.264 at CRF 23 introduces compression artifacts. CRF 23 is a good general-purpose balance, but because the Y4M source is pristine, you may want to lower the CRF value (e.g., CRF 18) to preserve more detail, especially if the source contains fine textures or was generated by a precision rendering pipeline.
Y4M is a video-only format and carries no audio whatsoever — it was designed purely as an uncompressed video interchange and piping format. As a result, the output MOD file will have no audio track, even though the FFmpeg command specifies AAC encoding. If you need audio in the MOD file, you must supply a separate audio source using an additional -i flag in the FFmpeg command and map it explicitly alongside the Y4M video stream.
Y4M stores every video frame as raw, uncompressed YUV data — a one-minute 1080p Y4M file at 30fps can easily exceed 10GB. H.264 encoding in the MOD output uses inter-frame compression, storing only the differences between frames rather than complete pixel grids, which routinely achieves 100:1 or greater compression ratios over the uncompressed source. This dramatic size reduction is expected and is the primary purpose of encoding Y4M to a compressed delivery format like MOD.
MOD uses a modified MPEG-PS container structure originally developed for JVC Everio and Panasonic camcorders, but this tool encodes the video track as H.264 (not MPEG-2), which means the resulting file departs from the strict camcorder-native MOD specification. Most desktop media players like VLC will open it without issue, but some legacy camcorder docking software or JVC/Panasonic device transfers may reject it because they expect genuine MPEG-2 video inside the MOD container.
Change the -crf value in the command to control H.264 quality: lower numbers produce higher quality and larger files, while higher numbers produce smaller files with more visible compression. For a near-lossless encode from the pristine Y4M source, use -crf 0 (truly lossless H.264) or -crf 18 (visually lossless for most content). The default of -crf 23 is suitable for web-quality output. For example: ffmpeg -i input.y4m -c:v libx264 -c:a aac -crf 18 -b:a 128k output.mod
FFmpeg itself processes one file at a time with the command shown, but you can batch process on the command line using a shell loop. On Linux or macOS: for f in *.y4m; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.y4m}.mod"; done — and on Windows PowerShell: Get-ChildItem *.y4m | ForEach-Object { ffmpeg -i $_.FullName -c:v libx264 -c:a aac -crf 23 -b:a 128k ($_.BaseName + '.mod') }. The browser-based tool processes one file at a time, so the FFmpeg command copy is particularly useful for large batch jobs.

Technical Notes

Y4M files use 4:2:0 YUV chroma subsampling by default, which aligns well with H.264 encoding since libx264 also defaults to yuv420p — meaning no chroma format conversion is necessary and the raw pixel data feeds directly into the encoder with no resampling overhead. However, some Y4M files produced by specific tools may use 4:4:4 or 4:2:2 subsampling, which FFmpeg will automatically downsample to 4:2:0 for standard H.264 compatibility; this subsampling step is itself a quality reduction on top of the lossy H.264 compression. The MOD container is a modified MPEG-PS format and does not support subtitles, chapters, or multiple audio tracks, matching the Y4M source's own lack of these features. One known limitation is that some camcorder management software enforces strict MOD validation expecting MPEG-2 video streams, so an H.264-encoded MOD may not import correctly into JVC or Panasonic proprietary desktop software. Frame rate and resolution metadata embedded in the Y4M header are respected by FFmpeg and passed through to the H.264 encoder, preserving the original timing of the uncompressed source.

Related Tools