This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] 4K HDR x265 to 1080p SDR AV1
#2
Quote:Filtering->Vapoursynth->Color->HDR to SDR->HDR10ToSDR but it doesn't effect.
Did a quick test, just enabling HDR10ToSDR and it works fine here:
[Image: HDR2SDR.png]
I also checked the Vapoursynth script view:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/DGDecNV/DGDecodeNV.dll")
# Import scripts
import tmap
# source: 'G:\TestClips&Co\files\HDR\HDR10\HDR 2020.mkv'
# current color space: YUV420P10, bit depth: 10, resolution: 3840x2160, fps: 23.976, color matrix: 2020ncl, yuv luminance scale: limited, scanorder: progressive
# Loading G:\TestClips&Co\files\HDR\HDR10\HDR 2020.mkv using DGSource
clip = core.dgdecodenv.DGSource("J:/tmp/mkv_7fdb93a272e97a08002fb0b6279a6406_853323747.dgi")# 23.976 fps, scanorder: progressive
frame = clip.get_frame(0)
# Setting detected color matrix (2020ncl).
clip = core.std.SetFrameProps(clip, _Matrix=9)
# Setting color transfer (to 2020ncl), if it is not set.
if '_Transfer' not in frame.props or not frame.props['_Transfer']:
  clip = core.std.SetFrameProps(clip, _Transfer=14)
# Setting color primaries info (to 9), if it is not set.
if '_Primaries' not in frame.props or not frame.props['_Primaries']:
  clip = core.std.SetFrameProps(clip, _Primaries=9)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 23.976
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
# Color Adjustment
clip = tmap.hablehdr10tosdr(clip=clip, source_peak=1000, desat=50, tFormat=vs.YUV420P8, tMatrix="709", tRange="limited", color_loc="center", lin="True", show_satmask="False", show_clipped="False")
# adjusting output color from: YUV420P8 to YUV420P10 for NVEncModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
# set output frame rate to 23.976fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Output
clip.set_output()
and the script looks as it should.
I additionally tried the other HDR->SDR methods with their default values,... (settings usually should be adjusted)
I then disabled HDR10toSDR and enabled ToneMap:
[Image: ToneMap.png]
then I disabled ToneMap and enabled 'HDR10 to SDR (DG)'
[Image: grafik.png]
disabled 'HDR10 to SDR (DG)' and enabled 'ToneMap (Placebo)':
[Image: grafik.png]
disabled 'ToneMap (Placebo)' and enabled 'TimeCube with 'BT2020 to BT601_NTSC':
[Image: grafik.png]

Not sure, what you are doing. One thing that comes to mind is that you might want to check the VUI settings in your encoding settings.

Quote:After conversion source and output videos looks the same.
On an HDR monitor or with a media player that supports HDR to SDR conversion on-the-fly, this is the ideal outcome.
(ideally HDR->SDR converts the HDR data to change the SDR representation so that it looks as similar as possible to the HDR version)

Can't really reproduce your problem.

=> What does MediaInfo say about the input and the output?

Cu Selur

Ps.: in Comparison view for HDR content, the left always shows the SDR data in the stream without the HDR data applied. (so the same way a none-HDR capable player would show the video)
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
4K HDR x265 to 1080p SDR AV1 - by LuCa4S - 18.01.2024, 18:21
RE: 4K HDR x265 to 1080p SDR AV1 - by Selur - 18.01.2024, 19:01
RE: 4K HDR x265 to 1080p SDR AV1 - by LuCa4S - 18.01.2024, 20:03
RE: 4K HDR x265 to 1080p SDR AV1 - by Selur - 18.01.2024, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)