Convert Y4M to M4V — Free Online Tool
Convert Y4M (YUV4MPEG2) lossless video files to Apple M4V format, encoding the raw video stream with H.264 (libx264) and packaging it in an iTunes-compatible container. This is the essential step for taking uncompressed intermediate video and producing compact, device-ready files for iOS devices, Apple TV, and iTunes libraries.
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 files store raw, uncompressed YUV video frames with no inter-frame compression — every frame is stored in full, making these files extremely large but perfectly lossless. During this conversion, FFmpeg reads each raw YUV frame and encodes it from scratch using the libx264 H.264 encoder at CRF 23 (a perceptually good quality level), producing a highly compressed video stream. Because Y4M carries no audio, the AAC audio encoder is invoked but will produce a silent or absent audio track unless you add an audio source. The encoded video and audio are then wrapped in the MPEG-4-based M4V container, which is structurally identical to MP4 but carries Apple-specific metadata. The -movflags +faststart flag moves the container's index (moov atom) to the beginning of the file so it can begin playing before fully downloading — a requirement for web and Apple device streaming.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that handles all decoding, encoding, and container operations in this conversion pipeline. |
-i input.y4m
|
Specifies the input file in Y4M (YUV4MPEG2) format. FFmpeg reads the plain-text frame headers and raw YUV pixel data from this uncompressed video file, which serves as the lossless source material for the H.264 encode. |
-c:v libx264
|
Selects the libx264 encoder to compress the raw YUV video frames from the Y4M source into an H.264 video stream, which is the required video codec for Apple M4V playback in QuickTime and on iOS devices. |
-c:a aac
|
Selects Apple's preferred AAC audio codec for any audio stream in the output. Since Y4M contains no audio, this flag has no practical effect here unless a second audio input is added, but it ensures the correct codec is declared for M4V container compliance. |
-crf 23
|
Sets the Constant Rate Factor for the libx264 encode to 23, which is the default perceptual quality target. Applied to a pristine uncompressed Y4M source, this produces a high-quality H.264 stream; you can lower this value (e.g., -crf 18) to preserve more detail from the original raw frames at the cost of a larger file. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second, the standard quality level for iTunes-compatible AAC audio. This flag is declared for M4V compliance but will only affect output if an audio stream is present in the source or added via a supplementary input. |
-movflags +faststart
|
Moves the M4V container's moov atom (index metadata) from the end of the file to the beginning after encoding completes. This is required for Apple streaming compatibility and allows QuickTime, iOS, and Apple TV to begin playback immediately without buffering the entire file first. |
output.m4v
|
Defines the output filename and signals to FFmpeg that the result should be wrapped in the M4V container format — Apple's MPEG-4 variant used for iTunes content, iOS media libraries, and QuickTime-compatible video distribution. |
Common Use Cases
- Delivering a finished visual effects or animation render (exported from tools like Blender or FFmpeg pipelines as Y4M) to clients in an Apple-friendly format playable in QuickTime and on iPhone or iPad.
- Converting Y4M intermediate files produced by lossless video processing pipelines (e.g., color grading or frame interpolation tools) into compact M4V files for distribution via iTunes or Apple Configurator.
- Preparing scientific or medical visualization video — which is often rendered to Y4M for frame accuracy — into M4V for presentation on Apple hardware in conference settings.
- Transcoding Y4M test sequences (commonly used in codec benchmarking and video quality research) into M4V/H.264 to evaluate compression efficiency against the raw source.
- Archiving lossless Y4M footage from broadcast or production pipelines into a dramatically smaller iTunes-compatible M4V for long-term storage without requiring specialized playback software.
- Packaging Y4M output from open-source video synthesis or generative art tools into an M4V suitable for uploading to Apple-platform video workflows or syncing to iOS devices via iTunes.
Frequently Asked Questions
Yes — this conversion is inherently lossy because the raw uncompressed Y4M video must be encoded into H.264, which uses lossy compression. The default CRF value of 23 produces visually good quality for most content, but it is not mathematically identical to the original frames. If you need the highest fidelity, lower the CRF value (e.g., -crf 18 approaches visually lossless for H.264) at the cost of a larger output file. Since Y4M is your uncompressed source, you have the best possible starting material for this encode.
Y4M is a video-only format and carries no audio data whatsoever. When FFmpeg processes the conversion, it will attempt to apply the AAC audio codec but there is no audio stream to encode, so the resulting M4V file will have no audio track. If you need audio in the output, you must supply a separate audio file as an additional input in the FFmpeg command using a second -i flag and then map both streams explicitly.
The +faststart flag reorganizes the M4V container so that the moov atom (the file's index and metadata) is placed at the beginning of the file rather than the end. This allows Apple devices, QuickTime, and web browsers to begin playback before the entire file has loaded, which is critical for streaming. For purely offline playback on a local device it makes no functional difference to quality, but it is a best practice for M4V files and is required by some Apple workflows and AirPlay scenarios.
The -crf flag controls H.264 quality on a scale from 0 (mathematically lossless) to 51 (extremely degraded). Lower values produce better quality and larger files; higher values produce smaller files with more visible compression artifacts. For example, replacing -crf 23 with -crf 18 yields near-visually-lossless output from your Y4M source, while -crf 28 gives a significantly smaller file suitable for web delivery where top-tier quality is less critical. Since Y4M is uncompressed, you are doing a first-generation encode and can afford to be generous with quality.
Yes. On Linux or macOS you can use a shell loop: for f in *.y4m; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "${f%.y4m}.m4v"; done. On Windows PowerShell: Get-ChildItem *.y4m | ForEach-Object { ffmpeg -i $_.Name -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart ($_.BaseName + '.m4v') }. This is especially practical for batch converting Y4M render sequences from animation or simulation pipelines.
M4V is structurally almost identical to MP4 and uses the same H.264 video and AAC audio codecs, so most modern media players (VLC, MPC-HC, Android, Windows) will play M4V files without issue. The only exception is DRM-protected M4V files purchased from iTunes, which are locked to Apple devices — but files you create yourself with this tool contain no DRM and will play universally. If broad compatibility is more important than iTunes integration, you can simply rename the output file from .m4v to .mp4 and it will behave identically.
Technical Notes
Y4M (YUV4MPEG2) stores raw planar YUV frames with a plain-text header per frame, making it one of the simplest possible video formats but also one of the largest — a single minute of 1080p24 Y4M can exceed 10GB. The conversion to M4V with libx264 at CRF 23 typically achieves compression ratios of 50:1 to 200:1 depending on content complexity, so expect the M4V output to be dramatically smaller. Because Y4M uses 4:2:0 chroma subsampling by default (the same subsampling H.264 typically uses), there is no chroma resampling penalty during encoding. Y4M carries no audio, no chapters, no subtitles, and no metadata beyond basic frame dimensions and frame rate, so the M4V output will inherit only what Y4M provides: clean video at the specified frame rate. M4V does support chapters and multiple audio tracks, but these cannot be sourced from a bare Y4M file without supplementary inputs. The libx264 encoder's default profile will be auto-selected based on input resolution; for iOS compatibility you may want to explicitly add -profile:v baseline or -profile:v high depending on your target device generation. Files produced by this tool are DRM-free and can be freely renamed to .mp4 without re-encoding.