Pixel format is the layout of each pixel in the raw picture data of an image or video. It tells a program which color components the picture has and how many bits they use.
Video reports often show the field as pix_fmt, with a value such as yuv420p. A value like this shows the color model, the chroma subsampling, and the bit depth. The color space is a separate field.
Which files carry it
FFmpeg's ffprobe program lists pix_fmt for each video stream. This covers MP4, MOV, MKV, and WebM files.
Images report a value too. FFmpeg gives yuvj420p to a JPEG with 4:2:0 sampling and rgb24 to an 8-bit RGB PNG.
An audio file with cover art can also report a pixel format. FFmpeg treats that picture as a video stream.
ExifTool reads a tag called PixelFormat from Windows HD Photo files (HDP and WDP). It shows values such as 24-bit RGB and 8-bit Gray.
What the values look like
FFmpeg builds its names from short parts. The value yuv420p10le has 5 parts:
yuv: the color model. Y is brightness, and U and V carry color. U and V are also called Cb and Cr, as in YCbCr.420: the sampling. Color has half the width and half the height of the brightness data.p: planar. Each component has a separate plane. A packed format keeps the components together in one array.10: the bits for each component. The valueyuv420phas no number here and uses 8 bits.le: the byte order, little-endian. The endingbemeans big-endian.
Typical values
Each number below is the average bits per pixel in the raw picture data:
yuv420p: 12 bits, color at half the width and half the heightyuv422p: 16 bits, color at half the widthyuv444p: 24 bits, color for every pixelyuvj420p: 12 bits, theyuv420playout with the full range that JPEG usesrgb24: 24 bits, packed red, green, and bluergba: 32 bits, with an added alpha value for transparencygray: 8 bits, brightness onlypal8: 8 bits, each value points to a palette color
In full range, 8-bit brightness runs from 0 to 255. In limited range, it runs from 16 to 235. FFmpeg advises a separate range field instead of the yuvj names.
Where the value comes from
The program that encodes the stream decides the pixel format. In FFmpeg, you choose it with the -pix_fmt option.
The name itself is usually not stored in the file. The reading program builds the name from stored details.
For H.264, FFmpeg uses the bit depth and chroma format in the stream header. For PNG, FFmpeg uses the bit depth and color type in the image header.
Why it matters for your file
The pixel format sets the size of the raw picture data. An rgb24 frame has 24 bits per pixel, and a yuv420p frame has 12. Codecs then compress this data, so these numbers do not give the final file size.
The pixel format also sets how much color detail the file keeps. The human eye sees far more detail in brightness than in color, so 4:2:0 causes little visible loss.
If you convert 4:2:0 to 4:4:4, a program calculates the missing samples from nearby ones. The color detail that 4:2:0 removed stays lost.
The H.264 profile is another reason to check the value. The Main and High profiles support 8-bit color with 4:2:0 sampling.
An H.264 stream in yuv444p or yuv420p10le needs a higher profile. Apple's HLS rules require H.264 at or below High profile. YouTube recommends High profile with 4:2:0 for uploads.