0

I'm a beginner to ffmpeg so I'm having a hard time believing that a utility so old and so widely used has such a fundamental bug, but the evidence is staring me in the face and leads me to no other conclusion.

It's incredibly easy to replicate thankfully. I want to convert numerous frames to make an animation, but thankfully, I've simplified the problem to even using a single image to make a '1 frame video' for the purposes of debugging.

Simply perform this command line:

ffmpeg.exe -i original.png -crf 0 -vcodec libx264 output.mp4

With this "original.png" ("fC2Tj") image:

original

And this command line:

ffmpeg.exe -i doubleHeight.png -crf 0 -vcodec libx264 output.mp4

On this "doubleHeight" ("RGIvA") image:

enter image description here

The double height version is darker than it should be. I've checked the resulting video in both Media Player Classic and Chrome/Firefox.

If you check the dark green colour on the original PNG images, using an eye dropper tool, they're both R=25,G=74,B=15. However, if you check the same colour on the output MP4s, the colour matches on the original PNG, but not the doubleHeight version, which is R=22,G=66,B=12.

If I use -vcodec libx264rgb, instead of -vcodec libx264, that fixes the issue, but I need libx264 so the output video can work on Chrome and other media players.

What gives?

1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Dr Mayhem
    Sep 18 at 9:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.