[FFmpeg-devel] [PATCH 2/2] ffmpeg: Use the colour properties from the input stream when doing transcode
sw at jkqxz.net
Sat May 26 19:29:55 EEST 2018
On 25/05/18 07:57, 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.
Right, that is a compelling argument. I agree with you, so I definitely won't apply the patch in this form.
> 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.
Passing the information through libavfilter should be equivalent, but yeah.
More information about the ffmpeg-devel