Avidemux Forum

Avidemux => Windows => Topic started by: guju on November 12, 2023, 01:49:13 PM

Title: Export single frame darkened (Bug?)
Post by: guju on November 12, 2023, 01:49:13 PM
Take an mp4/h264/YUV420 movie
https://c.gmx.net/@1155842887640945833/o46DBll3QqiL0KZkxjFo4g

Open with MPC-HC or VirtualDub2
Export 1st frame (PNG)
Open movie with ADM.
Export 1st frame.
Result:
ADM frame is significantly (Not randomly, but overall) darker.

When recoding the movie with same settings (h264/YUV420/crf18)
the difference seems to be the same/ maybe stronger.

This is kind of importance as doing a detailed comparison
I often use frame export.
Title: Re: Export single frame darkened (Bug?)
Post by: eumagga0x2a on November 13, 2023, 12:06:05 AM
There are multiple pixel format and color range conversions involved, at least mpv screenshot seems to agree with JPEG export from Avidemux here (on macOS), but yes, it is generally a mess.


Title: Re: Export single frame darkened (Bug?)
Post by: guju on November 13, 2023, 09:25:57 AM
Thank you  :) - after all I do know now what's going on.
Title: Re: Export single frame darkened (Bug?)
Post by: guju on April 15, 2024, 03:46:47 PM
@eumagga0x2a:

This (https://forum.doom9.org/showthread.php?p=2000450#post2000450) might be an issue for you, as in my tests ADM generates the same (wrong) colors as ffmpeg.
In short: unsufficient flags for swscale.

EDIT:
Maybe not use swscale at all but zscale?