Page 1 of 1

Re: Metadata changes in a HDR stream

Posted: Mon Oct 22, 2018 3:27 pm
by mparade
Isn't it possible for DGIndexNV to export the dynamic metadata from a HDR10+ stream?
Then one could import the resulted json file ("with the meta data that follows samsung's description") into x265 using the -dhdr10-info " path to file" option. :) I would pay for such a new feature.

Re: Metadata changes in a HDR stream

Posted: Tue Oct 23, 2018 9:06 am
by admin
The HDR10 stream should not have different metadata SEIs. I cannot investigate it because you haven't given me anything.

Regarding the export idea, can you link me to the specifications for the Samsung description and something about its JSON representation? Be aware that I have heard the term JSON but I have no idea what it is.

Re: Metadata changes in a HDR stream

Posted: Fri Oct 26, 2018 1:01 pm
by mparade
Hello,

I have just created this file on my HTPC with an older version of DGIndexNV installed. Please let me know if it is not ok to solve the problem. :)

Re: Metadata changes in a HDR stream

Posted: Fri Oct 26, 2018 1:20 pm
by admin
I can't do much with the DGI file. Can you cut the first 100MB, index that, and see if the two MASTERING lines are present. If so, then link to the cut stream.

Re: Metadata changes in a HDR stream

Posted: Tue Dec 25, 2018 3:44 pm
by mparade
Hello there,

I have just got started again my encoding job around my archive collection after a short break... :)
At the moment I do not really know what to do with the 16-bit hdr output of dgdecnv.
I'd either use ConvertBits(10) feature at the end of my script or just feed the 16-bit hdr stream directly into x265 to do a similar job.
Should I use some kind of dithering of it to 10bit (output bitdepth) by using ConvertBits or the internal --dither mode of x265?
Or there is no point of dithering at this stage all? I do not want to lose quality on my mistake.

Any help would be appreciated.

Re: Metadata changes in a HDR stream

Posted: Tue Dec 25, 2018 4:42 pm
by Guest
From the manual
fulldepth: true/false (default: false)

When fulldepth=true and the encoded video is HEVC 10-bit or 12-bit, then DGSource() delivers 16-bit data to Avisynth with the unused lower bits zeroed. The reported pixel format is CS_YUV420P16. If either of the two conditions are not met, then DGSource() delivers 8-bit YV12 or I420 data, as determined by the i420 parameter. When fulldepth=false and the video is HEVC 10-bit or 12-bit, then the video is dithered down to 8-bit for delivery. If you need a reduced color space (less than 16 bits) for your high-bit-depth processing, you can use ConvertBits() as needed after your DGSource() call.
Here is my basic HDR AVS template

Code: Select all

LoadPlugin("C:/Program Files (Portable)/dgdecnv/x64 Binaries/DGDecodeNV.dll")
DGSource("__vid__", fieldop=0, fulldepth=True)
ConvertBits(10)

Re: Metadata changes in a HDR stream

Posted: Tue Dec 25, 2018 6:05 pm
by mparade
Thank you. This means for me that there is no need to add any dithering (default = -1 = do not add dither).

Re: Metadata changes in a HDR stream

Posted: Tue Dec 25, 2018 8:39 pm
by Guest
Correct, dithering will alter the clip slightly, I believe.
The dgi file will also have the correct display numbers.

Re: Metadata changes in a HDR stream

Posted: Tue Dec 25, 2018 10:25 pm
by admin
Is the source HDR? If so, you'll want some DGHDRtoSDR() magic. If not, then ConvertBits(10) is fine.

Re: Metadata changes in a HDR stream

Posted: Wed Dec 26, 2018 3:31 am
by mparade
Thank you. x265's "slower preset speed" increased a lot recently so it is high time again to archiveā€¦:)
Yes. The sources are HDR and I want to keep both resolution and color space intact in my encodes altough DGHDRtoSDR must be working like a magic wand. :lol:

Re: Metadata changes in a HDR stream

Posted: Wed Dec 26, 2018 7:47 pm
by Guest
Just in case you need it and it helps in future
DGHDRtoSDR template

Code: Select all

LoadPlugin("C:/Program Files (Portable)/dgdecnv/x64 Binaries/DGDecodeNV.dll")
DGSource("__vid__", fieldop=0, fulldepth=True)
LoadPlugin("C:/Program Files (Portable)/AVS Templates/DGHDRtoSDR/x64/DGHDRtoSDR.dll")
DGHDRtoSDR(impl="255", fulldepth=True, light=300.0, gamma=0.42, hue=0.5, sat=1.0, tm=1.0, roll=0.5)
prefetch(16)
DGPQtoHLG template

Code: Select all

LoadPlugin("C:/Program Files (Portable)/dgdecnv/x64 Binaries/DGDecodeNV.dll")
DGSource("__vid__", fieldop=0, fulldepth=True)
LoadPlugin("C:/Program Files (Portable)/AVS Templates/DGPQtoHLG/x64/DGPQtoHLG.dll")
DGPQtoHLG(impl="255",light=1000)
prefetch(16)