Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

Trees wrote:
Mon Mar 25, 2024 11:45 pm
Has anyone figured out how to convert P5 MKVs to MP4? I've tried an FFMPEG command found here:

Code: Select all

ffmpeg -i "S01E01.mkv" -map 0:v -map 0:a -map 0:s:0 -c:v copy -c:a copy -c:s mov_text -strict unofficial "S01E01.mp4"
That command seems right. Make sure you are using the latest tools.

Code: Select all

ffmpeg -i dv.mkv -map 0 -c copy -c:s mov_text -strict -2 dv.mp4
If that fails, it could be because the file is corrupted.
However, you could still try if other tools can recover it.

Code: Select all

ffmpeg -i dv.mkv -c copy dv.hevc
mp4box -add dv.hevc:dv-profile=5 -new dv.mp4

Code: Select all

ffmpeg -i dv.mkv -c copy dv.hevc
mp4muxer -i dv.hevc --dv-profile 5
Trees wrote:
Mon Mar 25, 2024 11:45 pm
The -vbsf hevc_mp4toannexb part is used when demuxing the P5 HEVC stream from a container, I believe.
As for -vbsf hevc_mp4toannexb, not sure if it's needed in mp4.
speeddemon
Posts: 77
Joined: Wed Oct 16, 2019 3:44 am

Re: Dolby Vision now possible through MP4 Mux.

Post by speeddemon »

RESET_9999 wrote:
Wed Mar 20, 2024 9:37 pm
bbeny123 wrote:
Wed Mar 20, 2024 9:30 pm
Let's assume that Ugoos AM6B Plus is stable with FEL - will it be better in terms of image quality than x800m2?
Since it supports true tv-led, for cmv2.9 content it should be the same quality.
...not according to Stacey Spears because of bugs in the UHD Blu-ray Dolby Vision v2.9 SDK (time-stamped to 1709s):
https://www.youtube.com/live/jYKMqjv1xQ ... bmg&t=1709

I don't know what all of those bugs are, but I believe with the Amlogic S922X-J being based on the DoVi v4 SDK that it should not have these same bugs Stacey references.
RESET_9999
Posts: 2410
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

speeddemon wrote:
Tue Mar 26, 2024 8:39 pm
...not according to Stacey Spears because of bugs in the UHD Blu-ray Dolby Vision v2.9 SDK (time-stamped to 1709s):
https://www.youtube.com/live/jYKMqjv1xQ ... bmg&t=1709

I don't know what all of those bugs are, but I believe with the Amlogic S922X-J being based on the DoVi v4 SDK that it should not have these same bugs Stacey references.
Yes, I know, I watched this video Live when it aired. From the previous comparison I did with my x800m2 which has fewer bugs than the oppo/x700, there's not much difference with cmv2.9 content.

Anyway, the Ugoos finally looks like the device we were all waiting for. I know I already told you that in PM but...

So far with the limited testing I did with the ugoos...

- Perfect image on the ''multi-pattern''... first cmv4.0 device to perform that well with it.
- no visible issue with color bars patterns.
- Behave exactly like the ATV, C2 internal app and Shield for Black crush meaning CMV2.9 content is crushed while cmv4.0 content is perfect.
- FEL is stable and FF/RW keeps the BL/EL in sync properly, played Power Rangers P7 rip from start to end.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
DylanValenti
Posts: 36
Joined: Sat Dec 19, 2020 9:42 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by DylanValenti »

RESET_9999 wrote:
Tue Mar 26, 2024 9:38 pm
speeddemon wrote:
Tue Mar 26, 2024 8:39 pm
...not according to Stacey Spears because of bugs in the UHD Blu-ray Dolby Vision v2.9 SDK (time-stamped to 1709s):
https://www.youtube.com/live/jYKMqjv1xQ ... bmg&t=1709

I don't know what all of those bugs are, but I believe with the Amlogic S922X-J being based on the DoVi v4 SDK that it should not have these same bugs Stacey references.
Yes, I know, I watched this video Live when it aired. From the previous comparison I did with my x800m2 which has fewer bugs than the oppo/x700, there's not much difference with cmv2.9 content.

Anyway, the Ugoos finally looks like the device we were all waiting for. I know I already told you that in PM but...

So far with the limited testing I did with the ugoos...

- Perfect image on the ''multi-pattern''... first cmv4.0 device to perform that well with it.
- no visible issue with color bars patterns.
- Behave exactly like the ATV, C2 internal app and Shield for Black crush meaning CMV2.9 content is crushed while cmv4.0 content is perfect.
- FEL is stable and FF/RW keeps the BL/EL in sync properly, played Power Rangers P7 rip from start to end.
Does seeking keep the FEL in sync or do you need to FF/RW. How about chapter skipping?
RESET_9999
Posts: 2410
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

DylanValenti wrote:
Tue Mar 26, 2024 10:43 pm
Does seeking keep the FEL in sync or do you need to FF/RW. How about chapter skipping?
I didn't have much time to test it yet but I skipped through + FF/RW in the Power Rangers P7 rip and the ending credit was perfectly in sync (bright white) just like my x800m2.
I didn't try chapters. I'll have more time this weekend to test it and will compare it with the ATV, Shield and x800m2.
I'll try to watch some FEL movies as well but so far just for testing, I played (without watching) Power Rangers and Primal Fear completely.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
Donpoku
Posts: 66
Joined: Wed Jul 03, 2019 3:43 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Donpoku »

RESET_9999 wrote:
DylanValenti wrote:
Tue Mar 26, 2024 10:43 pm
Does seeking keep the FEL in sync or do you need to FF/RW. How about chapter skipping?
I didn't have much time to test it yet but I skipped through + FF/RW in the Power Rangers P7 rip and the ending credit was perfectly in sync (bright white) just like my x800m2.
I didn't try chapters. I'll have more time this weekend to test it and will compare it with the ATV, Shield and x800m2.
I'll try to watch some FEL movies as well but so far just for testing, I played (without watching) Power Rangers and Primal Fear completely.
Hi there , which file is best to test CMV4.0 effect, or show is working? Thanks.

Sent from my SM-F946B using Tapatalk

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

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Donpoku wrote:
Thu Mar 28, 2024 3:11 am
Hi there , which file is best to test CMV4.0 effect, or show is working? Thanks.

Sent from my SM-F946B using Tapatalk
Yes, all my test files can be found here: https://drive.google.com/drive/u/1/fold ... V0E3VVkhiC
look in the RPU response folder.

PS, I did a new version of my FEL test file.. I managed to remove the buggy reaction with the RPU mapping, and I added some L1 L2 L8 variation and also did a CMV4.0 version.
Works well on the Ugoos:

https://www.youtube.com/watch?v=4QUURfLy5ew
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
Kaan_
Posts: 4
Joined: Fri Mar 29, 2024 8:39 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Kaan_ »

Hi RESET_9999,

There is ongoing debate regarding whether to set the color space to BT.709 or BT.2020, or not set it at all.

It seems now there is a way to check things out on the fly: https://discourse.coreelec.org/t/dolby- ... /24273/870

What do you think?
RESET_9999
Posts: 2410
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Kaan_ wrote:
Fri Mar 29, 2024 8:41 am
Hi RESET_9999,

There is ongoing debate regarding whether to set the color space to BT.709 or BT.2020, or not set it at all.

It seems now there is a way to check things out on the fly: https://discourse.coreelec.org/t/dolby- ... /24273/870

What do you think?
Hi,
It's been a very long time since I tested this. I first noticed the difference when the Shield was released in 2019 and then later on the Zidoo. I had a C8 back then.
I noticed pretty much the same thing @cpm saw on his E8 here : https://discourse.coreelec.org/t/dolby- ... /24273/884
We can see it too in this old comparison I did on the zidoo forum: https://slow.pics/c/8zWhGixS

Right now I have a C2 and the VRR info does not report any flag with the Ugoos AM6b+, Shield, AppleTV, X800m2. It just says ''RGB 8bit TM DV''
I think you have a C1? and you said that there was no difference so maybe it depends on the TV. FWIW, on my 2023 Hisense u8, the TV osd display ''RGB 8bit rec709'' for all my devices.

IMO, since the majority of the players(including the latest ones: ATV, firestick/cube) do not send any flag, I think it is better to not send any color flag and let the TV handle the signal.
IIRC, on the C8, not signaling any flag was more accurate and matched how it looked using the internal TV app.

On a different note, I noticed some st2084 tracking issues with this pattern but overall it has fewer issues than the Shield/ATV: https://slow.pics/c/xLgSTMc3
I hope it doesnt affect real content playback which I haven't yet compared to my other devices.

pattern: https://drive.google.com/file/d/1OhnEb_ ... drive_link
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
Trees
Posts: 58
Joined: Sat Sep 03, 2022 8:04 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Trees »

sw5163 wrote:
Tue Mar 26, 2024 3:08 am
Trees wrote:
Mon Mar 25, 2024 11:45 pm
Has anyone figured out how to convert P5 MKVs to MP4? I've tried an FFMPEG command found here:

Code: Select all

ffmpeg -i "S01E01.mkv" -map 0:v -map 0:a -map 0:s:0 -c:v copy -c:a copy -c:s mov_text -strict unofficial "S01E01.mp4"
That command seems right. Make sure you are using the latest tools.

Code: Select all

ffmpeg -i dv.mkv -map 0 -c copy -c:s mov_text -strict -2 dv.mp4
If that fails, it could be because the file is corrupted.
However, you could still try if other tools can recover it.

Code: Select all

ffmpeg -i dv.mkv -c copy dv.hevc
mp4box -add dv.hevc:dv-profile=5 -new dv.mp4

Code: Select all

ffmpeg -i dv.mkv -c copy dv.hevc
mp4muxer -i dv.hevc --dv-profile 5
Trees wrote:
Mon Mar 25, 2024 11:45 pm
The -vbsf hevc_mp4toannexb part is used when demuxing the P5 HEVC stream from a container, I believe.
As for -vbsf hevc_mp4toannexb, not sure if it's needed in mp4.
Thank you for the tip, updating worked. I had no idea it was that outdated!

However, I ran into the next problem; I'm getting subtle brightness flicking and (I'm assuming) IPTPQc2 errors. Every now and then I get a frame of the IPTPQc2 colour space peeking through. Literally slight change in colours every few minutes or so, randomly, it seems, and very very short. Barely noticeable.

Is this a known error / bug or?

Edit: Bonus question; does MP4 only support one subtitle track? I've remuxed numerous files however ffmpeg only seems to be copying over one subtitle track; is the subtitle part of the command incorrect or does MP4 just not support more than one subtitle track?

Edit: I've figured it out. The flickering was the file itself, just a bad quality Web-DL. As for ffmpeg, the correct command to include all subtitles is:

Code: Select all

ffmpeg -i "S01E01.mkv" -map 0:v -map 0:a -map 0:s -c:v copy -c:a copy -c:s mov_text -strict unofficial "S01E01.mp4"
Last edited by Trees on Sun Mar 31, 2024 7:56 pm, edited 1 time in total.
Donpoku
Posts: 66
Joined: Wed Jul 03, 2019 3:43 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Donpoku »

RESET_9999 wrote:
Kaan_ wrote:
Fri Mar 29, 2024 8:41 am
Hi RESET_9999,

There is ongoing debate regarding whether to set the color space to BT.709 or BT.2020, or not set it at all.

It seems now there is a way to check things out on the fly: https://discourse.coreelec.org/t/dolby- ... /24273/870

What do you think?
Hi,
It's been a very long time since I tested this. I first noticed the difference when the Shield was released in 2019 and then later on the Zidoo. I had a C8 back then.
I noticed pretty much the same thing @cpm saw on his E8 here : https://discourse.coreelec.org/t/dolby- ... /24273/884
We can see it too in this old comparison I did on the zidoo forum: https://slow.pics/c/8zWhGixS

Right now I have a C2 and the VRR info does not report any flag with the Ugoos AM6b+, Shield, AppleTV, X800m2. It just says ''RGB 8bit TM DV''
I think you have a C1? and you said that there was no difference so maybe it depends on the TV. FWIW, on my 2023 Hisense u8, the TV osd display ''RGB 8bit rec709'' for all my devices.

IMO, since the majority of the players(including the latest ones: ATV, firestick/cube) do not send any flag, I think it is better to not send any color flag and let the TV handle the signal.
IIRC, on the C8, not signaling any flag was more accurate and matched how it looked using the internal TV app.

On a different note, I noticed some st2084 tracking issues with this pattern but overall it has fewer issues than the Shield/ATV: https://slow.pics/c/xLgSTMc3
I hope it doesnt affect real content playback which I haven't yet compared to my other devices.

pattern: https://drive.google.com/file/d/1OhnEb_ ... drive_link
Hi buddy What exactly are we looking for with this pattern, Thanks.

Sent from my SM-F946B using Tapatalk

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

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Donpoku wrote:
Sat Mar 30, 2024 7:57 am
Hi buddy What exactly are we looking for with this pattern, Thanks.

Sent from my SM-F946B using Tapatalk
this pattern is explained here: https://spearsandmunsil.com/portfolio-i ... r-space-3/

here I marked whats wrong with each device: https://slow.pics/c/0njV9U5X
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
LV8HD
Posts: 50
Joined: Tue Jan 11, 2022 3:48 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by LV8HD »

(1-1)(3-1) Script is now configured to keep the trims to match Resolve default (can be disabled at lines 48-52 if you prefer the old way)
I'm a bit confused since in your updated video on how to generate Dolby Vision and HDR10+ via Davinci Resolve you explicitly mentioned that L2 trims must be removed in order to achieve the most "natural" and near-creator-intended look possible. What has changed?
RESET_9999
Posts: 2410
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

LV8HD wrote:
Sat Mar 30, 2024 12:09 pm
I'm a bit confused since in your updated video on how to generate Dolby Vision and HDR10+ via Davinci Resolve you explicitly mentioned that L2 trims must be removed in order to achieve the most "natural" and near-creator-intended look possible. What has changed?
I knew this question would come up haha... I did more test about the trims and it turns out, that all the trims in cmv2.9(100-600-1000) are generated from the manual L8 100nits trim and if no L8 trims were done by the colorist, the cmv2.9 trims are 100% generated.

Here's how to spot generated trims or manual ones:
Generated / automatic trims from cmv4.0 to cmv2.9 conversion will:
1- only use slope, offset and power.
2- will brighten with gamma and power the low nits scene. in the 600nits trims
3- will darken with gamma and power the high nits scene. in the 600nits trims
4- 100nits trims will most of the time have gamma and power values in the negative canceling each other( gamma darkens as much as power brightens) and most of the time offset will be negative too which makes sense because it compresses HDR to SDR range.
5- they will look 80% of the time like in this full comparison: https://slow.pics/c/hcIFEfIM

CMV2.9 rpu:
1- if the avg pq floor is 2.5nits, you know this comes from a 2.9 workflow so you can be sure that the trims is 100% manual
2- if the avg pq floor is 10nits, you know this come from a 4.0 workflow and the 100-600-1000 trims are 100% a conversion from a manual 100nits L8 trim
3- as soon as you see trim saturation gain and chroma weight or ms weight, you know this must come from the colorist as the dolby system cannot generate those.

CMV4.0 rpu:
If there is no active L8 trims, it means the L2 trims are 100% generated. They could be slightly updated with manual L3 mid tone offset which i dont know if it affects the generated trims (most likely it does because it directly affects L3)

Of the tons of rpu I checked so far, I think I saw active L8 600nits trims only 3 times. Therefore 99.9% of the movies (cmv2.9 or 4.0 with trims), are generated from a 100nits trims manual job.


Slope(gamma) (green line)= value under 2048 = darken over 2048= brighten
offset (lift) (blue line)= value under 2048 = darken over 2048= brighten
power(gain) (green line)= value under 2048 = brighten over 2048= darken
chroma weight affects only the highly saturated highlights. value under 2048 = darken over 2048= brighten
saturation gain controls the whole image saturation. This is the trim that can make DV colors look quite different than HDR10...
ms weight works like madvr highlights recovery, it increases or decreases details in highlights.

Lift/Gamma/Gain: These controls function similarly to the Y-only Lift, Gamma, and Gain master
wheels of the Color Wheels palette, to let you trim the overall contrast levels of the image. The
Dolby Best Practices Guide recommends to limit positive Lift to no more than 0.025, and mostly
restrict yourself to using Gamma and Gain if necessary to lighten the image.
— Saturation Gain: Lets you trim the saturation of the most highly saturated areas within a scene.
Lesser saturated values will be less affected.
— Chroma Weight: Darkens saturated parts of the image to preserve colorfulness in areas of
the image that are clipped by smaller gamuts that don’t have enough headroom for saturation
in the highlights.
— Tone Detail: Lets you preserve contrast detail in the highlights that might otherwise be lost when
the highlights are mapped to lower dynamic ranges, usually due to clipping. Increasing Tone
Detail Weight increases the amount of highlight detail that’s preserved. When used, can have the
effect of sharpening highlight detail.

You can use Gamma to elevate the blacks/shadows as required and use the Gain trim control to restore any highlights that may have been elevated or clipped.

For example, if a program were graded relative to a 4000 nit display, along with a single 100 nit
BT.709 trim pass, then a Dolby Vision-compatible television with 750 nit peak output will reference
the 100 nit trim pass metadata in order to come up with the best way of “splitting the difference” to
output the signal correctly. On the other hand, were the colorist to do three trim passes, the first
at 100 nits, -cond at 600 nits, and a third at 1000 nits, then a 750 nit-capable Dolby Vision television
would be able to use the 600 and 1000 nit trim metadata to output more accurately scaled color
volume and HDR-strength highlights, relative to the colorist’s adjustments, that take better advantage
of the 750 nit output of that television.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
Donpoku
Posts: 66
Joined: Wed Jul 03, 2019 3:43 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Donpoku »


RESET_9999 wrote:
Donpoku wrote:
Sat Mar 30, 2024 7:57 am
Hi buddy What exactly are we looking for with this pattern, Thanks.

Sent from my SM-F946B using Tapatalk
this pattern is explained here: https://spearsandmunsil.com/portfolio-i ... r-space-3/

here I marked whats wrong with each device: https://slow.pics/c/0njV9U5X
Thank you, so st should be white almost invisible, right?

Sent from my SM-F946B using Tapatalk

Post Reply