Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th July 2017, 09:21   #21  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
And that was using HandBrake or also using x265cli + mkvmerge? Please test brand new x265 release.
sneaker_ger is offline   Reply With Quote
Old 14th July 2017, 10:32   #22  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 89
Still HandBrake, I am not experienced in x265 CLI.
I used x265 2.4+100 (stable) in the last trials.

I did do a remux with MKVToolNix of a few of the HandBrake muxes (which changed the 98% to 100%), but the TV still did not like those files, however the working encode without --master-display came right out of HandBrake btw.

Should those MKVToolNix remuxes not rule out any potential muxing-related issues?

Apart from that - I never had any issues with any of my HandBrake encodes, all 1080p x265 10bit encodes also play fine with the TV's player, I checked to make sure, because I normally just use Kodi...

Last edited by jd17; 14th July 2017 at 10:37.
jd17 is offline   Reply With Quote
Old 14th July 2017, 11:07   #23  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by jd17 View Post
Should those MKVToolNix remuxes not rule out any potential muxing-related issues?
No. It's a bit complicated with were the SEIs will (not) end up. I can create some test samples later if you haven't figured it out by then.
sneaker_ger is offline   Reply With Quote
Old 15th July 2017, 21:49   #24  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 89
Quote:
Originally Posted by sneaker_ger View Post
I can create some test samples later if you haven't figured it out by then.
That is very kind of you to offer, thank you so much!

I wanted to try as much as I can before I let you do that, so I created an encode with Hybrid.

Unfortunately, the MediaInfo of that encode is extremely stripped:

Code:
Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
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
Bits/(Pixel*Frame)                       : 0.071
Stream size                              : 273 MiB (100%)
Default                                  : Yes
Forced                                   : Yes
I don't know what I'm doing wrong, Hybrid shows the following CL instructions:

Quote:
x265 --input - --output-depth 10 --y4m --profile main10 --high-tier --level-idc 5.1 --crf 17.00 --qpfile GENERATED_QP_FILE --vbv-maxrate 160000 --vbv-bufsize 160000 --hrd --no-sao --range limited --colorprim bt2020 --transfer smpte-st-2084 --colormatrix bt2020nc --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)" --max-cll "0,0" --hdr --hdr-opt --output "samsung hybrid test1.265"

Anyhow, if you want to give it a shot - here is the source video:
https://openload.co/f/Zfi6a9o4VV4/Sa...2020_hdr10.mkv


My encoding setting are simple:
x265 10bit
Preset: medium
Tune: none
CRF 17

Non-standard CL options:
--no-sao --level-idc 5.1 --hrd --hdr-opt --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)" --max-cll "0,0"
jd17 is offline   Reply With Quote
Old 15th July 2017, 22:12   #25  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Is Hybrid still using mkvmerge 11.0.0? (Again: don't shorten MediaInfo logs) It has a bug that corrupts the HEVC headers. Then MediaInfo will not detect the x265 settings. Use latest mkvmerge.
sneaker_ger is offline   Reply With Quote
Old 16th July 2017, 10:11   #26  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 89
You were right!

Not only was mkvmerge 11 the root cause for the stripped MediaInfo, the encode created in Hybrid plays fine on the TV's internal player, although the parameters are essentially identical to the HandBrake encode (which still does not play)...

Hybrid:

Code:
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
HandBrake:

Code:
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
The only difference is Keyint:
24 / 240 in HandBrake
23 / 250 in Hybrid


I will try to report this bug in the Handbrake forum.
Hopefully they can fix it...

I still prefer HandBrake... Apart from the GUI, Hybrid always needs double the free disk space for the encodes.
jd17 is offline   Reply With Quote
Old 16th July 2017, 21:28   #27  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 89
Now that this issue is sorted out (vielen Dank @sneaker_ger!), I would be grateful for some advise regarding --uhd-bd.

I created one encode without --uhd-bd and one with.

--uhd-bd means a significant bitrate increase and I would like to know if it's worth it.

No --uhd-bd:

Code:
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
With --uhd-bd:

Code:
General
Unique ID                                : 214017709364404599423607843951800577469 (0xA1024FBF149C0B33B859A6193C8D6DBD)
Complete name                            : C:\_encode\hybrid test7 uhd-bd.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 410 MiB
Duration                                 : 2 min 41 s
Overall bit rate                         : 21.4 Mb/s
Encoded date                             : UTC 2017-07-16 19:31:32
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                                 : 21.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 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.107
Stream size                              : 410 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=1 / ref=3 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=1 / keyint=24 / 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=1 / chromaloc-top=2 / chromaloc-bottom=2 / 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
The differences triggered by --uhd-bd are:

--aud
--no-open-gop
--min-keyint 1 (instead of 23)
--keyint 24 (instead of 250)
--chromaloc 1 (+ chromaloc-top=2 and chromaloc-bottom=2)

So, I made another encode using all those --uhd-bd parameters except the changed keyint values:

Code:
General
Unique ID                                : 240264526869195679385027338102789456693 (0xB4C143C28958A89E99150C3CF45D4335)
Complete name                            : C:\_encode\hybrid test6 uhd-parameters except keyint chromaloc 2 proper.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-16 20:14:49
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 (Type 2)
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 / aud / hrd / info / hash=0 / no-temporal-layers / no-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=1 / chromaloc-top=2 / chromaloc-bottom=2 / 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
This encode confirms that the difference in bitrate comes from the keyint changes only.

As far as I understood --keyint, limiting it to 24 means severely restricting x265 in it's capability, right?

Hybrid says this:
Quote:
Since the max intra distance used directly translates to more buffer requirement during playback and less accurate seeking most stand alone players got some restrictions regarding the max distance.
So, is it mainly limited to be hardware-compatible?
jd17 is offline   Reply With Quote
Old 16th July 2017, 21:38   #28  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
To be compliant with Blu-ray specs. Since you aren't creating a Blu-ray I wouldn't worry about it too much. In generel, higher --keyint results in increased seeking times because if you seek to a random position you have to decode all frames starting from the last keyframe. With 24 fps and --keyint 24 there's one keyframe every second. With --keyint 240 only every 10 seconds. So when seeking you will have to wait on average 10 times longer (if we simplify a bit to make seek time only decoding time). --keyint 24 increases the need for bitrate because redundancies between frames can only survive 1 second because in a typical movie we don't have a new scene every second. That wastes lots of bits. When we increase keyint the need for bitrate decreases but the savings diminish at some point. I think at about 4 seconds (at 24 fps roughly --keyint 96) you will have a sweet spot with a good compromise between seeking times and compression. Just do a few tests if you are interested or do a forum search. It was discussed in the past.
sneaker_ger is offline   Reply With Quote
Old 17th July 2017, 08:15   #29  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 89
Quote:
Originally Posted by sneaker_ger View Post
Since you aren't creating a Blu-ray I wouldn't worry about it too much.
Well, the intention of this whole exercise is to find good settings in the hope that one day I'll be able to encode an actual UHD Blu-ray - and be prepared for it...
I'm not planning to watch HDR demo videos all day.

Quote:
In generel, higher --keyint results in increased seeking times because if you seek to a random position you have to decode all frames starting from the last keyframe. With 24 fps and --keyint 24 there's one keyframe every second. With --keyint 240 only every 10 seconds. So when seeking you will have to wait on average 10 times longer (if we simplify a bit to make seek time only decoding time). --keyint 24 increases the need for bitrate because redundancies between frames can only survive 1 second because in a typical movie we don't have a new scene every second. That wastes lots of bits. When we increase keyint the need for bitrate decreases but the savings diminish at some point. I think at about 4 seconds (at 24 fps roughly --keyint 96) you will have a sweet spot with a good compromise between seeking times and compression. Just do a few tests if you are interested or do a forum search. It was discussed in the past.
Thank you so much, that's very good advice!
I will do some testing.
However, I think I'll have to find another demo for that because the Samsung HDR Wonderland has very long scenes - not representative of an actual movie.

What about --min-keyint? Should I set that to 1 or leave at 0 (which is usually 23)?

One more thing, is there any downside in using the remaining --uhd-bd parameters?
--aud
--no-open-gop
--chromaloc 2
jd17 is offline   Reply With Quote
Old 17th July 2017, 16:48   #30  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by jd17 View Post
What about --min-keyint? Should I set that to 1 or leave at 0 (which is usually 23)?
Leave it at default (i.e. don't explicitly set it).

Quote:
Originally Posted by jd17 View Post
One more thing, is there any downside in using the remaining --uhd-bd parameters?
--aud
--no-open-gop
--chromaloc 2
--chromaloc signals the chroma position of your source. So it should be set the way the source is. On UltraHD Blu-ray chromaloc 2 is required for BT.2020, for BT.709 it can be 2 or 0. So Blu-ray requires certain source characteristics. x265 will not convert for you, only set the flags.

--no-open-gop is not required for Blu-ray. Both are allowed. OpenGOP improves compression a bit. Can be problematic with some players e.g. in mp4 and makes editing more difficult.

--aud is for compatibility. You shouldn't need to set it. If you don't encode for Blu-ray it is not required. If you encode for Blu-ray it will already be activated by --uhd-bd anyways (same with --min-keyint 1).
sneaker_ger is offline   Reply With Quote
Old 17th July 2017, 17:09   #31  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 89
I am asking because even for a UHD Blu-ray encode I would not use --uhd-bd (because of what you told me about --keyint).
Instead I would manually only set the essential parameters that don't increase the bitrate unnecessarily.
This is what I meant to say before...

I am creating encodes with different --keyint values now to see where the sweetspot might be...
jd17 is offline   Reply With Quote
Old 17th July 2017, 17:22   #32  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by jd17 View Post
I am asking because even for a UHD Blu-ray encode I would not use --uhd-bd (because of what you told me about --keyint).
Instead I would manually only set the essential parameters that don't increase the bitrate unnecessarily.
This is what I meant to say before...
Well, it is a bit unusual but looking at the code it seems possible. (For x264 this is not possible because not all Blu-ray options are exposed to the user but it seems to be ok for x265.)

What I also found is --uhd-bd indeed disables OpenGOP. I didn't know that and I don't know why it does that. OpenGOP is allowed on Blu-ray. So either it is an error or x265's OpenGOP implementation isn't compatible with Blu-ray. So maybe it is better to turn off OpenGOP for Blu-ray after all (i.e. set --no-open-gop).
sneaker_ger is offline   Reply With Quote
Old 17th July 2017, 20:00   #33  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 89
OK, here it goes.

Encode test results with various --keyint values.
I still used the "Samsung HDR Wonderland" demo as kind of a "worst case" scenario, because it has very long, almost static scenes.

--min-keyint / --keyint
Bitrate

1 / 24 (--uhd-bd):
21.4 mbit/s

1 / 48:
17.6 mbit/s

1 / 72:
16.6 mbit/s

1 / 96:
15.9 mbit/s

1 / 120:
15.0 mbit/s


12 / 120 (0 / 120):
15.0 mbit/s

1 / 144:
15.1 mbit/s

1 / 168:
15.0 mbit/s

1 / 192:
15.1 mbit/s

23 / 250 (default):
14.2 mbit/s

It looks to me like the obvious sweetspot is at 1 / 120 (5 seconds) for this demo.


I will later try to see if the "sweetspot" shifts when I use the "Exodus UHD HDR" demo, that is more action-packed, or rather action-y at all.
jd17 is offline   Reply With Quote
Old 18th July 2017, 10:11   #34  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 89
I created a few Exodus encodes as well last night, the difference is much subtler, as expected.
1 / 96 and 1 / 120 are quite similar, 96 only gets a minor bitrate bump. Even 1 / 24 is not too far off due to the very short scenes.

However, I think I will stick with 1 / 120 to not waste bitrate on "slow" movies.
Seeking / skipping should be OK.

So, thanks to your help I think I found quite good settings to use on UltraHD Blu-rays - assuming and hoping it will be possible to encode those at some point...

Basic syntax:

Quote:
--profile main10 --high-tier --level-idc 5.1 --no-open-gop --hdr --hrd --aud --chromaloc 2 --range limited --colorprim bt2020 --transfer smpte-st-2084 --colormatrix bt2020nc --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(*,*)" --max-cll "*,*"
Custom for me:

Quote:
--preset medium --crf 17.00 --no-sao --min-keyint 1 --keyint 120 --hdr-opt

Last edited by jd17; 18th July 2017 at 11:47.
jd17 is offline   Reply With Quote
Old 6th August 2017, 11:22   #35  |  Link
lauguru
Registered User
 
Join Date: May 2004
Posts: 242
hello

How would you write the tweak for x265 of this encode?thanks



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 1 min
Bit rate : 50.4 Mb/s
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
Bits/(Pixel*Frame) : 0.254
Stream size : 42.8 GiB (80%)
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : SMPTE ST 2084
Matrix coefficients : BT.2020 non-constant
Mastering display color primar : 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.0050 cd/m2, max: 4000.0000 cd/m2
Maximum Content Light Level : 10000 cd/m2
Maximum Frame-Average Light Le : 3647 cd/m2[/PHP]




TWEAK_X265=--output-depth 10 --profile main10 --tune grain --level-idc 5.1 --colorprim bt2020 --transfer smpte-st-2084 --colormatrix bt2020nc --uhd-bd --hdr-opt


Quote:
Mastering display color primar : 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.0050 cd/m2, max: 4000.0000 cd/m2
Maximum Content Light Level : 10000 cd/m2
Maximum Frame-Average Light Le : 3647 cd/m2[/PHP]

Last edited by lauguru; 6th August 2017 at 11:35.
lauguru is offline   Reply With Quote
Old 16th August 2017, 00:21   #36  |  Link
supergimp
Registered User
 
Join Date: Jun 2015
Posts: 1
I hope no one minds a lurker jumping in and asking a question on this topic.

I have a ProRes 4444 UHD HDR (NCLC=9,16,9) source file and am creating a set of HD/UHD files to be packaged for DASH distribution. The source is smpte2084 mastering display P3 at 4000 nits (G(0.265, 0.690),B(0.150, 0.060),R(0.680, 0.320),WP(0.3127, 0.3290),L(4000, 0.0005)). Typical stuff.

Encoding with the following (HD example given, UHD versions don't scale) I'm getting a slight pink shift I'm told by the client (I don't have the ability to view the source with proper EOTF).

Code:
ffmpeg -i INPUTFILE.mov -filter_complex '[0:v]scale=1920:-1:flags=+bicublin:sws_dither=ed[v]' -map '[v]' -c:v libx265 -pix_fmt yuv420p10le -preset slow -x265-params level-idc=5.0:high-tier=1:aud=1:sar=1:no-open-gop=1:scenecut=0:ref=4:me=3:merange=57:keyint=48:min-keyint=48:rc-lookahead=96:sao=1:cbqpoffs=6:crqpoffs=6:hrd=1:bitrate=5000:vbv-maxrate=5000:vbv-bufsize=7500:videoformat=5:range=limited:colorprim=9:transfer=16:colormatrix=9:hdr-opt=1:master-display='G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,5)':max-cll='2226,899' -an -dn -sn -y OUTPUTFILE.hevc
Reading here about caveats regarding scale, color_matrix, etc I've tried removing those to no avail. I'm curious if anyone can see any glaring issues that I am overlooking (after messing with this for a week now).

Thanks for any ideas.

Last edited by supergimp; 16th August 2017 at 19:18.
supergimp is offline   Reply With Quote
Old 16th August 2017, 00:35   #37  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Your source is YUV, so encoded h265 should be exactly the same. Rest is how TV processes your metadata.
kolak is offline   Reply With Quote
Old 23rd October 2017, 12:18   #38  |  Link
quabit
Registered User
 
Join Date: Oct 2017
Posts: 3
Try making the chroma qp offsets both -6

Lower is higher bits

Sent from my SAMSUNG-SM-G920A using Tapatalk
quabit is offline   Reply With Quote
Old 25th October 2017, 22:14   #39  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,752
Quote:
Originally Posted by kolak View Post
Your source is YUV, so encoded h265 should be exactly the same. Rest is how TV processes your metadata.
Yeah, some devices just skew pink/red. It's really common in initial tone mapping implementations. I'm not sure the reason. One theory is that panels all have a native gamma input (even though the actual pixels aren't gamma), so there is a PQ->gamma->panel space conversion for extra unneeded rounding errors.

You simply can't tune HDR encoding without an HDR reference display, or diagnose problems on the customer end without seeing their display. And you can't assume a customer display is accurate. Particularly if the display is in some sort of default Vivid mode, or hasn't been calibrated, or simply doesn't have a good tone mapper. There are a number of devices on the market that demonstrate a red shift in what should be gray-white. And the exact same file will look perfect on a calibrated reference display (I use the Sony Z9D).
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 22nd December 2017, 15:26   #40  |  Link
DenisRodman
Registered User
 
Join Date: Jul 2015
Posts: 33
Tell me which command disables the Encoding settings?

In MediaInfo it is necessary that this information is not displayed.
Quote:
Encoding settings : cpuid=1173503 / frame-threads=2 ...
Only information about the encoder.
Quote:
Writing library : x265 2.4+13-26963e98fa64:[Windows][MSVC 1910][64 bit] 10bit
And one more question, can I add user information about the encoder?

for example
Quote:
Writing library : Here is my info about the encoder
DenisRodman is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.