[RESOLVED] Metadata changes in a HDR stream

Support forum for DGDecNV
Post Reply
DAE avatar
mparade
Posts: 29
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post 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.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Metadata changes in a HDR stream

Post 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.
DAE avatar
mparade
Posts: 29
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post 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. :)
Attachments
hdr10 - multiple metadata problem.zip
(851.06 KiB) Downloaded 401 times
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Metadata changes in a HDR stream

Post 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.
DAE avatar
mparade
Posts: 29
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post 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.
DAE avatar
Guest

Re: Metadata changes in a HDR stream

Post 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)
DAE avatar
mparade
Posts: 29
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post by mparade »

Thank you. This means for me that there is no need to add any dithering (default = -1 = do not add dither).
DAE avatar
Guest

Re: Metadata changes in a HDR stream

Post by Guest »

Correct, dithering will alter the clip slightly, I believe.
The dgi file will also have the correct display numbers.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Metadata changes in a HDR stream

Post by admin »

Is the source HDR? If so, you'll want some DGHDRtoSDR() magic. If not, then ConvertBits(10) is fine.
DAE avatar
mparade
Posts: 29
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post 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:
DAE avatar
Guest

Re: Metadata changes in a HDR stream

Post 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)
Post Reply