4

If I have a video file, how can I find out which kind of chroma subsampling (4:2:2, 4:2:0), if any, that is used?


What I've tried so far:

If I open the codec info in VLC I can see that it's in the ITU-R BT.709 color space. Does this tell me anything about which subsampling is used?

2 Answers 2

4

Mediainfo is a free, open source, cross-platform solution, available in 37 languages. https://en.m.wikipedia.org/wiki/MediaInfo

When run from the command line it outputs chrome subsampling info by default:

$ mediainfo videofile.mov

[...]
Chroma subsampling                       : 4:2:0
[...]
4
  • Would be nice with some more info about how to answer my question with the help of that software. E g does it list the used type of chroma subsampling separately? Commented Oct 17, 2021 at 19:48
  • 1
    Depends on your OS. With Mac, you just type “mediainfo” followed by the path of the file you want to examine into terminal and press return. It’ll display all of the info available on the file. For other options, type “mediainfo -h” I think Windows has a GUI. Commented Oct 17, 2021 at 19:54
  • For platform-specific help, you’ll need to let us know what operating system you’re using, or what video software you’re using, because many NLEs can provide that info, too. Commented Oct 17, 2021 at 20:06
  • Also, mediainfo comes bundled on many platforms, so it might already be a built-in solution for you. It’s just the most generic one I know about, and it actually drives a lot of the knockoffs people pay for. Commented Oct 17, 2021 at 20:13
4

Using the ffprobe command (part of FFmpeg, also a command line tool)

ffprobe -show_entries stream=pix_fmt <VIDEO FILE>

The output will look like this:

...
[STREAM]
pix_fmt=yuv420p
[/STREAM]
[STREAM]
[/STREAM]

You can then find the description of the pixel format as used in ffmpeg:

 AV_PIX_FMT_YUV420P,   ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.