Color rendering / HDR tonemapping

The difference in saturation above might be ‘intentional’ but I’m puzzled why the luminance is so down on where it should be.

OK that gives us a benchmark!

I can provide clips for several HDR movies I have but based on what you said … wouldn’t providing an HDR clip be problematic ? ( since the HDR metadatas are defined globally for the entire video )

Not for BDs. Every frame has that metadata (or should have) - that’s what we are reading. If you clip a bit, check it with mediainfo before posting.

In fact, can you post mediainfo for the original file, in case the file header differs from the frame headers.

When you say a monitor, do you really mean something designed for use with a PC, that is not a television?

If so, are you sending it YCbCr or RGB? And full- or limited-range?

Sure, there it is :

General
Unique ID                                : 50499248645776098611952839319505319112 (0x25FDCD2FFEB8B9FD9DE209285C0FB4C8)
Complete name                            : mad-max-fury-road.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 21.8 GiB
Duration                                 : 2 h 0 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 26.0 Mb/s
Encoded date                             : UTC 2021-01-03 19:46:47
Writing application                      : mkvmerge v31.0.0 ('Dolores In A Shoestand') 64-bit
Writing library                          : libebml v1.3.6 + libmatroska v1.4.9

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 2 h 0 min
Bit rate                                 : 20.2 Mb/s
Width                                    : 3 840 pixels
Height                                   : 1 600 pixels
Display aspect ratio                     : 2.40:1
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.137
Stream size                              : 17.0 GiB (78%)
Writing library                          : x265 2.6+4-f7498acb3874:[Windows][GCC 7.2.0][64 bit] 10bit
Encoding settings                        : cpuid=1173503 / frame-threads=5 / numa-pools=16,16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x1600 / interlace=0 / total-frames=173133 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=24 / keyint=240 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=-3:-3 / no-sao / no-sao-non-deblock / rd=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.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(40000000,50) / max-cll=9918,3241 / 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 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 9918 cd/m2
Maximum Frame-Average Light Level        : 3241 cd/m2

Audio
ID                                       : 2
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 2 h 0 min
Bit rate mode                            : Variable
Bit rate                                 : 5 693 kb/s
Maximum bit rate                         : 8 412 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Compression mode                         : Lossless
Stream size                              : 4.79 GiB (22%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Text
ID                                       : 3
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 2 h 0 min
Bit rate                                 : 17.6 kb/s
Count of elements                        : 2334
Stream size                              : 15.1 MiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : en:00:00:00.000
00:10:41.474                             : en:00:10:41.474
00:19:05.436                             : en:00:19:05.436
00:30:11.309                             : en:00:30:11.309
00:42:54.614                             : en:00:42:54.614
00:49:32.344                             : en:00:49:32.344
00:59:54.174                             : en:00:59:54.174
01:13:01.544                             : en:01:13:01.544
01:22:07.923                             : en:01:22:07.923
01:30:01.730                             : en:01:30:01.730
01:40:38.866                             : en:01:40:38.866
01:49:11.545                             : en:01:49:11.545
01:53:05.278                             : en:01:53:05.278


Yes, it is primarily a PC monitor ( I’ve posted the brand & model above ) which I use for graphical edition as well as watching movies.

I mentioned already that I’m using the limited range 16-235, since the full range is totally unusable ( way too dark ).

As for the YCbCr or RGB … If you are refering to the Force RGB Output parameter, I tried it already ( w/o any changes unfortunately )

Sorry to ask this, but are you sure it’s always the case for each HDR video ?

I’m asking because, while reading some documentation to provide an HDR movie clip, I just read that the per-frame metadata ( aka dynamic metadata ) only exists for HDR10+ videos. Original HDR10 format only has static metadata set @ the container level :thinking: ( apparently )

Here you are : I have clipped the movie at the same scene I showed

NB : The HDR metadatas are present, which apparently means that mkvtoolnix is smart enough to reinject the data whenever a clip is taken

Well don’t believe everything you read on the internet :wink: Thanks for the clip.

PC monitors are usually more comfortable with full-range RGB rather than limited-range YCbCr, but that may conceivably not be true here. It varies.

… and you tried full range quantisation with that?

I guess full range quantisation means the use of the full range colors ? ( 0-255 instead of 16-235 )

So, I just tried ( Force RGB output + full range of colors ) and now I can’t get an HDMI signal from the Vero :confused:

OK let’s stick with YUV then as it does support that and since there doesn’t seem to be quantisation range setting we have to assume it’s expecting limited range. See here for more detail:

Thanks for the article, I’ll read it carefully ( lot more of explanation than the OSMC hints in the menu for the settings )

But in the meantime, how can I restore the HDMI signal from the Vero4K ?

So far I would say this:

There’s clearly something wrong with that metadata. A MaxFALL of 3241 nits would cause most screens to explode, I would think. However, we don’t use that, we use the master display luminance because that’s less.

I get a picture on my HDTV which is not as saturated/bright as your (SDR) screenshot (but I’m comparing it with my PC monitor rendering of this page). I can see a lot of shadow detail and the bright bit at bottom left has quite a small patch of ‘pure white’ so I think we are getting the range about right. The saturation looks about ‘right’ to me - colours reminiscent of The Martian.

Get a commandline and type:

echo limnow | sudo tee /sys/class/amhdmitx/amhdmitx0/attr

Hopefully, that will give you a screen you can undo RGB on. Then reboot.

The metadata are correct: it’s exactly as defined on the UHD BDisc ( see the following video link for a detailed analysis )

Regarding the saturation, the photo camera does accentuate the saturation a little bit ( the photo I took was mostly to highlight the differences between SDR / HDR but shouldn’t be considered as a proofing reference )

Regarding the command-line, here’s what I get from the SSH prompt :

osmc@osmc-v4k:~$ echo limnow | sudo tee /sys/class/amhdmitx/amhdmitx0/attr
limnow

But nothing happens, and I still don’t have any HDMI signal coming from the Vero4K :neutral_face:

EDIT : it seems the screen detects an HDMI signal ( the relay clicks & the light turns white ), then I get the No signal HDMI-1 message and the light turns amber, and the cycle is repeating itself endlessly … is there a way I can edit this RGB parameter via command-line ?

Good spot on the Vincent Teoh analysis. Having looked at a few clips of Mad Max on YouTube (I’ve never watched it before) I can see how that MaxFALL might be right too!

To restore your HDMI output, try stopping Kodi systemctl stop mediacenter then edit ~/.kodi/userdata/guisettings.xml back to what’s shown in your log, specifically:

<setting id="videoscreen.forcergb" default="true">false</setting>

and
<setting id="videoscreen.limitedrangeaml" default="true">true</setting>

and reboot.

I’ve now spent some time comparing your clip played in HDR and SDR on the same screen (low-end Panasonic HDR 4k TV) and getting similar results, as I’ve done before with other HDR videos. There are some things I want to investigate further, though.

Thanks for the help, I now have the OSMC interface displayed again :slight_smile:

On my part, I can try to read the BD remux ( raw .m2ts ) on the Vero4K, to see if there’s a rendering difference with the compressed HEVC file

Glad you are back up. FYI your Vincent Teoh link led me to this old one. What we are doing by default is similar to the LG approach, but by turning up the contrast the curve becomes more like the Panasonic OLED’s.

Hello. Thanks for this link, it indeed helps me understand better what you explained earlier on in the topic.

A quick follow up on the issue itself: I have remuxed the original Mad Max Fury Road UHD BDisc and tested the rendering on the Vero4K … sadly it presents the same issue as its compressed counterpart.

I think that definitely eliminates a possible issue with my HDR rips ( I’m still in the dark about the root cause itself – literally – though, but at least it’s one less thing to check )