HDR

All your suggestions, requests and ideas for future development
BrutalRage
Posts: 9
Joined: 19 Aug 2017, 07:22

HDR

Post by BrutalRage » 19 Aug 2017, 07:37

Hi, first off love this program thanks with the great work.

Now maybe I have to look better, but it seems I cant find an option for HDR.
HDR yes or now would do but ideal would be "dolby vision" or "Hdr10" etc.
If the option is there could some 1 give me a push in the right direction?
Below what I am using now. Any other good suggestions are welcome.
Also I am focused on enhancing my movie collection and thus quickly need to find the worst versions.

{movie} {vf} {ac} {channels} {vc}

Kind regards
Guido

User avatar
rednoah
The Source
Posts: 14639
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: HDR

Post by rednoah » 19 Aug 2017, 07:49

Can you find that piece of information in the MediaInfo view?

Image

@see viewtopic.php?f=5&t=4285
:idea: Please read the FAQ and How to Request Help.

BrutalRage
Posts: 9
Joined: 19 Aug 2017, 07:22

Re: HDR

Post by BrutalRage » 19 Aug 2017, 07:58

Morning,
No its not there.

User avatar
rednoah
The Source
Posts: 14639
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: HDR

Post by rednoah » 19 Aug 2017, 09:00

If it's not possible for a human to guess if a file is HDR or not based on the available MediaInfo, then it's not possible perform that check in a FileBot format expression.
:idea: Please read the FAQ and How to Request Help.

kim
Power User
Posts: 654
Joined: 15 May 2014, 16:17

Re: HDR

Post by kim » 19 Aug 2017, 15:06

maybe you can use this info ?
https://twitter.com/search?q=%23MediaIn ... r&src=typd
Version 0.7.83, 2016-02-29
--------------
+ HEVC: Maximum Content Light Level (MaxCLL) and Maximum Frame-Average Light Level (MaxFALL), metadata mandated by CEA-861.3 for HDR support
+ HEVC: Mastering display color primaries and luminance (based on SMPTE ST 2084), metadata mandated by CEA-861.3 for HDR support
+ HEVC: SMPTE ST 2048 and SMPTE ST 428-1 transfer characteristics
+ HEVC: Chroma subsampling location (indication of the location type described in the HEVC spec)
+ MPEG-TS: ATSC Modulation Mode (Analog, SCTE_mode_1 aka 64-QAM, SCTE_mode_2 aka 256-QAM, 8-VSB, 16-VSB)
+ #B981, MP4: support of buggy file having "hint" SubType
x HLS: better handling of media playlists having EXT-X-BYTERANGE

BrutalRage
Posts: 9
Joined: 19 Aug 2017, 07:22

Re: HDR

Post by BrutalRage » 19 Aug 2017, 16:43

@Kim YES thats it!
I was thinking that it would be strange if I where the only 1 intrested in that kind of thing.
But I guess its not simplefied for idiots like me. But they seem to be working on it.
Guess il just have to wait a bit longer.
Thanks for replying and reading this.

kim
Power User
Posts: 654
Joined: 15 May 2014, 16:17

Re: HDR

Post by kim » 20 Aug 2017, 02:23

if you look at the info it should be possible to do now:

https://en.wikipedia.org/wiki/High-dyna ... ideo#HDR10
https://pbs.twimg.com/media/CcZy2wKXIAASg6m.jpg:large
https://forum.doom9.org/showthread.php?p=1803029

test with these in filebot:
BitDepth 10/12 ?
colour_primaries found or not ?
matrix_coefficients found or not ?
MasteringDisplay_ColorPrimaries found or not ?
MasteringDisplay_Luminance found or not ?

Encoding settings contrains hdr ?

sample files:
http://kodi.wiki/view/Samples
http://demo-uhd3d.com/
http://hdrsamples.com/

User avatar
rednoah
The Source
Posts: 14639
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: HDR

Post by rednoah » 20 Aug 2017, 03:30

In that case it's very simple. So HDR is about 10/12 bit color values instead of 8 bit color values? Then you can just check if the bitdepth is higher than 8 or not.

e.g.

Code: Select all

{bitdepth > 8 ? 'HDR' : 'LDR'}
:idea: Please read the FAQ and How to Request Help.

kim
Power User
Posts: 654
Joined: 15 May 2014, 16:17

Re: HDR

Post by kim » 20 Aug 2017, 19:17

https://video.stackexchange.com/questio ... -bit-depth

so my quess (not tested):

Code: Select all

if (bitdepth == 10 && colour_primaries >= BT.2020) = HDR10
if (bitdepth == 12 && colour_primaries >= BT.2020) = Dolby Vision

kim
Power User
Posts: 654
Joined: 15 May 2014, 16:17

Re: HDR

Post by kim » 21 Aug 2017, 14:10

Cutha wrote:
21 Aug 2017, 10:11
And my little piece of code for HDR. As I learn more about HDR I will add more logic.

Code: Select all

{
def mHDRCol = ["BT.709" : "NO", "BT.2020" : "YES"];
if(bitdepth >= 10 &&  mHDRCol.get(video[0].colourprimaries) == "YES" ) '(HDR)/' else '(NonHDR)/';
}

Cutha
Posts: 13
Joined: 21 Aug 2017, 09:16

Re: HDR

Post by Cutha » 22 Aug 2017, 07:31

kim wrote:
21 Aug 2017, 14:10
Cutha wrote:
21 Aug 2017, 10:11
And my little piece of code for HDR. As I learn more about HDR I will add more logic.

Code: Select all

{
def mHDRCol = ["BT.709" : "NO", "BT.2020" : "YES"];
if(bitdepth >= 10 &&  mHDRCol.get(video[0].colourprimaries) == "YES" ) '(HDR)/' else '(NonHDR)/';
}
I came across a video that does not have .colourprimaries and this is what I did to fix it:

Code: Select all

{
boolean isHDR = false;
def mHDRCol = ["BT.709" : "NO", "BT.2020" : "YES"];
if(self.video[0].bitdepth != null && self.bitdepth >= 10 && self.video[0].colourprimaries != null &&  mHDRCol.get(self.video[0].colourprimaries) == "YES") isHDR = true;
}

BrutalRage
Posts: 9
Joined: 19 Aug 2017, 07:22

Re: HDR

Post by BrutalRage » 24 Aug 2017, 12:25

Thanks you guys so much!!

BrutalRage
Posts: 9
Joined: 19 Aug 2017, 07:22

Re: HDR

Post by BrutalRage » 24 Aug 2017, 12:32

Got the 2second last code working, seems I am doing something wrong with the last 1.

BrutalRage
Posts: 9
Joined: 19 Aug 2017, 07:22

Re: HDR

Post by BrutalRage » 24 Aug 2017, 12:44

DONT USE THE CODE!!!!!!!!!!!!!!!!!!!!!!!!. ALL my 4k MOVIES R GONE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

BrutalRage
Posts: 9
Joined: 19 Aug 2017, 07:22

Re: HDR

Post by BrutalRage » 24 Aug 2017, 12:49

JEZUS wtf happended?

BrutalRage
Posts: 9
Joined: 19 Aug 2017, 07:22

Re: HDR

Post by BrutalRage » 24 Aug 2017, 12:52

120 4k movies gone....
seems it changed it to the directory then into that directory to .mkv but no where is a .mkv to be found.

BrutalRage
Posts: 9
Joined: 19 Aug 2017, 07:22

Re: HDR

Post by BrutalRage » 24 Aug 2017, 12:58

THANK GOD.... they r still there but for some kind of reason they r hidden....

User avatar
sighunter
Posts: 6
Joined: 26 Aug 2016, 08:08

Re: HDR

Post by sighunter » 16 Jun 2018, 07:21

BrutalRage wrote:
24 Aug 2017, 12:32
Got the 2second last code working, seems I am doing something wrong with the last 1.
@BrutalRage

Code: Select all

{
def mHDRCol = ["BT.709" : "NO", "BT.2020" : "YES"];
if(self.video[0].bitdepth != null && self.bitdepth >= 10 && self.video[0].colourprimaries != null &&  mHDRCol.get(self.video[0].colourprimaries) == "YES") 'HDR ' else '';
}

poochie2
Posts: 17
Joined: 16 Jun 2018, 13:55

Re: HDR

Post by poochie2 » 16 Jun 2018, 14:44

I'm attempting to tweak this a little, but I cannot understand (not familiar with Groovy in particular) why this:

Code: Select all

{
  def mHDRCol = ["BT.709" : "NO", "BT.2020" : "YES"];
  if(bitdepth != null && bitdepth >= 10 && self.video[0].colourprimaries != null &&  
  mHDRCol.get(self.video[0].colourprimaries) == "YES") 'HDR' else 'SDR';
}
does not always output either HDR or SDR.

PS: doing other tests it seems to me that the null check on a missing property does not work, I tried with obj.hasProperty('propName'), but it will say 'event not found', so I clearly need a expert hand on this one. :ugeek:

User avatar
rednoah
The Source
Posts: 14639
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: HDR

Post by rednoah » 17 Jun 2018, 04:53

If you get nothing, then there might be an error thrown somewhere:

Code: Select all

any{
  {
    def mHDRCol = ["BT.709" : "NO", "BT.2020" : "YES"];
    if(bitdepth != null && bitdepth >= 10 && self.video[0].colourprimaries != null &&  
    mHDRCol.get(self.video[0].colourprimaries) == "YES") 'HDR' else 'SDR';
  }
}{
    'SDR'
}
viewtopic.php?f=5&t=1895


:idea: bitdepth != null might be the source of the issue (or it might not, only testing will tell) since bitdepth can't be null. It's either a valid Integer value, or it's gonna throw an error and unwind the expression.


EDIT:

I rewrote your expression:

Code: Select all

{
	any
	{
		if (bitdepth >= 10 && ['BT.709', 'BT.2020'].disjoint(video.ColourPrimaries))
			'HDR'
	}
	{
		'SDR'
	}
}
:idea: Please read the FAQ and How to Request Help.

User avatar
rednoah
The Source
Posts: 14639
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: HDR

Post by rednoah » 17 Jun 2018, 08:03

Do you have any official information or docs as to what constitutes "HDR" content? Anything with 10bit that has any kind of ColourPrimaries? Or just those specific BT.* ones? What does BT.* mean?

I'm inclined to add an official {hdr} binding but I don't really have any test data.
:idea: Please read the FAQ and How to Request Help.

poochie2
Posts: 17
Joined: 16 Jun 2018, 13:55

Re: HDR

Post by poochie2 » 17 Jun 2018, 12:45

rednoah wrote:
17 Jun 2018, 08:03
Do you have any official information or docs as to what constitutes "HDR" content? Anything with 10bit that has any kind of ColourPrimaries? Or just those specific BT.* ones? What does BT.* mean?

I'm inclined to add an official {hdr} binding but I don't really have any test data.
That would be very good. My recent research into the topic tells me that:
  • It's useful to know if the video is 8 or 10 bit (10 bit can give better output with the same codec thanks to smoother gradients, but 10b is bad to transcode)
  • HDR requires a 10b bitdepth and a BT.2020 color space
  • Dolby Vision requires a 12b bitdepth and a BT.2020 color space
There are some other HDR variants in the wild pool of HDR technology, but this should cover the most popular cases. I'll try the snippets as soon as possibile.

More info:
  • I tried this DV (http://4kmedia.org/lg-dolby-vision-uhd-4k-demo/) demo and it is 10 bits but reports (see the "Dolby Vision Field"):

    Code: Select all

    Video
    ID                                       : 33 (0x21)
    Menu ID                                  : 2 (0x2)
    Format                                   : HEVC
    Format/Info                              : High Efficiency Video Coding
    Format profile                           : Main [email protected]@Main
    Dolby Vision                             : 1.0, [email protected], BL+EL+RPU
    Codec ID                                 : 36
    Duration                                 : 1 min 19 s
    Bit rate                                 : 29.6 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
    Bit depth                                : 10 bits
    Bits/(Pixel*Frame)                       : 0.149
    Stream size                              : 282 MiB (92%)
Last edited by poochie2 on 17 Jun 2018, 12:58, edited 1 time in total.

User avatar
rednoah
The Source
Posts: 14639
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: HDR

Post by rednoah » 17 Jun 2018, 12:53

What about BT.709 color space?
:idea: Please read the FAQ and How to Request Help.

poochie2
Posts: 17
Joined: 16 Jun 2018, 13:55

Re: HDR

Post by poochie2 » 17 Jun 2018, 13:00

rednoah wrote:
17 Jun 2018, 12:53
What about BT.709 color space?
Edited above. The BT 709 is the low spec colorspace used by 8bit content (and 10bit SDR content guessing from rips), can't be used for HDR. I think that when there is no colorspace field in MediaInfo, this is the actual color space -> unless other fields say otherwise, like the DV demo that is missing what releases usually have, but does have the DV field. It's essentially a mess :mrgreen:

In the end HDR and DV is about metadata telling the screen how to manage luminance, no metadata, no HDR+.

User avatar
rednoah
The Source
Posts: 14639
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: HDR

Post by rednoah » 17 Jun 2018, 16:54

OK. The new {hdr} binding will require bitdepth >= 10 and BT.2020 Color Primaries.
:idea: Please read the FAQ and How to Request Help.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests