INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Possible HLG HDR bug in JRVR  (Read 855 times)

bogdanbz

  • World Citizen
  • ***
  • Posts: 208
Possible HLG HDR bug in JRVR
« on: March 31, 2023, 01:58:14 pm »

I have "Convert HLG HDR to HDR10 for pass through" in JRVR settings.

However, when I play this file fragment which is supposed to be a HLG stream, JRVR plays it back as SDR: download link.

MediaInfo says this about it:

Code: [Select]
Color primaries                          : BT.2020
Transfer characteristics                 : BT.2020 (10-bit)
transfer_characteristics_Original        : HLG / BT.2020 (10-bit)
Matrix coefficients                      : BT.2020 non-constant
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14465
  • I won! I won!
Re: Possible HLG HDR bug in JRVR
« Reply #1 on: March 31, 2023, 04:39:04 pm »

Edit: as I was typing Hendrik replied......   The file does not play for me either as HLG but others do.

I checked MC's playback of your file with a known HLG (the one of the right).  I see yours is identified by JRVR as 2020 but with a BT.1886 transfer not HLG - note: BT.1886 is a std the BBC uses, and it is similar (but not the same) as Rec709 + 2.4 gamma.  So I chucked it into Davinci Resolve and it was not automatically identified as HLG (or anything).  So basically, I'm not much help in working out what this clip really is and if it is MediaInfo or JRVR that is miss identifying it..... but I'm sure Hendrik will.
Logged
JRiver CEO Elect

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10943
Re: Possible HLG HDR bug in JRVR
« Reply #2 on: March 31, 2023, 04:48:56 pm »

I see what the problem is. The information in that file is contradicting itself. The container says SDR, and the video says HLG. And the container wins, typically.
Logged
~ nevcairiel
~ Author of LAV Filters

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14465
  • I won! I won!
Re: Possible HLG HDR bug in JRVR
« Reply #3 on: March 31, 2023, 05:36:25 pm »

FWIW, I used MKVToolNix GUI to change "Transfer Characteristics" from "14" to "18" and the file now plays correctly.
Logged
JRiver CEO Elect

bogdanbz

  • World Citizen
  • ***
  • Posts: 208
Re: Possible HLG HDR bug in JRVR
« Reply #4 on: April 01, 2023, 01:59:36 am »

Thank you for figuring this out.

I did not realize MediaInfo does not show container settings. And I had no idea what the numerical values for Transfer characteristics mean.
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14465
  • I won! I won!
Re: Possible HLG HDR bug in JRVR
« Reply #5 on: April 01, 2023, 02:34:33 am »

MediaInfo does seem to report it.  That change from 14 to 18 changed:
Transfer characteristics from BT.2020 to HLG

...but I've no idea if the other tags are correct, or even if this is the right way of tagging such files.  I did not find any doco (did not look too hard) about what the corresponding values do in MKVToolNix GUI just a post of someone else with HLG MKV issues and this was their "fix". 
Logged
JRiver CEO Elect

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10943
Re: Possible HLG HDR bug in JRVR
« Reply #6 on: April 01, 2023, 04:04:47 am »

Media Info is a bit imprecise. I would really prefer if it showed the source of information rather then just throwing it all together into one dump.
Logged
~ nevcairiel
~ Author of LAV Filters

bogdanbz

  • World Citizen
  • ***
  • Posts: 208
Re: Possible HLG HDR bug in JRVR
« Reply #7 on: April 01, 2023, 11:11:32 am »

Ah I see, the "Original" was referring to the video stream, and the other line was referring to the final value, considering the container.

Code: [Select]
Color primaries                          : BT.2020
Transfer characteristics                 : BT.2020 (10-bit)
transfer_characteristics_Original        : HLG / BT.2020 (10-bit)
Matrix coefficients                      : BT.2020 non-constant
vs
Code: [Select]
Color primaries                          : BT.2020
Transfer characteristics                 : HLG
transfer_characteristics_Original        : HLG / BT.2020 (10-bit)
Matrix coefficients                      : BT.2020 non-constant

The value for "Transfer characteristics" was "BT.2020 (10-bit)", instead of "BT.1886" that JRVR used, so I didn't realize that's where the problem was.
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14465
  • I won! I won!
Re: Possible HLG HDR bug in JRVR
« Reply #8 on: April 01, 2023, 03:32:42 pm »

Maybe, but my other HLG test clip does not have a transfer_characteristics_Original at all (but it is an MP4) so that line may not even be required.  Also, I noticed over at github Hendrik has committed the following change
Quote
Preserve HLG when a frame indicates it, instead of overriding it with…

… container data

Containers might indicate the corresponding SDR mode, but HLG is going
to be more precise here.

Anyway, looks like you're good to go for playback in MC.
Logged
JRiver CEO Elect

bogdanbz

  • World Citizen
  • ***
  • Posts: 208
Re: Possible HLG HDR bug in JRVR
« Reply #9 on: April 02, 2023, 02:15:30 am »

It might be that "transfer_characteristics_Original" is only displayed in Media Info when the video stream has a different "transfer characteristics" than the "transfer characteristics" set on the container.

I remuxed the files yesterday and now everything plays properly.
Logged
Pages: [1]   Go Up