Subject: [Cellar] mkv ColourSpace and uncompressed video

From: Dave Rice <[email-masked]>
Date: Sun, 5 Feb 2017 18:21:25 -0500

Hi cellar,

I’m hoping to clarify the use of uncompressed video in Matroska and find a way to avoid muxing errors such as https://github.com/FFmpeg/FFmpeg/blob/8c1342e631d635f6cad13f9374c4f2005c22b9e5/libavformat/matroskaenc.c#L1117-L1118 <https://github.com/FFmpeg/FFmpeg/blob/8c1342e631d635f6cad13f9374c4f2005c22b9e5/libavformat/matroskaenc.c#L1117-L1118>.

Currently Matroska supports a Codec ID of V_Uncompressed which relies on the ColourSpace Element to detail how the uncompressed video is stored. There is not much documentation here but the ColourSpace references a value in AVI (which seems to be the biCompression value of BITMAPINFOHEADER. I’d like to clean up this documentation but would like something more clear than a vague reference to AVI.

Is there a reliable authority of fourcc’s that we can reference to uncompressed video or should ColourSpace be defined with an enumeration list which provides a list of value (such as I420, NV12, NV21, RGBA, UYVY, Y41B, Y42B, Y800, YUV9, YUY2, YVYU) along with their definitions?

Also I can only find occasions of ColourSpace used when the Codec is V_Uncompressed. Are there instances when it is valid to use ColourSpace when the Codec ID is not V_Uncompressed. Was there any reason that ColourSpace was used to store the fourcc, rather than using CodecPrivate as done with VFW?

Dave Rice