[FFmpeg-devel] [PATCH 2/2] ffmpeg: Use the colour properties from the input stream when doing transcode

Marton Balint cus at passwd.hu
Fri May 25 11:20:29 EEST 2018



On Fri, 25 May 2018, Tobias Rapp wrote:

> On 25.05.2018 07:58, Xiang, Haihao wrote:
>> On Thu, 2018-05-24 at 11:15 +0100, Mark Thompson wrote:
>>>
>>> For example:
>>>
>>> ffmpeg -i bt709_input.mkv -vf colorspace=bt2020 bt2020_output.mkv
>>>
>>> will have the output file marked as BT.709 after this patch, where 
> previously
>>> it was "unspecified".  (Explicitly setting -color_primaries/-color_trc/-
>>> colorspace on the output works in both cases.)
>> 
>> I agree with you it's not worse than before as we don't get the expected 
> result
>> in both cases.
>
> Not quite: When a file says "I don't know this property value" you have 
> a chance to lookup the value somewhere else or use a default. When it 
> says "I know the value" and gives a wrong value, you completely loose trust.
>
> So in my opinion this patch should not be applied, as it possibly makes 
> ffmpeg generate files with wrong information where it just had no 
> information before. The correct approach would be to set the encoder 
> properties from output frame data and only write a header once the 
> encoders have been initialized completely.

I agree.

Regards,
Marton


More information about the ffmpeg-devel mailing list