Twinbee
18th September 2022, 08:42
Hi all, I'm a beginner to ffmpeg (latest 5.1.1 "essentials build" by www.gyan.dev, Windows 10).
Didn't have much luck tracking this down at the Vegas forum or the ffmpeg mailing list, so trying here as a maybe last resort. It's incredibly easy to replicate thankfully. I want to convert numerous frames to make an animation, but I've simplified the problem to using a single image to make a '1 frame video' for the purposes of debugging.
Simply perform this command line with this "original.png (https://i.stack.imgur.com/5jkct.png)" image.: ffmpeg.exe -i original.png -crf 0 -vcodec libx264 output.mp4
And this command line On this "doubleHeight (https://i.stack.imgur.com/PLdsb.png)" image.: ffmpeg.exe -i doubleHeight.png -crf 0 -vcodec libx264 output.mp4
The double height version is darker than it should be. I've checked the resulting video in both Media Player Classic and Chrome.
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. The problem seems to occur in Media Player Classic with a height greater than or equal to 578, and in Chrome with a height greater than or equal to 720.
What gives?
Didn't have much luck tracking this down at the Vegas forum or the ffmpeg mailing list, so trying here as a maybe last resort. It's incredibly easy to replicate thankfully. I want to convert numerous frames to make an animation, but I've simplified the problem to using a single image to make a '1 frame video' for the purposes of debugging.
Simply perform this command line with this "original.png (https://i.stack.imgur.com/5jkct.png)" image.: ffmpeg.exe -i original.png -crf 0 -vcodec libx264 output.mp4
And this command line On this "doubleHeight (https://i.stack.imgur.com/PLdsb.png)" image.: ffmpeg.exe -i doubleHeight.png -crf 0 -vcodec libx264 output.mp4
The double height version is darker than it should be. I've checked the resulting video in both Media Player Classic and Chrome.
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. The problem seems to occur in Media Player Classic with a height greater than or equal to 578, and in Chrome with a height greater than or equal to 720.
What gives?