[FFmpeg-user] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)
twinbee42 at skytopia.com
Fri Sep 16 14:26:16 EEST 2022
>> The colour is both the same now (for both Chrome and MPC), except it's
>> the darker, wrong colour (green=164 instead of 190).
> Try some other values instead of "bt709".
Went through a ton....
ERROR - DIDN'T RUN: bt470m, bt601-6-525, bt601-6-625, bt2020, bt2020ncl, linear, log100, log316, iec61966-2-4
RUNS BUT BAD COLOURS: bt709, smpte240m, ycgco (very bad colors), bt2020nc, bt2020c, smpte2085, chroma-derived-nc, chroma-derived-c, ictcp
RUNS AND WORKS WITH THAT GREEN, BUT SLIGHTLY TO FAIRLY DESATURATED COLOURS ON TEST CHART: bt470bg, smpte170m
AND I STRUCK GOLD WITH: fcc
The "fcc" actually produce the desired result (or very nearly!). R, G, B were only off by 2/256 at the most. I also tested it with -pix_fmt yuv420p for Chrome compatibility, and on the 1920x1080 colour test chart shown here: https://www.belle-nuit.com/test-chart - all was good! No drawbacks I assume?
Thank you a ton for this! I wonder if fcc works for you too on your Linux system. Any idea what's going on and why ffmpeg doesn't use that one by default? Without specifying, does ffmpeg just give it an unknown/unmanaged colour profile? And if that's the case, then why does Chrome and MPC interpret that unknown profile in different ways according to the size?
I look forward to the day when everyone uses the same colour space/profile, gamma correction, and finally scrapping YUV and chroma subsampling (bleurgh) - just sticking with RGB. We'll save the world a lot of time and heartache.
More information about the ffmpeg-user