UHD Disc losing HDR metadata

Discussion in 'CloneBD' started by CCaptain00, Jan 19, 2018.

  1. CCaptain00

    CCaptain00 Active Member

    I usually use Handrake for my Blu-ray encodes, but since it only has an 8 bit pipeline and doesn't preserve HDR I am trying CloneBD (longtime Anydvd and CloneDVD user). I backed up a UHD disc to folders using MakeMKV. I confirmed using MediaInfo 17.12 that HDR metadata was present in the correct m2ts file.

    Video
    ID : 4113 (0x1011)
    Menu ID : 1 (0x1)
    Format : HEVC
    Format/Info : High Efficiency Video Coding
    Format profile : Main 10@L5.1@High
    Codec ID : 36
    Duration : 2 h 43 min
    Width : 3 840 pixels
    Height : 2 160 pixels
    Display aspect ratio : 16:9
    Frame rate : 23.976 (24000/1001) FPS
    Color space : YUV
    Chroma subsampling : 4:2:0 (Type 2)
    Bit depth : 10 bits
    Color range : Limited
    Color primaries : BT.2020
    Transfer characteristics : PQ
    Matrix coefficients : BT.2020 non-constant
    Mastering display color primaries : BT.2020
    Mastering display luminance : min: 0.0050 cd/m2, max: 10000 cd/m2
    Maximum Content Light Level : 500 cd/m2
    Maximum Frame-Average Light Level : 200 cd/m2


    However in the resulting MKV after encode, it appears that the HDR metadata is no longer present.

    Video
    ID : 1
    Format : HEVC
    Format/Info : High Efficiency Video Coding
    Format profile : Main 10@L5@Main
    Codec ID : V_MPEGH/ISO/HEVC
    Duration : 2 h 43 min
    Width : 3 840 pixels
    Height : 2 160 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 23.976 (24000/1001) FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 10 bits
    Writing library : x265 2.5:[Windows][GCC 7.2.0][64 bit] 10bit
    Encoding settings : cpuid=1173503 / frame-threads=8 / numa-pools=8 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=8 / scenecut=40 / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / analysis-reuse-mode=0 / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=abr / bitrate=6127 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / opt-qp-pps / opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0
    Default : Yes
    Forced : No

    Is there a way to preserve the HDR metadata?
     
  2. Pete

    Pete Forum Admin Staff Member

    Can you please provide a CloneBD log file? We need to see what settings, which encoder, whether or not it's hw accelerated....
    (Doesn't have to be a complete transcode, you can abort after a while and then create a log file).
     
  3. CCaptain00

    CCaptain00 Active Member

    Thank you. I have something else going on currently but I will shortly.
     
  4. CCaptain00

    CCaptain00 Active Member

    Here is the log.
     

    Attached Files:

  5. CCaptain00

    CCaptain00 Active Member

    What I'm trying to do is compress the UHD video while retaining the original resolution, 10bit color, HDR metadata, and 7.1 lossless audio into a mkv for playback on a Roku Ultra over DNLA. The files created do playback over DNLA on the Roku, but according to media info, I lost the HDR metadata. I have to backup the disc with MakeMKV because I do not have the correct key for the AnyDVD KEYDB. I normal use handbrake but it's video pipe converts to 8bit before converting back to 10bit. If I can get this to work I will purchase CloneBD.

    Here is what is missing after conversion:

    Color range : Limited
    Color primaries : BT.2020
    Transfer characteristics : PQ
    Matrix coefficients : BT.2020 non-constant
    Mastering display color primaries : BT.2020
    Mastering display luminance : min: 0.0050 cd/m2, max: 10000 cd/m2
    Maximum Content Light Level : 500 cd/m2
    Maximum Frame-Average Light Level : 200 cd/m2
     
    Last edited: Jan 20, 2018
  6. Pete

    Pete Forum Admin Staff Member

    OK, I can confirm the missing information, I'll have to check, whether it has any effect on output (there are certain defaults defined, so if these defaults match the values, then there would be no need).
    But I'll ask Elby to put them in anyway.
     
  7. spcav

    spcav Beta Tester

    OK, I know that this may be a bit off topic but I think it worths the try.

    Playing the same UHD disc with by desktop UHD player (Panasonic UBD 900), MPC / madVR 0.92.10 and DVDFab player 5 (the latter using a UHD Full rip via my PC with Nvidia 1060 (390.65 driver)) I get different HDR metadata in the output stream.

    Both my UHD desktop player and the PC are connected to a Lumagen Pro image processor which shows the HDR metada which gets from the source.

    For example, playing Fabtastic Beasts, I get HDR min 50, max 4000, CLL 3170 (which are the right values) with Panny, 0-1000-0 with MPC and 300-1000-1000 with DVDFab.

    Any ideas?
     
  8. CCaptain00

    CCaptain00 Active Member

    Interesting. Is this your correct test setups?

    Panasonic UBD900 UHD player and Disc
    Desktop - UHD Disc and MPC / madVR
    Desktop - UHD Full rip - DVDFab player

    It looks like like MPC is just using standard values. Not sure about DVD Fab. Did you verify the correct metadata on the rip?
     
  9. spcav

    spcav Beta Tester

    Setup:

    Panasonic UBD900 UHD player and Disc
    Desktop - UHD Full rip - MPC / madVR
    Desktop - UHD Full rip - DVDFab player

    How do I verify the correct metadata on the rip?
     
  10. CCaptain00

    CCaptain00 Active Member