Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
Message
Author
RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#9736 Post by RESET_9999 » Wed Feb 28, 2024 2:11 pm

afarvvik wrote:
Wed Feb 28, 2024 2:59 am
hi @RESET_9999 is dovi tools available for arm64 linux anywhere?
dovi_tool cli: yes
dovi_scripts: no

frrilay
Posts: 1
Joined: Sun Aug 13, 2023 3:19 pm

Re: Dolby Vision now possible through MP4 Mux.

#9737 Post by frrilay » Thu Feb 29, 2024 8:47 am

Hi RESET, using cm_analyze to generate DV will result in a CMv4.0 file with latest algorythm; what exactly do you loose when converting this file down to CMv2.9? The goal being to make it compatible with ATV for example (and even when Infuse adds support for CMv4.0, I understood from your previous posts that ATV doesn't handle CMv4.0 perfectly).
Taking the occasion to say merci beaucoup for your hard work ;)

afarvvik
Posts: 14
Joined: Mon Jan 23, 2023 8:16 pm

Re: Dolby Vision now possible through MP4 Mux.

#9738 Post by afarvvik » Thu Feb 29, 2024 10:15 am

RESET_9999 wrote:
Wed Feb 28, 2024 2:11 pm
afarvvik wrote:
Wed Feb 28, 2024 2:59 am
hi @RESET_9999 is dovi tools available for arm64 linux anywhere?
dovi_tool cli: yes
dovi_scripts: no
could you please provide a link, it is not on the github page & googling did not help. thanks.

quietvoid
Posts: 373
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

#9739 Post by quietvoid » Thu Feb 29, 2024 11:36 am

afarvvik wrote:
Thu Feb 29, 2024 10:15 am
could you please provide a link, it is not on the github page & googling did not help. thanks.
There are currently no Linux ARM64 builds.
Build it yourself.

RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#9740 Post by RESET_9999 » Thu Feb 29, 2024 3:20 pm

frrilay wrote:
Thu Feb 29, 2024 8:47 am
Hi RESET, using cm_analyze to generate DV will result in a CMv4.0 file with latest algorythm; what exactly do you loose when converting this file down to CMv2.9? The goal being to make it compatible with ATV for example (and even when Infuse adds support for CMv4.0, I understood from your previous posts that ATV doesn't handle CMv4.0 perfectly).
Taking the occasion to say merci beaucoup for your hard work ;)
cmv4.0 has better tone mapping than cmv2.9.
It never clips highlights(tunning 1), is much brighter, and doesn't crush black/shadow details.

old cmv2.9 vs old cmv4.0 vs new cmv4.0 vs hdr10plus vs madVR (metadata comparison)
https://drive.google.com/file/d/1PiiK4W ... sp=sharing

Cannikin
Posts: 176
Joined: Tue Aug 18, 2020 11:54 pm

Re: Dolby Vision now possible through MP4 Mux.

#9741 Post by Cannikin » Tue Mar 05, 2024 5:46 pm

Hey everyone sorry to butt in on this thread but it seemed fairly related to what I'm trying to do:

Is there an easy ffmpeg command to convert an .mp4 with embedded DV (profile 5) to .mkv?

A google search for "mp4 with dolby vision to mkv" is all for doing the opposite—converting .mkv to .mp4. I've got plenty of DV MKVs that all play great (ripped with MakeMKV) but I recently got an .mp4 and can't figure out how to convert. When I try with a standard `ffmpeg -i movie.mp4 -map 0 -c copy movie.mkv` I get:

Code: Select all

[matroska @ 0x11e028400] Tag dvh1 incompatible with output codec id '173' ([0][0][0][0])
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
Error initializing output stream 0:2 --
The stream identifier for the mp4 looks like:

Code: Select all

Stream #0:0(und): Video: hevc (Main 10) (dvh1 / 0x31687664), yuv420p10le(pc), 1920x1080 [SAR 1:1 DAR 16:9], 6829 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 23.98 tbc (default)
    Metadata:
      creation_time   : 2024-03-02T05:05:29.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : DOVI Coding
    Side data:
      DOVI configuration record: version: 1.0, profile: 5, level: 3, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0
Thanks for any help!

LV8HD
Posts: 37
Joined: Tue Jan 11, 2022 3:48 pm

Re: Dolby Vision now possible through MP4 Mux.

#9742 Post by LV8HD » Tue Mar 05, 2024 6:14 pm

Hi everyone, since the topic of HDR metadata is well know in this forum I wanted to ask a question about it.

While I was browsing some trackers I've found one release group which seems to be really aware of what they are doing with video and audio related stuff. In particular, they managed to change MDL and MaxCLL/MaxFALL values within the hevc stream itself.
How is this even possible to do?

Here's the releaser's words:
"As usual we checked the static metadata and surprise-surprise, it was wrong again after doing a complete frame by frame analysis using industry standard methods. Dune has a supremely well done, highly dynamic 4000-nit mastered HDR grade, so having accurate grade specific static metadata for the base HDR presentation is very important. Not just to maximize the viewing experience, but also to correctly inform the display of the precise range of the content being played. The stock metadata had 1000-nit limited values despite the film and HDR grade on the disc being mastered at 4000-nit by the studio. We suspect the discrepancy came from values left over from the theatrical 1.90:1 IMAX, or far more likely: metadata for a 1000-nit tonemapped variation that somehow got in there. In either case, the actual measured uncapped values were applied. MaxCLL/MaxFALL coming from frames 4549 and 55532 respectively, properly ratio output blanked and at native UHD resolution of course."

This is a comparison of the video track before and after:

Stock video

Code: Select all

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : Dolby Vision, Version 1.0, Profile 7.6, dvhe.07.06, BL+EL+RPU, Blu-ray compatible / SMPTE ST 2086, Version HDR10, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 2 h 35 min
Bit rate                                 : 59.8 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
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.300
Stream size                              : 64.9 GiB (89%)
Language                                 : English
Default                                  : No
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              : 787 cd/m2
Maximum Frame-Average Light Level        : 239 cd/m2

Edited video

Code: Select all

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU, Blu-ray compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 2 h 35 min
Bit rate                                 : 59.8 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
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.301
Stream size                              : 64.9 GiB (92%)
Language                                 : English
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              : 1804 cd/m2
Maximum Frame-Average Light Level        : 501 cd/m2

skull88
Posts: 56
Joined: Mon Mar 27, 2023 3:08 pm

Re: Dolby Vision now possible through MP4 Mux.

#9743 Post by skull88 » Tue Mar 05, 2024 7:27 pm

In my opinion, this group only "seems" or "acts" like they know it all, and they tend to just write very long and nerdy release notes and talk about using "industry" tools etc, but I've seen mistakes by them with audio and Dolby Vision metadata before (even plain converting HDR10plus to DV before, which is a no-no). Considering maxCLL and maxFALL metadata values for HDR BL (and L6 for DV too) are often inaccurate or even completely absent for many studio releases including UHD BDs, they clearly don't have the impact the group states during playback in all cases and MDL matters most (RESET_9999 confirmed they do matter in some cases in post below). I believe how all of these values impact PQ varies by playback device/TV and if in TV-LED or LLDV mode (for L6/DV), but statistically speaking, MDL is usually correct and matches the HDR grading monitor used, at least for retail UHD BD (don't forget that technically, a colourist can use a 4K mastering display but grade for peaks of 1K maxCLL still), and cannot be modified without re-encoding. More importantly, Dolby Vision metadata can have different internal MDL than the HDR BL metadata shows, and that is what counts for DV playback, which is quickly becoming the standard for majority of releases. As for your example, I don't see that they changed MDL, it's 4K in both before/after, they only modified the maxCLL and maxFALL values, which maybe is done using ffmpeg to do a "pass-through" re-encode and only modify those values? Maybe there's another way to do it though? Cheers!
Last edited by skull88 on Tue Mar 05, 2024 7:56 pm, edited 5 times in total.

RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#9744 Post by RESET_9999 » Tue Mar 05, 2024 7:50 pm

On LG TVs, for HDR10 it uses maxcll if it's under MDL otherwise it uses MDL. But yeah that sounds like the crappy group WiLDCAT/EPS. I remember a while ago , they even tried to convince people that the HDRplus_tools was wrong which is totally false. I wouldn't believe a word they say. and once again they proved it...

As for Dune, I just measured it with madVR and I get a maxcll of 1127nits so the original static metadata is clearly a studio decision that makes sense, and using a maxcll of 1804nits is complete non-sense and will force the TV to use a more aggressive tone mapping curve when in fact 99% of the movie is under 1000nits.



Image


Image

skull88
Posts: 56
Joined: Mon Mar 27, 2023 3:08 pm

Re: Dolby Vision now possible through MP4 Mux.

#9745 Post by skull88 » Tue Mar 05, 2024 7:59 pm

Thanks for clarifying and confirming for Dune, RESET. I should also add that in some cases, the highest peak brightness found is actually in the studio logos or some 1-2 second blinding shot, and that is probably why studios don't always set maxCLL to match the brightest single frame in the entire master encode, but rather use other judgement/decision process, as that would not be a good idea for tonemapping if majority of the film is WAY below those tiny outliers.

LV8HD
Posts: 37
Joined: Tue Jan 11, 2022 3:48 pm

Re: Dolby Vision now possible through MP4 Mux.

#9746 Post by LV8HD » Tue Mar 05, 2024 8:03 pm

I see, thank you for the clarifications. Still, I don't understand how it is possible to change MDL or MaxCLL/FALL without re-encoding the video, but if it doesn't practically impact playback at all i think I'll get over this thought.

quietvoid
Posts: 373
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

#9747 Post by quietvoid » Wed Mar 06, 2024 5:05 pm

LV8HD wrote:
Tue Mar 05, 2024 8:03 pm
Still, I don't understand how it is possible to change MDL or MaxCLL/FALL without re-encoding the video, but if it doesn't practically impact playback at all i think I'll get over this thought.
It's just SEI in the bitstream.

There's been some other people asking me for a tool to do it, and I had started working on one long time ago (October 2022 from my git logs)
I just don't really care enough since it doesn't matter that much and I had other priorities.

skull88
Posts: 56
Joined: Mon Mar 27, 2023 3:08 pm

Re: Dolby Vision now possible through MP4 Mux.

#9748 Post by skull88 » Wed Mar 06, 2024 5:14 pm

Makes sense, I don't blame you either for leaving it in the past. Not to mention, a tool like that may have an unintended consequence of more "experts" and groups around the interwebz to modify retail values and spread misinformation about what they should or should not be.

speeddemon
Posts: 77
Joined: Wed Oct 16, 2019 3:44 am

Re: Dolby Vision now possible through MP4 Mux.

#9749 Post by speeddemon » Thu Mar 07, 2024 2:13 am

RESET_9999 wrote:
Tue Feb 13, 2024 1:43 pm
please ask any further questions related to the dovi_scripts here: https://forum.doom9.org/showthread.php? ... ost1997616

thanks.
Is this still a thing?

RESET_9999
Posts: 2093
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#9750 Post by RESET_9999 » Thu Mar 07, 2024 12:00 pm

speeddemon wrote:
Thu Mar 07, 2024 2:13 am
Is this still a thing?
of course

Post Reply