GES does not seem to handle colorimetry properly
GES does not standardize the colorimetry of incoming image clips, and therefore the color of the output is not correct.
A GESTimeline can have multiple image clips, each of which may be defined from a distinct colorspace (different from the other images). Presumably, GES must (at some point) reconcile these differences by selecting a single colorspace for the composition. The problem is that it does not do this.
Here is a simple example of a composition which contains two image clips.
- A jpeg image encoded with
- A png image encoded with
export GST_DEBUG_DUMP_DOT_DIR=c:/Users/ding/Desktop/bt470_repro/dot ges-launch-1.0 +clip bt470bg.jpg duration=5 +clip graph.png duration=10 -o output.ogx
The colors in the first 5 seconds of video are clearly incorrect. You can compare it to the way the jpeg image is supposed to appear, and the difference is noticeable.
The graph (of which
graph.png is an excerpt) shows that the colorimetry of the jpeg image is properly detected (as
1:4:0:0), and it propagates through many elements (including the
GstCompositor). I would expect the
GstCompositor to be responsible for converting the pixel data to a standard colorimetry (e.g. bt.709) but this does not happen. The colorimetry information is just relayed through the caps, and it seems like no colorspace conversion is performed.