This is another way to do HDR to SDR
I get real time playback (no encoding needed)
My Rig is a i7 3770k with 32 ddr3 ram and a rx480 (although its only really the CPU that gets a workout)
Using Windows 10 64bit and the following software -
MPC-BE 64bit -
https://www.videohelp.com/software/MPC-BE (MADVR -
http://www.madvr.com/)
Avisynth+ (64bit Version) -
https://github.com/pinterf/AviSynthPlus/releases
FFMS2 -
https://github.com/FFMS/ffms2/releases
JPSDR -
https://forum.doom9.org/showthread.php?t=174248
DGTonemap Filter -
http://rationalqm.us/mine.html
AVSresize (64bit Variant) -
https://forum.doom9.org/showthread.php?t=173986
Here is a basic install guide if you need it -
Download MPC-BE 64bit -
https://www.videohelp.com/software/MPC-BE and install.
Install Avisynth+ (64bit Version) -
https://github.com/pinterf/AviSynthPlus/releases I recommend the AvisynthPlus-MT-*****-with-Vc_redist.exe variant.
Download FFMS2 -
https://github.com/FFMS/ffms2/releases .7z (your going to need 7zip if you don’t already have it installed ) and move the FFMS2.avsi and contents of the 64bit folder to your AVIsynth Plugin folder (Normally C:\Program Files (x86)\AviSynth+\plugins64+)
Do the same again for JPSDR Avisynth plugin pack -
https://forum.doom9.org/showthread.php?t=174248
(Download the 'Binaries' link) I used the 64 bit version in the 'Release_W7_AVX2' folder as it matched my processor.
DGTonemap Filter -
http://rationalqm.us/mine.html 5th link down.
And finally for AVSresize (64bit Variant) -
https://forum.doom9.org/showthread.php?t=173986 (Just the contents of the 64bit folder)
Copy the following code and create a txt file using notepad.
Code:
SetFilterMTMode("z_ConvertFormat", MT_MULTI_INSTANCE)
ffms2("NAME OF FILE", atrack=-1, cachefile = "somefile.ffindex")
Spline36ResizeMT(1920,1080,SetAffinity=false)
z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l", dither_type="none")
DGHable()
z_ConvertFormat(pixel_type="YV24",colorspace_op="rgb:linear:2020:l=>709:709:709:l",dither_type="ordered")
PreFetch(4)
Change "NAME OF FILE" (keeping the " ") to the name of your video file (with file extension eg "Predator.mkv")
Change the 'PreFetch' value in the () on the last line to the number of cores in your processor, I have 4 logical cores and 8 threads. When I used (8) to take advantage of my threads I got stuttering!
Change the file extension .txt to .avs and move to the same directory of the video your playing.
Double click on the .avs file to begin playback. (Associate .AVS files with MPC if needed)
Note. There will be a slight delay an playback in the the first instance due to FFMS2 creating its cache file.
This is just a 2160 to 1080p and HDR to SDR conversion, and stays in 10bit.
I also adjust ‘Levels’ for a bit of color correction ect but there are many more things that can be added to the script.
I also use MAD-VR as the video renderer in MC-BE. It has its own HDR to SDR conversion but I turn that option off.
Also the audio track can also be changed if needed with the ‘atrack=-1’ command in line 2 of the script.
To keep this post on topic, here is the above script with a added line to bring the video into a more BD compliant state.
Code:
SetFilterMTMode("z_ConvertFormat", MT_MULTI_INSTANCE)
ffms2("NAME OF FILE", atrack=-1, cachefile = "somefile.ffindex")
Spline36ResizeMT(1920,1080,SetAffinity=false)
z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l", dither_type="none")
DGHable()
z_ConvertFormat(pixel_type="YV24",colorspace_op="rgb:linear:2020:l=>709:709:709:l",dither_type="ordered")
ConvertBits(8).Converttoyv12()
PreFetch(4)