Avidemux Forum

Participate => Avidemux Wiki => Topic started by: TheTooleMan on August 26, 2022, 02:29:08 PM

Title: setHDRConfig Parameters
Post by: TheTooleMan on August 26, 2022, 02:29:08 PM
When saving a script from Avidemux 2.8 64-bits, I notice in the subject method's parameter list contains a couple more digits than was seen in previous versions. Where can I learn how those are defined and used? Thanks.
Title: Re: setHDRConfig Parameters
Post by: eumagga0x2a on August 26, 2022, 04:37:49 PM
I hope that the locations here (https://github.com/mean00/avidemux2/blob/3ae4dcdd6a874f7245b93865c7f47f8873f854ec/avidemux/common/ADM_editor/src/ADM_edRender.cpp#L611) and here (https://github.com/mean00/avidemux2/blob/master/avidemux/common/ADM_commonUI/DIA_HDRConfig.cpp) in the source code help to clarify the meaning of the parameters.

Please be warned that it is impossible to force tone mapping for a video with wrong colorspace (e.g. with BT.709, it should be at least BT.2020 (https://github.com/mean00/avidemux2/blob/3ae4dcdd6a874f7245b93865c7f47f8873f854ec/avidemux_core/ADM_coreImage/include/ADM_rgb.h#L161)) or with bit depth less than 10.
Title: Re: setHDRConfig Parameters
Post by: TheTooleMan on September 01, 2022, 09:19:06 PM
Thanks for the links.
Title: Re: setHDRConfig Parameters
Post by: davidrnewman on September 19, 2022, 08:11:46 AM
Thanks for the explanation. However, the change has broken my saved scripts that use fewer parameters in setHDRConfig. When I load a video, then run a saved project file, it pops up a TinyPy:Exception referring to that line.

Any chance of automatically adding the extra parameters when importing saved scripts, so that I don't have to edit all my 370 saved scripts?

Title: Re: setHDRConfig Parameters
Post by: eumagga0x2a on September 19, 2022, 12:13:38 PM
Do you actually convert 10- or 12-bit HDR source videos into 8-bit SDR ones with tone mapping? If yes, you probably should adjust your tone mapping parameters due to changes in the backend anyway. Else you should just delete the setHDRConfig command from your scripts.

A chance to preserve backward compatibility has been missed, unfortunately.