ffmpeg -pix_fmts lists many pixel formats. In my ffmpeg, there are 66 different pixel formats that start with yuv. A few of them are familiar to me (e.g., yuv422p), but most of them are not (e.g., yuva422p16be).

Where are these pixel formats defined?

  • 3
    Most are self describing. yuva422p16be YUV are luma and chroma planes. a is the alpha channel. 422 is the plan size descriptions, p means planer, 16be means 16 bits per pixel big endian format. – SlimSCSI Sep 11 '15 at 23:29
  • Thanks @SlimSCSI. Do you know what the j stands for in yuvj440p? – Doug Richardson Sep 12 '15 at 3:32
  • 4
    YUV420P uses the range 16 to 239 to describe luminance and chroma values, so values from 0 to 16 get mapped to the same output level, as do values 239-255. YUVJ420P uses the full range from 0 to 255. Not sure why it's J though. – stib Sep 12 '15 at 11:55
  • 3
    In libavutil/pixfmt.h: AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range. – llogan Sep 12 '15 at 16:53

If your question was

Where are these pixel formats defined?

Go to http://ffmpeg.org/download.html and download the source of ffmpeg. Then unpack it

tar -xavf FILENAME.tar.*

and descend to the folder in the source code that is called libavutil

cd ffmpeg-*/libavutil/

and open the file pixfmt.h where you will find a description of all pixel formats. A few sample lines

AV_PIX_FMT_YUV420P,   ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)          
AV_PIX_FMT_YUYV422,   ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
AV_PIX_FMT_RGB24,     ///< packed RGB 8:8:8, 24bpp, RGBRGB...
AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
AV_PIX_FMT_YUV422P,   ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)

Additionally you can read https://en.wikipedia.org/wiki/YUV and it’s cited sources and external links.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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