UHD HDR: no compatibility of HandBrake encode, muxing issue?

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by jd17 »

Please describe the problem in as much detail as possible:
UHD HDR encodes created with HandBrake will not play on TV's internal mediaplayer (USB).
Identical encode created with Hybrid plays fine.

HandBrake encode only plays on the TV's internal player when I leave out the master-display string:
master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)

(TV is an LG OLED65B6V.)

What are the steps to reproduce this problem:
Encode a UHD HDR video and use the master-display string, try to play encode on media players.
I used the Samsung HDR Wonderland demo:
https://openload.co/f/Zfi6a9o4VV4/Samsu ... _hdr10.mkv

My encode parameters:
x265 10bit (2.3 (HandBrake forum), 2.4+13 and 2.5+1 (http://www.msystem.waw.pl/x265/) tested.
Preset: medium
Tune: none
CRF 17

Extra Options:
no-sao:level-idc=51:hdr-opt:hrd:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500):max-cll=0,0

What version of HandBrake you are running:
Same issue on 1.0.7 and latest Nightly.

What operating system and version and you running (e.g. OSX 10.11, Windows 7, Ubuntu 14):
Windows 10 64bit v1703.

Where did you download HandBrake from? handbrake.fr or somewhere else?
handbrake.fr

If there was any error, exception or crash report displayed, please copy it and paste it here:
No error.

Please include the scan or encode log:

Code: Select all

HandBrake Nightly 20170711194400-1de8f69-master (2017071201) - 64bit
OS: Microsoft Windows NT 10.0.15063.0 - 64bit
CPU: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Ram: 15310 MB, 
GPU Information:
  Intel(R) HD Graphics 630 - 21.20.16.4664
Screen: 1920x1200
Temp Dir: C:\Users\jd17\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake Nightly
Data Dir: C:\Users\jd17\AppData\Roaming\HandBrake Team\HandBrake\1.1.0.0

-------------------------------------------


# Starting Encode ...

[00:20:38] hb_init: starting libhb thread
[00:20:38] 1 job(s) to process
[00:20:38] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 1
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "C:\\_encode\\handbrake-test1-2.5.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "2160",
          "width": "3840"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "F:\\_encode\\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 8192,
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "no-sao:level-idc=51:hdr-opt:hrd:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500):max-cll=0,0",
    "Preset": "medium",
    "Profile": "auto",
    "Quality": 17.0,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[00:20:38] CPU: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
[00:20:38]  - Intel microarchitecture Kaby Lake
[00:20:38]  - logical processor count: 4
[00:20:38] Intel Quick Sync Video support: yes
[00:20:38]  - Intel Media SDK hardware: API 1.23 (minimum: 1.3)
[00:20:38]  - H.264 encoder: yes
[00:20:38]     - preferred implementation: hardware (any)
[00:20:38]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[00:20:38]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[00:20:38]     - preferred implementation: hardware (any)
[00:20:38]     - capabilities (hardware):  bpyramid vsinfo opt1
[00:20:38] hb_scan: path=F:\_encode\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image F:\_encode\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[00:20:38] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[00:20:38] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'F:\_encode\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv':
  Duration: 00:02:41.16, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: hevc (Main 10)
      yuv420p10le, tv, bt2020nc/bt2020/smpte2084
      3840x2160 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 1k tbn (default)
    Metadata:
      BPS             : 45707418
      BPS-eng         : 45707418
      DURATION        : 00:02:41.161000000
      DURATION-eng    : 00:02:41.161000000
      NUMBER_OF_FRAMES: 3864
      NUMBER_OF_FRAMES-eng: 3864
      NUMBER_OF_BYTES : 920781666
      NUMBER_OF_BYTES-eng: 920781666
      _STATISTICS_WRITING_APP: mkvmerge v13.0.0 ('The Juggler') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v13.0.0 ('The Juggler') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-07-06 18:48:56
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-07-06 18:48:56
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[00:20:38] scan: decoding previews for title 1
[00:20:48] scan: 10 previews, 3840x2160, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[00:20:48] libhb: scan thread found 1 valid title(s)
[00:20:48] starting job
[00:20:48] work: only 1 chapter, disabling chapter markers
[00:20:48] job configuration:
[00:20:48]  * source
[00:20:48]    + F:\_encode\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv
[00:20:48]    + title 1, chapter(s) 1 to 1
[00:20:48]    + container: matroska,webm
[00:20:48]  * destination
[00:20:48]    + C:\_encode\handbrake-test1-2.5.mkv
[00:20:48]    + container: Matroska (libavformat)
[00:20:48]  * video track
[00:20:48]    + decoder: hevc
[00:20:48]    + filters
[00:20:48]      + Framerate Shaper (mode=0)
[00:20:48]        + frame rate: same as source (around 23.976 fps)
[00:20:48]      + Crop and Scale (width=3840:height=2160:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[00:20:48]        + source: 3840 * 2160, crop (0/0/0/0): 3840 * 2160, scale: 3840 * 2160
[00:20:48]    + Output geometry
[00:20:48]      + storage dimensions: 3840 x 2160
[00:20:48]      + pixel aspect ratio: 1 : 1
[00:20:48]      + display dimensions: 3840 x 2160
[00:20:48]    + encoder: H.265 10-bit (libx265)
[00:20:48]      + preset:  medium
[00:20:48]      + options: no-sao:level-idc=51:hdr-opt:hrd:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500):max-cll=0,0
[00:20:48]      + profile: auto
[00:20:48]      + quality: 17.00 (RF)
[00:20:48] sync: expecting 3864 video frames
[00:20:49] sync: first pts video is 0
[00:20:49] sync: "Chapter 1" (1) at frame 1 time 0
[00:39:02] reader: done. 1 scr changes
[00:39:33] work: average encoding speed for job is 3.480805 fps
[00:39:34] vfr: lost time: 0 (0 frames)
[00:39:34] vfr: gained time: 0 (0 frames) (0 not accounted for)
[00:39:34] hevc-decoder done: 3864 frames, 0 decoder errors
[00:39:34] sync: got 3864 frames, 3864 expected
[00:39:34] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
[00:39:34] mux: track 0, 3864 frames, 295835105 bytes, 14685.20 kbps, fifo 512
[00:39:34] libhb: work result = 0

# Encode Completed ...

MediaInfo HandBrake encode:

Code: Select all

General
Unique ID                                : 25137540607718895181579008795944933011 (0x12E950709F1185F551E5AF25F533D693)
Complete name                            : C:\_encode\handbrake-test1-2.5.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 282 MiB
Duration                                 : 2 min 41 s
Overall bit rate                         : 14.7 Mb/s
Encoded date                             : UTC 2017-07-15T22:20:48Z
Writing application                      : HandBrake 20170711194400-1de8f69-master 2017071201
Writing library                          : Lavf57.7.2

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 2 min 41 s
Bit rate                                 : 14.4 Mb/s
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
Bits/(Pixel*Frame)                       : 0.072
Stream size                              : 277 MiB (98%)
Writing library                          : x265 2.5+1-adbcc90bdef3:[Windows][MSVC 1910][64 bit] 10bit
Encoding settings                        : cpuid=1173503 / frame-threads=2 / numa-pools=4 / 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=51 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / repeat-headers / annexb / no-aud / hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / 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 / no-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=crf / crf=17.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.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=9 / transfer=16 / colormatrix=9 / chromaloc=0 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500) / 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 / hdr / 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
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : SMPTE ST 2084
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : R: x=0.680000 y=0.320000, G: x=0.265000 y=0.690000, B: x=0.150000 y=0.060000, White point: x=0.312700 y=0.329000
Mastering display luminance              : min: 0.0500 cd/m2, max: 1000.0000 cd/m2
MediaInfo Hybrid:

Code: Select all

General
Unique ID                                : 217123577944451960012513319253810230841 (0xA3587AE3DF94D25EBDAC9A25576A3639)
Complete name                            : C:\_encode\hybrid test2.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 273 MiB
Duration                                 : 2 min 41 s
Overall bit rate                         : 14.2 Mb/s
Encoded date                             : UTC 2017-07-15 22:09:29
Writing application                      : mkvmerge v13.0.0 ('The Juggler') 64bit
Writing library                          : libebml v1.3.4 + libmatroska v1.4.5
Encoding Gui                             : Hybrid 2017.05.06.1

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 2 min 41 s
Bit rate                                 : 14.2 Mb/s
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
Bits/(Pixel*Frame)                       : 0.071
Stream size                              : 273 MiB (100%)
Writing library                          : x265 2.5+1-adbcc90bdef3:[Windows][MSVC 1910][64 bit] 10bit
Encoding settings                        : cpuid=1173503 / frame-threads=2 / numa-pools=4 / 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=51 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / repeat-headers / annexb / no-aud / 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 / no-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=crf / crf=17.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.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=9 / transfer=16 / colormatrix=9 / chromaloc=0 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500) / 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 / hdr / 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                                   : Yes
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : SMPTE ST 2084
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : R: x=0.680000 y=0.320000, G: x=0.265000 y=0.690000, B: x=0.150000 y=0.060000, White point: x=0.312700 y=0.329000
Mastering display luminance              : min: 0.0500 cd/m2, max: 1000.0000 cd/m2
There is only a minor keyint difference between the two, it has no impact on compatibility:
24 / 240 in HandBrake
23 / 250 in Hybrid
Deleted User 11865

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by Deleted User 11865 »

Can you please also post the HandBrake log and MediaInfo report for the encode without the master display coefficients?
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by jd17 »

Of course!

I had already deleted the initial encode, but I created a new one...
I forgot to mention that I also need to disable level-idc=51, although the source video is 5.1 High (and plays perfectly on the TV's media player).
Just disabling level-idc=51 does not do the trick, master-display needs to be disabled as well.

Log:

Code: Select all

HandBrake Nightly 20170711194400-1de8f69-master (2017071201) - 64bit
OS: Microsoft Windows NT 10.0.15063.0 - 64bit
CPU: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Ram: 15310 MB, 
GPU Information:
  Intel(R) HD Graphics 630 - 21.20.16.4664
Screen: 1920x1200
Temp Dir: C:\Users\jd17\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake Nightly
Data Dir: C:\Users\jd17\AppData\Roaming\HandBrake Team\HandBrake\1.1.0.0

-------------------------------------------


# Starting Encode ...

[15:35:29] hb_init: starting libhb thread
[15:35:29] 1 job(s) to process
[15:35:29] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 1
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "C:\\_encode\\handbrake-test1-2.5 no-master no-51.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "2160",
          "width": "3840"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "D:\\_encode\\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 8192,
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "no-sao:hdr:hdr-opt:hrd",
    "Preset": "medium",
    "Profile": "auto",
    "Quality": 17.0,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[15:35:29] CPU: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
[15:35:29]  - Intel microarchitecture Kaby Lake
[15:35:29]  - logical processor count: 4
[15:35:29] Intel Quick Sync Video support: yes
[15:35:29]  - Intel Media SDK hardware: API 1.23 (minimum: 1.3)
[15:35:29]  - H.264 encoder: yes
[15:35:29]     - preferred implementation: hardware (any)
[15:35:29]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[15:35:29]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[15:35:29]     - preferred implementation: hardware (any)
[15:35:29]     - capabilities (hardware):  bpyramid vsinfo opt1
[15:35:29] hb_scan: path=D:\_encode\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image D:\_encode\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[15:35:29] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[15:35:29] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'D:\_encode\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv':
  Duration: 00:02:41.16, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: hevc (Main 10)
      yuv420p10le, tv, bt2020nc/bt2020/smpte2084
      3840x2160 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 1k tbn (default)
    Metadata:
      BPS             : 45707418
      BPS-eng         : 45707418
      DURATION        : 00:02:41.161000000
      DURATION-eng    : 00:02:41.161000000
      NUMBER_OF_FRAMES: 3864
      NUMBER_OF_FRAMES-eng: 3864
      NUMBER_OF_BYTES : 920781666
      NUMBER_OF_BYTES-eng: 920781666
      _STATISTICS_WRITING_APP: mkvmerge v13.0.0 ('The Juggler') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v13.0.0 ('The Juggler') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-07-06 18:48:56
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-07-06 18:48:56
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[15:35:29] scan: decoding previews for title 1
[15:35:39] scan: 10 previews, 3840x2160, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[15:35:39] libhb: scan thread found 1 valid title(s)
[15:35:39] starting job
[15:35:39] work: only 1 chapter, disabling chapter markers
[15:35:39] job configuration:
[15:35:39]  * source
[15:35:39]    + D:\_encode\Samsung_HDR_Wonderland_2160p_hevc_10bit_23.976hz_bt.2020_hdr10.mkv
[15:35:39]    + title 1, chapter(s) 1 to 1
[15:35:39]    + container: matroska,webm
[15:35:39]  * destination
[15:35:39]    + C:\_encode\handbrake-test1-2.5 no-master no-51.mkv
[15:35:39]    + container: Matroska (libavformat)
[15:35:39]  * video track
[15:35:39]    + decoder: hevc
[15:35:39]    + filters
[15:35:39]      + Framerate Shaper (mode=0)
[15:35:39]        + frame rate: same as source (around 23.976 fps)
[15:35:39]      + Crop and Scale (width=3840:height=2160:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[15:35:39]        + source: 3840 * 2160, crop (0/0/0/0): 3840 * 2160, scale: 3840 * 2160
[15:35:39]    + Output geometry
[15:35:39]      + storage dimensions: 3840 x 2160
[15:35:39]      + pixel aspect ratio: 1 : 1
[15:35:39]      + display dimensions: 3840 x 2160
[15:35:39]    + encoder: H.265 10-bit (libx265)
[15:35:39]      + preset:  medium
[15:35:39]      + options: no-sao:hdr:hdr-opt:hrd
[15:35:39]      + profile: auto
[15:35:39]      + quality: 17.00 (RF)
[15:35:39] sync: expecting 3864 video frames
[15:35:39] sync: first pts video is 0
[15:35:39] sync: "Chapter 1" (1) at frame 1 time 0
[15:54:18] reader: done. 1 scr changes
[15:54:47] work: average encoding speed for job is 3.405369 fps
[15:54:48] vfr: lost time: 0 (0 frames)
[15:54:48] vfr: gained time: 0 (0 frames) (0 not accounted for)
[15:54:48] hevc-decoder done: 3864 frames, 0 decoder errors
[15:54:48] sync: got 3864 frames, 3864 expected
[15:54:48] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
[15:54:48] mux: track 0, 3864 frames, 293585704 bytes, 14573.54 kbps, fifo 512
[15:54:48] libhb: work result = 0

# Encode Completed ...

MediaInfo:

Code: Select all

General
Unique ID                                : 202430725770805685259002912517693862680 (0x984ABD5937B90316710D7F62BFD77318)
Complete name                            : C:\_encode\handbrake-test1-2.5 no-master no-51.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 280 MiB
Duration                                 : 2 min 41 s
Overall bit rate                         : 14.6 Mb/s
Encoded date                             : UTC 2017-07-16T13:35:39Z
Writing application                      : HandBrake 20170711194400-1de8f69-master 2017071201
Writing library                          : Lavf57.7.2

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 min 41 s
Bit rate                                 : 14.3 Mb/s
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
Bits/(Pixel*Frame)                       : 0.072
Stream size                              : 274 MiB (98%)
Writing library                          : x265 2.5+1-adbcc90bdef3:[Windows][MSVC 1910][64 bit] 10bit
Encoding settings                        : cpuid=1173503 / frame-threads=2 / numa-pools=4 / 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 / repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / 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 / no-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=crf / crf=17.0 / 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=9 / transfer=16 / colormatrix=9 / 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 / hdr / 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
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : SMPTE ST 2084
Matrix coefficients                      : BT.2020 non-constant
Deleted User 11865

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by Deleted User 11865 »

Hmm, this encode has many differences compared to the non-working one:

level 5.1 -> 5.0
tier high -> main
hrd -> no-hrd
vbv -> no restrictions (probably the result of not specifying a level too)
custom master display coefficients -> default

If I had to guess, I'd say it's probably indeed something in the extradata (Matroska's CodecPrivate) that's either present when it shouldn't be, or missing.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by jd17 »

Hi Rodeo,

maybe --hrd does not work without --master-display?

I did add it in the extra options:
"Options": "no-sao:hdr:hdr-opt:hrd"
--tier-high is automatically triggered by --level-idc 5.1, the same goes for vbv.

Either way - the TV accepts all of these parameters when they are coming from Hybrid...

Is there something you can do about it? :)

If there is anything else I can do to support, let me know - maybe another encode with altered parameters?
Deleted User 11865

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by Deleted User 11865 »

Nah, at this point I don't have any requests that I couldn't check myself -- whether I have time to test the extradata is another matter though.

Other developers may have other ideas though.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by jd17 »

Is SEI the extradata you are referring to?
That is something someone at doom9 suggested as well...

There is one unmentioned difference between the Hybrid and HandBrake encode:
I do have to manually add UHD parameters in Hybrid, while Handbrake automatically uses the source values:
--colorprim bt2020 --transfer smpte-st-2084 --colormatrix bt2020nc

Shall I try adding those in HandBrake as well?
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by jd17 »

jd17 wrote: Sun Jul 16, 2017 4:35 pmThere is one unmentioned difference between the Hybrid and HandBrake encode:
I do have to manually add UHD parameters in Hybrid, while Handbrake automatically uses the source values:
--colorprim bt2020 --transfer smpte-st-2084 --colormatrix bt2020nc

Shall I try adding those in HandBrake as well?
I tried that last night, it did not help.
The TV's media player still won't play the file.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by jd17 »

Did anyone have a chance to look into this? :)
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by BradleyS »

I noticed a very subtle difference, min-keyint=24 / keyint=240 versus min-keyint=23 / keyint=250 for Hybrid. Also, the Hybrid video track appears to be marked Forced.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by jd17 »

Hi,
as I said, keyint makes no difference...
jd17 wrote: Sun Jul 16, 2017 10:20 amThere is only a minor keyint difference between the two, it has no impact on compatibility:
24 / 240 in HandBrake
23 / 250 in Hybrid
... and neither does the forced flag.

The Handbrake encode does also not play when I add --uhd-bd, which reduces --keyint to 1 / 24.

keyint 1 / 120 does not work either (my custom setting for UHD).
AlienVolt
Posts: 2
Joined: Tue Aug 01, 2017 1:51 am

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by AlienVolt »

Handbrake It supports HDR
If so, which code?
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by jd17 »

Any news? :)

I know I am being annoying but I love HandBrake just too much. :P
WhatZit
Experienced
Posts: 77
Joined: Sat Feb 13, 2016 2:45 am

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by WhatZit »

jd17 wrote: Sun Aug 06, 2017 1:27 pm Any news? :)
A mystery no-one can figure out, eh?

Not wanting to open a horrible can of worms, I have to point out that there IS a big difference between the two:

Hybrid is a ffmpeg-based project.

Handbrake is a libav-based project.

I'd be starting your investigation there.
Deleted User 11865

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by Deleted User 11865 »

Hybrid seems to use mkvmerge for muxing, so FFmpeg/libavformat isn't actually used as far as multiplexing goes (libavcodec may be used as a wrapper for libx265, but the resulting bitstream and extradata would be identical to using it directly).

TBH there's probably many more differences between mkvmerge and libavformat, than there is between FFmpeg libavformat's vs. the libav equivalent.
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by s55 »

Have you tried remuxing it with mkvmerge? We've already seen a lot of TV sets not be able to play, or only be able to play some HandBrake files due to bugs in their parsers. Usually it's we are including something that's valid by spec but their parsers can't handle.

Remuxing will atleast confirm it's a container level problem.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by jd17 »

Yes, I have tried that.

Remuxing the files that came directly out of HandBrake with mkvmerge does not solve it.
The TV will still not play those files.
WhatZit
Experienced
Posts: 77
Joined: Sat Feb 13, 2016 2:45 am

Re: UHD HDR: no compatibility of HandBrake encode, muxing issue?

Post by WhatZit »

jd17 wrote: Mon Aug 07, 2017 8:17 pm Remuxing the files that came directly out of HandBrake with mkvmerge does not solve it.
I thought HDR gamut data was stored statically within the bitstream via SEI? I know that there are dynamic (external) metadata specs, such as Dolby, but you're not using that. Therefore, any wrapper/container fiddling won't work.

What you might end up having to do is using ffprobe to scrutinise the differences between the Hybrid and Handbrake outputs.

Install the latest FFMPEG build, seperate (demux/extract) the video from a short encode and use:

Code: Select all

ffprobe -show_packets -show_frames -i Your_4k_hdr10_Here.mkv > Your_4k_hdr10_WTF.txt
You'll get a file containing stuff like:

Code: Select all

[PACKET]
codec_type=video
stream_index=0
pts=0
pts_time=0.000000
dts=N/A
dts_time=N/A
duration=16
duration_time=0.016000
convergence_duration=N/A
convergence_duration_time=N/A
size=703770
pos=7358
flags=K_
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=67
pts_time=0.067000
dts=N/A
dts_time=N/A
duration=16
duration_time=0.016000
convergence_duration=N/A
convergence_duration_time=N/A
size=61183
pos=711136
flags=__
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=33
pts_time=0.033000
dts=0
dts_time=0.000000
duration=16
duration_time=0.016000
convergence_duration=N/A
convergence_duration_time=N/A
size=2284
pos=772326
flags=__
[/PACKET]
[FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=0
pkt_dts_time=0.000000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=16
pkt_duration_time=0.016000
pkt_pos=7358
pkt_size=703770
width=3840
height=2160
pix_fmt=yuv420p10le
sample_aspect_ratio=1:1
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[SIDE_DATA]
side_data_type=Mastering display metadata
red_x=34000/50000
red_y=16000/50000
green_x=13250/50000
green_y=34500/50000
blue_x=7500/50000
blue_y=3000/50000
white_point_x=15635/50000
white_point_y=16450/50000
min_luminance=10/10000
max_luminance=10000000/10000
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Content light level metadata
max_content=0
max_average=0
[/SIDE_DATA]
[/FRAME]
... etc etc ...
Compare the two and see if you can spot any anomalies between working and non-working.

If I had to guess, I'd say there's something wrong with the "SIDE DATA" (aka Supplemental Enhancement Information) produced by libav.

EDIT: Yep, fixed in FFMPEG: https://github.com/FFmpeg/FFmpeg/search ... evel&type=
whereas: https://github.com/libav/libav/search?u ... evel&type=
Post Reply