Skip to content
All formats
Y4M

Video format

The Y4M format

Y4M is raw, uncompressed video frames used for codec testing. Y4M comes from the mjpegtools project; it stores raw frames with a short header and is the standard test format for video codecs.

When to use Y4M

Use Y4M as lossless input for encoder tests; convert it to MP4 to watch.

It is best for testing and comparing video encoders, and it opens on FFmpeg, mpv, VLC and codec research tools.

How to open it: mpv and VLC play Y4M files.

Y4M at a glance
Full name YUV4MPEG2
Extensions .y4m
MIME type video/x-yuv4mpeg
Introduced 2001
Compression Uncompressed
Usually contains uncompressed YUV frames, no audio
Support Specialist format
Typical size About 150 MB per second of 1080p

Good at

  • No compression, so nothing is lost
  • Trivial for encoders to read

Not so good at

  • Gigantic files: a minute of 1080p is several gigabytes
  • No audio

The common mistake

Y4M has no compression at all, so browsers must hold a lot of data; very long clips may be too large for a phone to convert.

Questions

What is a Y4M file?

Y4M (YUV4MPEG2) is raw, uncompressed video frames used for codec testing. Y4M comes from the mjpegtools project; it stores raw frames with a short header and is the standard test format for video codecs.

How do I open a Y4M file?

mpv and VLC play Y4M files.