[FFmpeg-user] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

Michael Koch astroelectronic at t-online.de
Wed Sep 14 23:49:43 EEST 2022


Am 14.09.2022 um 19:00 schrieb Dan:
> That's a great idea to use specified colours directly supported by ffmpeg
> and helps narrow down the issue a lot!
>
> Would you count this as a bug?

It seems to be a bug.

> If this is a known legacy quirk, it seems
> one of the ugliest and most misleading quirks I have seen in a while, 
> and I could
> imagine being responsible for wasting thousands of hours of thought 
> based upon
> mis-diagnosed colour-profiling assumptions.
>
> I've spoken with two separate long-time video professionals so far, 
> and they
> were both convinced this was a colour profile thing and that my source 
> images
> were the problem, and not ffmpeg's behaviour, despite saying I checked 
> both
> BMPs in a hex editor, and they were byte-identical (other than 
> resolution/filesize).
>
> Are you using Windows per chance? 

yes, I did also test on Windows.

> To make things even more confusing, one
> of the aforementioned pros says he can't spot a difference on his 
> non-Windows
> system (presuming Mac, could be Linux) between the two output mp4s' 
> colours.

The crazy thing is when you vertically stack the two videos together, 
then the colors become again identical in the output:

ffmpeg -i out1.mp4 -i out2.mp4 -lavfi vstack -y out.mp4

Sorry, I have no idea for a solution or workaround.

Michael



More information about the ffmpeg-user mailing list