[RESOLVED] Metadata changes in a HDR stream

Support forum for DGDecNV
mparade
Posts: 27
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post by mparade » Mon Oct 22, 2018 3:27 pm

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
Site Admin
Posts: 4186
Joined: Thu Sep 09, 2010 3:08 pm

Re: Metadata changes in a HDR stream

Post by admin » Tue Oct 23, 2018 9:06 am

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.

mparade
Posts: 27
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post by mparade » Fri Oct 26, 2018 1:01 pm

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 16 times

User avatar
admin
Site Admin
Posts: 4186
Joined: Thu Sep 09, 2010 3:08 pm

Re: Metadata changes in a HDR stream

Post by admin » Fri Oct 26, 2018 1:20 pm

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.

mparade
Posts: 27
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post by mparade » Tue Dec 25, 2018 4:44 pm

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.

User avatar
gonca
Distinguished Member
Distinguished Member
Posts: 641
Joined: Sun Apr 08, 2012 6:12 pm

Re: Metadata changes in a HDR stream

Post by gonca » Tue Dec 25, 2018 5:42 pm

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)

mparade
Posts: 27
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post by mparade » Tue Dec 25, 2018 7:05 pm

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

User avatar
gonca
Distinguished Member
Distinguished Member
Posts: 641
Joined: Sun Apr 08, 2012 6:12 pm

Re: Metadata changes in a HDR stream

Post by gonca » Tue Dec 25, 2018 9:39 pm

Correct, dithering will alter the clip slightly, I believe.
The dgi file will also have the correct display numbers.

User avatar
admin
Site Admin
Posts: 4186
Joined: Thu Sep 09, 2010 3:08 pm

Re: Metadata changes in a HDR stream

Post by admin » Tue Dec 25, 2018 11:25 pm

Is the source HDR? If so, you'll want some DGHDRtoSDR() magic. If not, then ConvertBits(10) is fine.

mparade
Posts: 27
Joined: Mon Oct 13, 2014 7:45 am

Re: Metadata changes in a HDR stream

Post by mparade » Wed Dec 26, 2018 4:31 am

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:

Post Reply