Color drift w/ AVAssetReaderVideoCompositionOutput

Hi,

I am working in color drift issue with AVAssetReaderVideoCompositionOutput.

Do you anyone have any idea that how to fix the color drift w/ AVAssetReaderVideoCompositionOutput?


//


My source is DV NTSC SD mov file. Source CMSampleBuffer has proper color info as nclc 6-1-6.


When I use AVAssetReaderVideoCompositionOutput, resulted 2vuy imageBuffer shows color drift.

- resulted CMSampleBuffer does not have proper color information.

- Also CVBuffer Attachment does not have kCVImageBufferCGColorSpaceKey.


But when I use AVAssetReaderTrackOutput, resulted 2vuy imageBuffer shows same color as original.

- it properly contains CMSampleBuffer w/ nclc, and also CVImageBufferYCbCrMatrix attachment is available.

- It has proper kCVImageBufferCGColorSpaceKey



shouldPropagate: {
    CGColorSpace = " (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; Composite NTSC)";


//


I suspect if AVAssetReaderVideoCompositionOutput ignores source SampleBuffer's color tags so composition is not correctly tagged.

Replies

Have you figured out any solution to this? I'm having exactly the same issue, AVAssetReaderVideoCompositionOutput doesn't contain the proper color profile tag as AVAssetReaderTrackOutput does, I have to manually set the color properties to the videoComposition to be able to correctly decode the color, however I don't know what's the best way to read source asset's color properties.