Convert M4V to Y4M — Free Online Tool

Convert M4V files (Apple's iTunes-compatible MPEG-4 container, typically encoded with H.264 or H.265) to Y4M (YUV4MPEG2), a fully uncompressed raw video format used as a lossless intermediate for video processing pipelines and inter-application piping. The M4V's compressed video stream is fully decoded and written out as uncompressed YUV frames, making this ideal for workflows that demand pixel-perfect source data.

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

M4V files store video in compressed form, almost always using H.264 (libx264) or H.265 (libx265) with lossy compression, alongside AAC or MP3 audio in a container that is essentially a restricted variant of MPEG-4 Part 14 (MP4). During conversion to Y4M, FFmpeg fully decodes every compressed video frame from the M4V — unwinding all the inter-frame prediction, DCT compression, and entropy coding — and writes each frame out as raw YUV planar pixel data. The Y4M container is a trivially simple format: a short plaintext header describing resolution, frame rate, and colorspace, followed by raw frame data with per-frame markers. Critically, Y4M carries no audio track at all, so the AAC or MP3 audio in the source M4V is silently discarded. The output file size will be dramatically larger than the input because all compression is removed; a typical 1080p video expands by 50–200x compared to the H.264-compressed M4V.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary. In the browser tool, this runs via FFmpeg.wasm compiled to WebAssembly; on the desktop, this calls your locally installed FFmpeg executable.
-i input.m4v Specifies the input file as an M4V — FFmpeg will demux the MPEG-4 container and expose the H.264 or H.265 video stream (plus any AAC/MP3 audio) for processing. The M4V format is essentially a restricted MP4, so FFmpeg handles it with the same mov/mp4 demuxer.
-c:v rawvideo Instructs FFmpeg to encode the output video stream as rawvideo — meaning the fully decoded YUV frames from the M4V's H.264 or H.265 stream are written directly to disk with no re-compression. This is what makes the Y4M output lossless and uncompressed.
output.y4m Specifies the output filename with the .y4m extension, which causes FFmpeg to automatically use the yuv4mpegpipe muxer and write a valid YUV4MPEG2 file complete with the plaintext stream header and per-frame markers that downstream tools expect.

Common Use Cases

  • Feeding M4V content into a lossless video processing pipeline (e.g., x264, x265, AV1 encoders, or FFmpeg filters) that accepts Y4M via stdin to avoid any generational quality loss from intermediate re-encoding
  • Providing a pixel-accurate source file to video analysis or machine learning tools that require uncompressed YUV frames rather than compressed bitstreams
  • Using the uncompressed Y4M output as input to professional compositing or color grading software that reads raw YUV data and cannot reliably decode H.264/H.265 from M4V
  • Extracting clean, decompressed frames from an iTunes M4V download to verify encoder artifacts or perform frame-accurate visual quality comparisons
  • Piping decoded video from an M4V file into another command-line tool (such as HandBrake CLI, VapourSynth, or avisynth) using Y4M over stdout as a lossless interchange format
  • Archiving a decoded, compression-artifact-free version of an M4V video for use in academic or forensic video research where the original compressed representation must be fully expanded

Frequently Asked Questions

The Y4M output will be visually identical to the M4V source — no additional quality loss is introduced during this conversion. The M4V's H.264 or H.265 stream is fully decoded to raw YUV pixel data, which is an exact representation of what the decoder produces. However, any lossy compression artifacts already baked into the M4V by the original H.264/H.265 encoder are preserved in the Y4M frames; this conversion cannot recover information discarded during the original encode. Y4M itself is lossless and uncompressed, so what you get out is exactly what FFmpeg decoded.
M4V files use H.264 or H.265 compression, which achieves typical compression ratios of 50:1 to 200:1 compared to raw video. Y4M is completely uncompressed — every frame is stored as full planar YUV pixel data with no inter-frame prediction or entropy coding. A 100 MB M4V file at 1080p could easily produce a Y4M file of 5–20 GB. This is expected and is precisely the point: Y4M is designed as a lossless interchange format for pipelines, not for long-term storage or distribution.
The audio track is completely dropped. Y4M (YUV4MPEG2) is a video-only format with no provision for audio streams whatsoever — it cannot carry AAC, MP3, or any other audio. The FFmpeg command does not include an audio output codec flag, so FFmpeg will not map any audio stream to the output. If you need to preserve the audio, you should separately extract it from the M4V before or after this conversion using a command like 'ffmpeg -i input.m4v -vn -c:a copy audio.aac'.
No — Y4M supports none of these features. The YUV4MPEG2 format is a bare-bones raw video container that stores only a video stream header and uncompressed frame data. Chapter markers, subtitle tracks, iTunes metadata, multiple audio tracks, and DRM information present in the M4V are all discarded entirely. If preserving any of that metadata matters, Y4M is the wrong output format; consider remuxing to MKV or MP4 instead.
Yes. By default, FFmpeg will output the Y4M in the same pixel format decoded from the M4V, typically yuv420p for standard H.264 content. You can explicitly control the output pixel format by adding '-pix_fmt' to the command — for example, 'ffmpeg -i input.m4v -c:v rawvideo -pix_fmt yuv444p output.y4m' to use 4:4:4 chroma sampling for higher color fidelity. Check what downstream tools expect before changing this, as many Y4M consumers specifically require yuv420p.
Replace the output filename with a pipe by writing '-' as the output path and adding '-f yuv4mpegpipe' to specify the format explicitly, for example: 'ffmpeg -i input.m4v -c:v rawvideo -f yuv4mpegpipe - | x265 --y4m - -o output.hevc'. This avoids writing the enormous uncompressed Y4M file to disk entirely, which is the primary use case Y4M was designed for. This desktop command is especially useful for files over 1GB that exceed the browser tool's processing limit.

Technical Notes

Y4M (YUV4MPEG2) was originally developed for the mjpegtools project as a simple, unambiguous format for piping raw video between Unix command-line tools. Its header encodes resolution, frame rate as a rational number, interlacing, and colorspace in a human-readable ASCII line, making it trivial to parse. When converting from M4V, the key technical consideration is the colorspace and pixel format: standard iTunes M4V files encoded with H.264 at 4:2:0 chroma subsampling will produce yuv420p Y4M output, while H.265 HDR content may use yuv420p10le (10-bit). The resulting Y4M file will have no timestamp or duration metadata meaningful for seeking — it is purely a frame sequence. Because Y4M has no compression, file sizes are proportional to (width × height × bytes_per_pixel × frame_count), making it impractical for any use case other than intermediate processing or piping. The M4V container's DRM (FairPlay) will prevent FFmpeg from reading DRM-protected M4V files purchased from iTunes; only DRM-free M4V files (such as those re-downloaded after Apple dropped DRM, or personally encoded ones) can be processed. Subtitle and chapter data from the M4V are silently discarded because Y4M has no mechanism to carry them.

Related Tools