Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
lolipeid47
Posts: 10
Joined: Sun Nov 20, 2022 1:24 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by lolipeid47 »

quietvoid wrote:
Tue Jun 20, 2023 11:13 am
Trees wrote:
Tue Jun 20, 2023 9:10 am
Very interesting. I never knew extracting the RPU and injecting it in to a remux was a lossy progress. I thought it truly was the best of both worlds. It seems P5 DV is still absolute best, as it's in the IPTPQc2 colour space and includes both chroma and luma mapping; it's just lacking the bit rate of a Blu-ray.

Which begs the next question; seeing as the IPTPQc2 has been reverse engineered by gifted folk, as it can be decoded by MPV to be properlt played back, is it possible to convert the Blu-ray high bit-rate stream to the IPTPQc2 colour space and inject the lossless RPU to truly get best of both worlds?
Why do you believe the metadata is any better for quality? It's literally only required to decode the colours into regular PQ/BT.2020.
It doesn't improve the quality at all on playback. The process is only lossy in that it loses the original metadata, the quality is unaffected.

And any reencoding of a Blu-ray into IPT would be worse as transcoding is lossy.
Excellent answer thx :wink:
TheEqualizer
Posts: 44
Joined: Tue Feb 21, 2023 3:50 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by TheEqualizer »

RESET_9999 wrote:
Tue Jun 20, 2023 2:03 pm
To plot DV (graph screenshot), the workflow is 6-2-4.
For just a quick info summary about the RPU metadata in any file: 2-3
to check the metadata of any frame, input an RPU in: 2-3 or 2-2
Unfortunately an error appears and the plot is not created
6-2-4
https://ibb.co/zHTqKMN
RESET_9999
Posts: 1902
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

TheEqualizer wrote:
Tue Jun 20, 2023 2:46 pm
Unfortunately an error appears and the plot is not created
6-2-4
https://ibb.co/zHTqKMN
looks like your file doesn't have DV or you're using an old dovi_tool(not scripts) version.
TheEqualizer
Posts: 44
Joined: Tue Feb 21, 2023 3:50 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by TheEqualizer »

RESET_9999 wrote:
Tue Jun 20, 2023 2:58 pm

looks like your file doesn't have DV or you're using an old dovi_tool(not scripts) version.
Is this the latest version?
https://github.com/quietvoid/dovi_tool/ ... /tag/2.0.3
RESET_9999
Posts: 1902
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

yes but if your tool pack had the old dovi_tool, it means many other tools are missing or outdated... the latest version of the scripts will not work properly.
TheEqualizer
Posts: 44
Joined: Tue Feb 21, 2023 3:50 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by TheEqualizer »

RESET_9999 wrote:
Tue Jun 20, 2023 3:17 pm
yes but if your tool pack had the old dovi_tool, it means many other tools are missing or outdated... the latest version of the scripts will not work properly.
Yes, it already works, I replaced dovi-tools in the tool package, tell me, and a more recent version of the package can be obtained by a link in private messages, since I realized that you no longer publish to the public
valington
Posts: 32
Joined: Tue May 02, 2023 1:39 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by valington »

RESET_9999 wrote:
Tue Jun 20, 2023 2:03 pm
TheEqualizer wrote:
Tue Jun 20, 2023 1:40 pm
Good afternoon, tell me what sequence of script points you need to use to analyze the finished mkv file, you need to get a screenshot similar to what is created automatically when converting HDR10+ to DV, is it possible? I can't find a similar scenario, thank you
To plot DV (graph screenshot), the workflow is 6-2-4.
For just a quick info summary about the RPU metadata in any file: 2-3
to check the metadata of any frame, input an RPU in: 2-3 or 2-2
DUNE HD REAL VISION shows DT DL with full blu ray 4k dolby vision and ST DL with bdremux mkv 7 profile dolby vision is it true dolvy visiob or not ?
RESET_9999
Posts: 1902
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

valington wrote:
Tue Jun 20, 2023 6:04 pm
DUNE HD REAL VISION shows DT DL with full blu ray 4k dolby vision and ST DL with bdremux mkv 7 profile dolby vision is it true dolvy visiob or not ?
It's true DV but without FEL support meaning only the dynamic metadata in the RPU is used.
MartyMcNuts
Posts: 2508
Joined: Wed Nov 22, 2017 11:45 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by MartyMcNuts »

@RESET_9999,

I am having trouble with the script (using 1.8.3) 2-2 to extract the RPU. I've done this heaps of times over the past couple of weeks, mind you, this is the first attempt since a major Windows 11 update the other day. I haven't changed anything. Here is the log.


Input #0, mpegts, from 'F:\Movies\The_Transformers_The_Movie\BDMV\STREAM\00006.m2ts':
Duration: 01:25:00.83, start: 600.000000, bitrate: 97757 kb/s
Program 1
Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn
Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, stereo, s32p (24 bit)
Stream #0:2[0x1101]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), s32p (24 bit)
Stream #0:3[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:4[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:5[0x12a1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:6[0x1015]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn
Automatic encoder selection failed for output stream #0:0. Default encoder for format hevc (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:0

Error: No frames parsed!
Error: No NALU start codes found in the file. Maybe not a valid RPU?
Error: No NALU start codes found in the file. Maybe not a valid RPU?
FINDSTR: Cannot open H:\DoVi_Scripts_1.8.3_TOOLS\TEMP_folder7\test.xml
Error: No NALU start codes found in the file. Maybe not a valid RPU?
Error: No NALU start codes found in the file. Maybe not a valid RPU?
Parsing RPU file...
Error: No NALU start codes found in the file. Maybe not a valid RPU?
Parsing RPU file...
Error: No NALU start codes found in the file. Maybe not a valid RPU?
L5 Left offset: L5_is_missing_you_should_edit...
L5 Right offset: L5_is_missing_you_should_edit...
L5 Top offset: L5_is_missing_you_should_edit...
L5 Bottom offset: L5_is_missing_you_should_edit...
HDR10 BL MDL: min: 0.0001 cd/m2, max: 1000 cd/m2
HDR10 BL MDP: Display P3
Resolution: 3840 x 2160
FrameRate: 23.976fps
Duration: 5100.804seconds
the script has completed...
Press any key to continue . . .
Cheers :D
----------------------------------------------------------------------------------------------------------------------------
For UHD enabled drives (AU/NZ/SG) & DIY Single Drive Flasher (WW): https://www.uhdenableddrives.com
RESET_9999
Posts: 1902
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

It looks like the DV layer stream ID is wrong (6 instead of 1). You'll have to demux that one manually.
powdeau
Posts: 45
Joined: Sat Jan 12, 2019 1:01 am

Re: Dolby Vision now possible through MP4 Mux.

Post by powdeau »

@RESET_9999,

I've noticed that some of your RPU files don't have L2 trims for 600 and 1000 nits (e.g. Evil Dead Rise or Avatar). Wouldn't it cause a problem on x700 with C1, since x700 ignores L1 metadata and uses only L2?
RESET_9999
Posts: 1902
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

powdeau wrote:
Thu Jun 22, 2023 6:27 pm
@RESET_9999,

I've noticed that some of your RPU files don't have L2 trims for 600 and 1000 nits (e.g. Evil Dead Rise or Avatar).
IMO, the L2 trims can only be done/edited by the colorist/director so for our Resolve generated RPU, I recommend removing or overwriting the automatic trims otherwise they can make bright content very dark and dark content brighter which might not be the intended look.
see: https://www.youtube.com/watch?v=ZoseTlZ1JG4

Of all the movies I checked the metadata, only one time I noticed that the studios used the automatic trims but they forgot to do the blanking(black bar exclusion) which messed up everything.
see: https://slow.pics/c/tB3PBcPT

otherwise, the trims are almost always edited manually after the dv analysis.
see: https://slow.pics/c/Ozrwnmvr

Wouldn't it cause a problem on x700 with C1, since x700 ignores L1 metadata and uses only L2?
The x700 does not ignore L1, at least not in TV-LED.
https://drive.google.com/file/d/1gctmX1 ... drive_link
First, grade the HDR image on your Dolby Vision Certified Mastering Monitor to look as
you want it to. Dolby recommends starting by setting the look of the HDR image, to set
the overall intention for the grade.
2 When using various grading controls in the Color page to grade HDR images, you may
find it useful to enable the HDR Mode of the node you’re working on by right-clicking
that node in the Node Editor and choosing HDR mode from the contextual menu. This
setting adapts that node’s controls to work within an expanded HDR range. Practically
speaking, this makes controls that operate by letting you make adjustments at different
tonal ranges, such as Custom Curves, Soft Clip, etcetera, work more easily with wide-
latitude signals.
3 When you’re happy with the HDR grade, click the Analysis button in the Dolby Vision
palette. This analyzes every pixel of every frame of the current shot, and performs and
stores a statistical analysis that is sent to the CMU to guide its automatic conversion of
the HDR signal to an SDR signal.
4 If you’re not happy with the automatic conversion, use the Lift/Gamma/Gain/Chroma
Weight/Chroma Gain controls in the Dolby Vision palette to manually “trim” the result to
the best possible Rec. 709 approximation of the HDR grade you created in step 1. This
stores what Dolby refers to as “artistic guidance” metadata.
5 If you obtain a good result, then move on to the next shot and continue work. If you
cannot obtain a good result, and worry that you may have gone too far with your HDR
grade to derive an acceptable SDR downconvert, you can always trim the HDR grade a
bit, and then re-trim the SDR grade to try and achieve a better downconversion. Dolby
recommends that if you make significant changes to the HDR master, particularly if you
modify the blacks or the peak highlights, you should re-analyze the scene. However, if
you only make small changes, then reanalyzing is not strictly required
As you can see, the general idea promoted by Dolby is that a colorist will focus on grading the
HDR picture relative to the 1000, 2000, 4000, or higher nit display that is being used, and will
then rely on the colorist to use the Dolby Vision controls to “trim” this into a 100 nit SDR
version with artistic guidance. This “artistic guidance” metadata is saved as part of the mastered
media, and it’s used to more intelligently scale the HDR highlights to fit within any given HDR
display’s peak highlights, to handle how to downconvert the image for SDR displays, and also
how to respond when a television’s ABL circuit kicks in. In all of these cases, the colorist’s
artistic intent is used to guide all dynamic adjustments to the content.
powdeau
Posts: 45
Joined: Sat Jan 12, 2019 1:01 am

Re: Dolby Vision now possible through MP4 Mux.

Post by powdeau »

RESET_9999 wrote:
Thu Jun 22, 2023 7:19 pm
IMO, the L2 trims can only be done/edited by the colorist/director so for our Resolve generated RPU, I recommend removing or overwriting the automatic trims otherwise they can make bright content very dark and dark content brighter which might not be the intended look.
see: https://www.youtube.com/watch?v=ZoseTlZ1JG4
Thank you for the deep explanation. So in your script, I should change "Choose if you want to remove the 600 and 1000nits L2 trim pass" to "YES", right?
The x700 does not ignore L1, at least not in TV-LED.
https://drive.google.com/file/d/1gctmX1 ... drive_link
You’re right, I’ve mixed it up with "L1 low contrast and L2 offset 0.75" problem.
RESET_9999
Posts: 1902
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

powdeau wrote:
Thu Jun 22, 2023 8:01 pm
Thank you for the deep explanation. So in your script, I should change "Choose if you want to remove the 600 and 1000nits L2 trim pass" to "YES", right?
If you have access to the Dolby Metafier, yes. If you don't, you can set the script to just overwrite all the trims. This is how the script is set by default.

::choose if you want to overwrite L2 trims to 2048(no effect) for the XML to RPU conversion (YES or NO default = YES).
set drop.L2=YES
::Choose if you want to remove the 600 and 1000nits L2 trim pass. in other words, do you want to keep the L2 100nits trim (only valid for 1-1 and xml input) (require the dolby metafier and this option override: ''set drop.L2=YES'') (default=NO)
set rem_600_1000=NO

You’re right, I’ve mixed it up with "L1 low contrast
The L1 problem with the x800m2/x700 seem to be with low nits contents (under 1000nits). It's almost like the player knows the content is within the TV capabilities and decides to ignore L1 while the other devices(shield c2 internal,firestick) just apply the L1 metadata regardless of the content brightness.

L2 offset 0.75" problem
That is actually a much bigger problem. I did more tests about it and it turns out, any value over 2048 for trim offset has no effect in TV-LED mode on X700 x800m2 and Shield and most likely all the true TV-LED devices
If you force LLDV, then it's working properly.

This a bigger problem than the LLDV bug because Trim offset is used a lot more often in movies than Trim Chroma weight (lldv issue). By default the Dolby algo does not touch to Chroma Weight, it has to come from the colorist but Trim offset on the other hand, it's calculated automatically by the algo. FYI, values over 2048 make the image brighter. Trim offset test file: https://drive.google.com/file/d/1JrU6JX ... drive_link
difference with quietvoid L2 test file: https://www.avsforum.com/threads/pictur ... t-62609139


Example of movie with active trim offset with positive lift:

Image
TheEqualizer
Posts: 44
Joined: Tue Feb 21, 2023 3:50 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by TheEqualizer »

RESET_9999 wrote:
Sun Jul 25, 2021 9:48 pm
first, you have to find the frame difference between the two videos. Personally, I use MPC-BE and find the same frame for both videos, press ''control-g'' and calculate the frame number difference. You can navigate frame by frame with ''control left/right arrow'' when the video is paused.

then the framecount of both rpu and hdr10 video must match. so you calculate how many frames you have to remove or add at the end of the rpu. (include the frame you added or removed from the start of the rpu) ... just math at this point.

EDIT: it is no more needed to calculate the framecount since the latest update. You only need to calculate the frame difference so the rpu is in sync with the bluray remux.
Good afternoon, I want to clarify once and for all for myself, in cases where dv has fewer frames than hdr, for example
hdr=185248
dv=185200
.json will look like (please write here an example with numbers)
Conversely, when DV has more frames than HDR, for example
HDR=185200
DV=185248
.json will look like (please write an example with numbers here). Thank you in advance!
Post Reply