How to register DGTonemap & DGHDRtoSDR filters in StaxRip - staxrip/staxrip GitHub Wiki
Download & unzip the filter files
Download DGTonemap
and DGHDRtoSDR
from the developer's site or here to get the latest versions including DGHDRtoSDR
v1.4.
(Make sure to put x64 versions if your system is x64.)
DGTonemap
supports AviSynth only while DGHDRtoSDR
supports both AviSynth and VapourSynth (dual mode).
Recommended places for the filters are as follows:
%settings_dir%Plugins\AviSynth\DGTonemap\DGTonemap.dll
%settings_dir%Plugins\Dual\DGHDRtoSDR\DGHDRtoSDR.dll
You can find your %settings_dir%
by clicking Tools
> Folders
> Settings
menu.
Of course, you can always save the filters in other places. But somewhere under %settings_dir%
is recommended in order to preserve the program folder structure as it is shipped.
Now open an empty StaxRip window and do the following setup.
AviSynth filters
Open and edit AVS profiles:
DGTonemap
Put DGTonemap
item under the [Color] section with a code snippet as follows:
HDR to SDR | DGTonemap =
LoadPlugin("%settings_dir%Plugins\AviSynth\DGTonemap\DGTonemap.dll")
$select:msg:Select the Tone Map you wish to use;DGReinhard|DGReinhard();DGHable|DGHable()$
DGHDRtoSDR
Add the following item related to DGHDRtoSDR
under the [Color] section:
HDR to SDR | DGHDRtoSDR =
LoadPlugin("%settings_dir%Plugins\Dual\DGHDRtoSDR\DGHDRtoSDR.dll")
DGHDRtoSDR(mode="$select:msg:Select Transfer Function;Perceptual Quantizer|pq;Hybrid Log Gamma|hlg$", white=$enter_text:Enter Overall Brightness in integer (max 2,000 for PQ, max 10,000 for HLG)$)
VapourSynth filters
Change the filters type from AviSynth to VapourSynth by clicking Filter Setup ⇨ VapourSynth:
Open and edit VS profiles:
DGHDRtoSDR
Add the following item related to DGHDRtoSDR
under the [Color] section:
HDR to SDR | DGHDRtoSDR =
core.std.LoadPlugin(r"%settings_dir%Plugins\Dual\DGHDRtoSDR\DGHDRtoSDR.dll")
clip = core.dghdrtosdr.DGHDRtoSDR(clip, mode="$select:msg:Select Transfer Function;Perceptual Quantizer|pq;Hybrid Log Gamma|hlg$", white=$enter_text:Enter Overall Brightness in integer (max 2,000 for PQ, max 10,000 for HLG)$)
You can always edit the profiles code by referring to the StaxRip macros document.