Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
FubbAyH
Posts: 55
Joined: Wed Jan 02, 2019 7:06 am

Re: Dolby Vision now possible through MP4 Mux.

Post by FubbAyH »

glc650 wrote:
Mon Aug 23, 2021 2:41 am
Please don't..if it really is ignoring RPU appreciate the work getting it fixed.
RESET_9999 wrote:
Mon Aug 23, 2021 2:51 am
nah keep going, this thread is all about experimenting with DV.
in order to properly test if rpu is used, you probably should modify/unsync a true p5 file instead of injecting a p5 rpu to a random HDR10 BL.
I'll probably have to wait until next weekend to do any more experiments, but thanks very much for the encouragement :)
quietvoid
Posts: 377
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

Manixx2020beyound wrote:
Sun Aug 15, 2021 10:00 pm
That would help the grading community,
For those guys like myself 4k,6k,8k cameras
And do their own grading without doblyvision license fees
No secondary trim pass doe.
To my knowledge the doblyvision fees are only for secondary trim passes/Rpu creation & final encode of the doblyvision master to hevc
I did a first attempt at generating a RPU from XML: https://github.com/quietvoid/dovi_tool/pull/43
Still need to figure out if the L2 trims are correct..

L1 should be fine though, the rest needs testing and sample XML files..
Missing proper L5 (aspect ratio), since I don't really know how to decide whether it's horizontal or vertical letterbox bars.
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

oh wow. so we can now convert HDR10plus to DV. Amazing, thank you!!
we have to compare original DV with this conversion now..

@manix??? Alita bluray has hdr10+ and DV I believe...
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
quietvoid
Posts: 377
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

I've watched a couple episodes of The Expanse with the new HDR10+ to DoVi, to me they looked fine..
Black crush in comparison to HDR10, as expected from the Firestick. Didn't affect a lot of scenes though.

Some titles which include both, that I know of:
Doctor Sleep
Wonder Woman 1984
Godzilla vs Kong

Just off the top of my head..
Last edited by quietvoid on Wed Aug 25, 2021 4:09 pm, edited 1 time in total.
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

yep, WW-84 is the ideal title since the bluray is MEL DV and hdr10plus. There's also a profile 5 web-dl. @manix, I'm making you samples to test with your Shogun.

btw, I hope you hide behind a VPN, Dolby must be real mad at you if they are aware of your tool lol...
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
Manixx2020beyound
Posts: 127
Joined: Thu Oct 08, 2020 5:19 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Manixx2020beyound »

quietvoid wrote:
Wed Aug 25, 2021 5:40 am
Manixx2020beyound wrote:
Sun Aug 15, 2021 10:00 pm
That would help the grading community,
For those guys like myself 4k,6k,8k cameras
And do their own grading without doblyvision license fees
No secondary trim pass doe.
To my knowledge the doblyvision fees are only for secondary trim passes/Rpu creation & final encode of the doblyvision master to hevc
I did a first attempt at generating a RPU from XML: https://github.com/quietvoid/dovi_tool/pull/43
Still need to figure out if the L2 trims are correct..

L1 should be fine though, the rest needs testing and sample XML files..
Missing proper L5 (aspect ratio), since I don't really know how to decide whether it's horizontal or vertical letterbox bars.
Fantastic! great news!!
Thanks, so much will be testing tonight.
“NO BANZ TO MAKE DV DANCE”
Raw footage:
Now I can create a dv music video
With l1
Testing a dv/hdr10plus xml master of beckett which also has secondary trims too
Created by resolve
For raw footage we should be able to define the aspect ratio in the final encoding settings
Last edited by Manixx2020beyound on Wed Aug 25, 2021 5:07 pm, edited 1 time in total.
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

quietvoid wrote:
Wed Aug 25, 2021 5:40 am
I'm getting this error:

Image

EDIT. ok looks like im not using the right CMD-LINE...
Can we just convert HDR10plus json straight to DV like this :

Code: Select all

dovi_tool.exe generate --hdr10plus-json D:\HDR10plus.JSON --rpu-out D:\RPU_generated.bin

or do we have to make a json and enter the lenght, target nits etc ? how do we know which value to use? or do we just enter the lenght and static metadata and the tools do the rest ?


does this json correct for WW-84?:

Code: Select all

dovi_tool.exe generate --hdr10plus-json D:\HDR10plus.JSON --json D:\edited.json --rpu-out D:\RPU_generated.bin

Code: Select all

{
    "length": 217408,
    "level2": [
        {
            "target_nits": 100
        },
        {
            "target_nits": 600
        },
        {
            "target_nits": 1000,
            "trim_power": 2096,
            "trim_saturation_gain": 2128
        },
        {
            "target_nits": 2000,
            "trim_slope": 2048,
            "trim_offset": 2048,
            "trim_power": 2048,
            "trim_chroma_weight": 2048,
            "trim_saturation_gain": 2048,
            "ms_weight": 2048
        }
    ],
    "level6": {
        "max_display_mastering_luminance": 1000,
        "min_display_mastering_luminance": 1,
        "max_content_light_level": 596,
        "max_frame_average_light_level": 200
    }
}
Last edited by RESET_9999 on Wed Aug 25, 2021 5:27 pm, edited 1 time in total.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
quietvoid
Posts: 377
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

RESET_9999 wrote:
Wed Aug 25, 2021 5:05 pm
I'm getting this error:

Image

EDIT. ok looks like im not using the right CMD-LINE...
Can we just convert HDR10plus json straight to DV like this :

Code: Select all

dovi_tool.exe generate --hdr10plus-json D:\HDR10plus.JSON --rpu-out D:\RPU_generated.bin

or do we have to make a json and enter the lenght, target nits etc ? how do we know which value to use? or do we just enter the lenght and static metadata and the tools do the rest ?
You have to specify the config JSON for generating, since the HDR10+ info is only used for L1 metadata.

So something like this:

Code: Select all

dovi_tool generate -j assets/generator_example.json --hdr10plus-json metadata.json
The length is not optional in master, but it's overriden by whatever is in the HDR10+ file. Target nits or specific L2 can be used.

For the L2 to have no effect, something like this should work:

Code: Select all

"level2": [
        {
            "target_nits": 100
        },
        {
            "target_nits": 600
        },
        {
            "target_nits": 1000
        },
        {
            "target_nits": 2000
        }
]
quietvoid
Posts: 377
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

Manixx2020beyound wrote:
Wed Aug 25, 2021 2:22 pm
Fantastic! great news!!
Thanks, so much will be testing tonight.
“NO BANZ TO MAKE DV DANCE”
Raw footage:
Now I can create a dv music video
With l1
Testing a dv/hdr10plus xml master of beckett which also has secondary trims too
Created by resolve
For raw footage we should be able to define the aspect ratio in the final encoding settings
By the way, currently it only works for CMv2.9 XML files. Will look at supporting v4.0 but things like secondary trims are not backwards compatible.
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

I'm sooooo confused lol...

I converted my hdr10plus JSON to RPU.bin and I'm comparing the metadata and most of it is the same as the original bluray RPU (p8) except at the end where the original profile 8 RPU has different values for L1 and no L2 metadata but it has L4 metadata.... So my generated is wrong or not? and what the hell is level 4 ? its not even on the dolby documentation. Since L2 is optional, should we NOT generate it? L1 pq max and min doesnt match, why?


Image

the json i used is :

Code: Select all

{
    "length": 217408,
    "level2": [
        {
            "target_nits": 100
        },
        {
            "target_nits": 600
        },
        {
            "target_nits": 1000
        },
        {
            "target_nits": 2000
        }
		    ],
    "level6": {
        "max_display_mastering_luminance": 1000,
        "min_display_mastering_luminance": 1,
        "max_content_light_level": 596,
        "max_frame_average_light_level": 200
    }
}


generated RPU:

Code: Select all

 "num_ext_blocks": 7,
    "ext_metadata_blocks": [
      {
        "Level1": {
          "block_info": {
            "ext_block_length": 5,
            "ext_block_level": 1,
            "remaining": [
              0,
              0,
              0,
              0
            ]
          },
          "min_pq": 0,
          "max_pq": 0,
          "avg_pq": 0
        }
      },
      {
        "Level2": {
          "block_info": {
            "ext_block_length": 11,
            "ext_block_level": 2,
            "remaining": [
              0,
              0,
              0
            ]
          },
          "target_max_pq": 2081,
          "trim_slope": 2048,
          "trim_offset": 2048,
          "trim_power": 2048,
          "trim_chroma_weight": 2048,
          "trim_saturation_gain": 2048,
          "ms_weight": 2048
        }
      },
      {
        "Level2": {
          "block_info": {
            "ext_block_length": 11,
            "ext_block_level": 2,
            "remaining": [
              0,
              0,
              0
            ]
          },
          "target_max_pq": 2851,
          "trim_slope": 2048,
          "trim_offset": 2048,
          "trim_power": 2048,
          "trim_chroma_weight": 2048,
          "trim_saturation_gain": 2048,
          "ms_weight": 2048
        }
      },
      {
        "Level2": {
          "block_info": {
            "ext_block_length": 11,
            "ext_block_level": 2,
            "remaining": [
              0,
              0,
              0
            ]
          },
          "target_max_pq": 3079,
          "trim_slope": 2048,
          "trim_offset": 2048,
          "trim_power": 2048,
          "trim_chroma_weight": 2048,
          "trim_saturation_gain": 2048,
          "ms_weight": 2048
        }
      },
      {
        "Level2": {
          "block_info": {
            "ext_block_length": 11,
            "ext_block_level": 2,
            "remaining": [
              0,
              0,
              0
            ]
          },
          "target_max_pq": 3388,
          "trim_slope": 2048,
          "trim_offset": 2048,
          "trim_power": 2048,
          "trim_chroma_weight": 2048,
          "trim_saturation_gain": 2048,
          "ms_weight": 2048
        }
      },
      {
        "Level5": {
          "block_info": {
            "ext_block_length": 7,
            "ext_block_level": 5,
            "remaining": [
              0,
              0,
              0,
              0
            ]
          },
          "active_area_left_offset": 0,
          "active_area_right_offset": 0,
          "active_area_top_offset": 0,
          "active_area_bottom_offset": 0
        }
      },
      {
        "Level6": {
          "block_info": {
            "ext_block_length": 8,
            "ext_block_level": 6,
            "remaining": []
          },
          "max_display_mastering_luminance": 1000,
          "min_display_mastering_luminance": 1,
          "max_content_light_level": 596,
          "max_frame_average_light_level": 200
        }
      }
    ]
  },
  "remaining": [
    0
  ],
  "rpu_data_crc32": 562607130

Profile 8 RPU from bluray:

Code: Select all

 "num_ext_blocks": 4,
    "ext_metadata_blocks": [
      {
        "Level1": {
          "block_info": {
            "ext_block_length": 5,
            "ext_block_level": 1,
            "remaining": [
              0,
              0,
              0,
              0
            ]
          },
          "min_pq": 0,
          "max_pq": 2081,
          "avg_pq": 819
        }
      },
      {
        "Level4": {
          "block_info": {
            "ext_block_length": 3,
            "ext_block_level": 4,
            "remaining": []
          },
          "anchor_pq": 0,
          "anchor_power": 0
        }
      },
      {
        "Level5": {
          "block_info": {
            "ext_block_length": 7,
            "ext_block_level": 5,
            "remaining": [
              0,
              0,
              0,
              0
            ]
          },
          "active_area_left_offset": 0,
          "active_area_right_offset": 0,
          "active_area_top_offset": 276,
          "active_area_bottom_offset": 277
        }
      },
      {
        "Level6": {
          "block_info": {
            "ext_block_length": 8,
            "ext_block_level": 6,
            "remaining": []
          },
          "max_display_mastering_luminance": 1000,
          "min_display_mastering_luminance": 1,
          "max_content_light_level": 596,
          "max_frame_average_light_level": 200
        }
      }
    ]
  },
  "remaining": [],
  "rpu_data_crc32": 326453137
}


generated RPU ( no L2)

Code: Select all

 "num_ext_blocks": 3,
    "ext_metadata_blocks": [
      {
        "Level1": {
          "block_info": {
            "ext_block_length": 5,
            "ext_block_level": 1,
            "remaining": [
              0,
              0,
              0,
              0
            ]
          },
          "min_pq": 0,
          "max_pq": 0,
          "avg_pq": 0
        }
      },
      {
        "Level5": {
          "block_info": {
            "ext_block_length": 7,
            "ext_block_level": 5,
            "remaining": [
              0,
              0,
              0,
              0
            ]
          },
          "active_area_left_offset": 0,
          "active_area_right_offset": 0,
          "active_area_top_offset": 0,
          "active_area_bottom_offset": 0
        }
      },
      {
        "Level6": {
          "block_info": {
            "ext_block_length": 8,
            "ext_block_level": 6,
            "remaining": []
          },
          "max_display_mastering_luminance": 1000,
          "min_display_mastering_luminance": 1,
          "max_content_light_level": 596,
          "max_frame_average_light_level": 200
        }
      }
    ]
  },
  "remaining": [
    0,
    0,
    0,
    0,
    0
  ],
  "rpu_data_crc32": 1882379805
}
Last edited by RESET_9999 on Wed Aug 25, 2021 7:50 pm, edited 3 times in total.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
Manixx2020beyound
Posts: 127
Joined: Thu Oct 08, 2020 5:19 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Manixx2020beyound »

quietvoid wrote:
Wed Aug 25, 2021 7:08 pm
Manixx2020beyound wrote:
Wed Aug 25, 2021 2:22 pm
Fantastic! great news!!
Thanks, so much will be testing tonight.
“NO BANZ TO MAKE DV DANCE”
Raw footage:
Now I can create a dv music video
With l1
Testing a dv/hdr10plus xml master of beckett which also has secondary trims too
Created by resolve
For raw footage we should be able to define the aspect ratio in the final encoding settings
By the way, currently it only works for CMv2.9 XML files. Will look at supporting v4.0 but things like secondary trims are not backwards compatible.
Waiting patiently for 4.0
2.9 does not use the resolve dv analysis tool.
quietvoid
Posts: 377
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

RESET_9999 wrote:
Wed Aug 25, 2021 7:20 pm
I'm sooooo confused lol...

I converted my hdr10plus JSON to RPU.bin and I'm comparing the metadata and most of it is the same as the original bluray RPU (p8) except at the end where the original profile 8 RPU has different values for L1 and no L2 metadata but it has L4 metadata.... So my generated is wrong or not? and what the hell is level 4 ? its not even on the dolby documentation. Since L2 is optional, should we NOT generate it? L1 pq max and min doesnt match, why?
L1 values from HDR10+ are not going to be exactly the same. Dolby Vision often has a minimum of max 100 nits, avg 10 nits. While HDR10+ doesn't.

For L2, I'm not sure if it makes any difference to add or not. IIRC chros said his output was brighter when using 1000 nits compared to 600 nits.
It is optional.

L4 metadata is supposed to be useful for smoother transitions between scenes, it is currently not calculated.
Since it's calculated values, Dolby doesn't really document it as it's not in the XML.

So based on your info, if only some of the first/last frames have very different L1 metadata, I think the generated RPU is fine..

FWIW, normally this is the difference between both metadatas: https://slow.pics/c/4DMxP9RD
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

got it , thank you... Time to compare now.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
RESET_9999
Posts: 2406
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

quietvoid wrote:
Wed Aug 25, 2021 8:49 pm
Strange, how come WW-84 has L5 active areas 276/277 when this movie has some IMAX scenes 66/66 ...
I guess the L5 metadata doesnt seem to really matter (even bluray players ignore it)

same active areas in the p5 webdl and the p7 bluray.


EDIT: Checked about 2min, looks good but slightly darker than bluray DV https://slow.pics/c/gYCkoX8F

Code: Select all

      {
        "Level5": {
          "block_info": {
            "ext_block_length": 7,
            "ext_block_level": 5,
            "remaining": [
              0,
              0,
              0,
              0
            ]
          },
          "active_area_left_offset": 0,
          "active_area_right_offset": 0,
          "active_area_top_offset": 276,
          "active_area_bottom_offset": 277
        }
      },
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
quietvoid
Posts: 377
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

RESET_9999 wrote:
Wed Aug 25, 2021 10:29 pm
Strange, how come WW-84 has L5 active areas 276/277 when this movie has some IMAX scenes 66/66 ...
I guess the L5 metadata doesnt seem to really matter (even bluray players ignore it)

same active areas in the p5 webdl and the p7 bluray.
I think the L5 metadata does vary when necessary, so it shouldn't be 276/277 everywhere..
If it is, then I guess it just doesn't matter for UHD BD.

RESET_9999 wrote:
Wed Aug 25, 2021 10:29 pm
EDIT: Checked about 2min, looks good but slightly darker than bluray DV https://slow.pics/c/gYCkoX8F
Possibly the trim pass, any generated RPU (apart from XML) should be closer to HDR10 than actual full Dolby Vision (with trim passes).
It looks pretty good to me though, I didn't expect that much difference for just L1.
Post Reply