Dolby Vision now possible through MP4 Mux.

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

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

sw5163 wrote:
Sun Jul 17, 2022 10:22 pm
Let me get this straight.
In theory, we can have BL+RPU(MEL) played through Windows app on non DV support display (like Samsung QD-OLED) as LLDV.
And if we can adapt that DV extension as decoder, theoretically we are using software to decode DV and completely disregard DV licence certification?
This seems a little unreal to me.
yep but that's nothing new, my old Sony x700 has been able to do that since day 1, it even process FEL... It's part of the dolby capabilities.
Also, as @manix just showed, you don't need a DV-certified pc/monitor to get DV on windows. Just a DV TV, a vertex and an HDR10 capable pc.


sw5163 wrote:
Sun Jul 17, 2022 10:22 pm
I think that is what DV intends to do, not having exactly pq accuracy.
Basically no device is capable of 4000 or 10000 nit brightness or 100% Bt.2020
The RPU records how filmmaker would like the video to be shown on 100nitSDR/600nit/1000nit/10000nit display.
So it is supposed to not follow the base HDR10 pq curve.
This is my understanding, please point out my mistake if there is something wrong.
he's talking about the fact that the movies&TV app (windows HDR10) is not color accurate (regardless of DV). At least it wasn't the last time i checked(months ago). I should probably check that again.
i just dont really care about HDR10 anymore.
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

RESET_9999 wrote:
Sun Jul 17, 2022 10:35 pm
Also, as @manix just showed, you don't need a DV-certified pc/monitor to get DV on windows. Just a DV TV, a vertex and an HDR10 capable pc.
Does it have to be a DV tv? What will happen for something like Samsung QD-OLED directly connects to PC without vertex? Only plain HDR10?
RESET_9999 wrote:
Sun Jul 17, 2022 10:35 pm
he's talking about the fact that the movies&TV app (windows HDR10) is not color accurate (regardless of DV). At least it wasn't the last time i checked(months ago). I should probably check that again.
i just dont really care about HDR10 anymore.
Thank you so much for the clarification!
RESET_9999
Posts: 2090
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

sw5163 wrote:
Sun Jul 17, 2022 10:55 pm
Does it have to be a DV tv? What will happen for something like Samsung QD-OLED directly connects to PC without vertex? Only plain HDR10?
works on any HDR10/SDR display. The pc just needs what @staknhalo listed.
staknhalo
Posts: 161
Joined: Sun Oct 11, 2020 12:05 am

Re: Dolby Vision now possible through MP4 Mux.

Post by staknhalo »

sw5163 wrote:
Sun Jul 17, 2022 10:55 pm
RESET_9999 wrote:
Sun Jul 17, 2022 10:35 pm
Also, as @manix just showed, you don't need a DV-certified pc/monitor to get DV on windows. Just a DV TV, a vertex and an HDR10 capable pc.
Does it have to be a DV tv? What will happen for something like Samsung QD-OLED directly connects to PC without vertex? Only plain HDR10?
RESET_9999 wrote:
Sun Jul 17, 2022 10:35 pm
he's talking about the fact that the movies&TV app (windows HDR10) is not color accurate (regardless of DV). At least it wasn't the last time i checked(months ago). I should probably check that again.
i just dont really care about HDR10 anymore.
Thank you so much for the clarification!
Information is sent out to display through hdr10 signal no DV display needed, works on p5 and p8 - think I tried the corrected p8.4 HLG quietvoid provided a little while back and it worked too but not at PC ATM can't 100% recall.
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

Well, this is interesting. Thank you guys for explanation.
RESET_9999 wrote:
Sun Jul 17, 2022 12:24 pm
FYI, @ragico tested, LPCM, DTSHD, and TrueHD in a dvh1 MP4 container and the ATV fails the play the audio.
So the best we can get is EAC3 1536kbps.
It seems loseless + atmos is possible on Apple device as they did it in Apple Music.
I guess they use alac+atmos.
Is there a public way to convert trueHD/atmos to "loseless 7.1 PCM atmos" as Dolby MAT 2.0?
I would say the limitation for ATV is MEL + loseless 7.1 atmos.
We just don't know how to get the loseless atmos yet.
RESET_9999
Posts: 2090
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

sw5163 wrote:
Mon Jul 18, 2022 12:08 am

It seems loseless + atmos is possible on Apple device as they did it in Apple Music.
I guess they use alac+atmos.
Is there a public way to convert trueHD/atmos to "loseless 7.1 PCM atmos" as Dolby MAT 2.0?
I would say the limitation for ATV is MEL + loseless 7.1 atmos.
We just don't know how to get the loseless atmos yet.
none that I know. I have the dolby encode engine and I still can't encode lossless atmos to lossyDDP atmos AFAIK.

I'll try your ffmpeg cmd and flac.
ffmpeg -i 00003.m2ts -map 0:2 -c pcm_s32le pcm.mov

i tried:
-map 0:AUDIO_STREAM_ID -c pcm_s24be -ar 48000 -rf64 auto \path\to\audio.mov
and
-map 0:AUDIO_STREAM_ID -c pcm_s24le -ar 48000 -rf64 auto \path\to\audio.mov
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

RESET_9999 wrote:
Mon Jul 18, 2022 12:45 am
I'll try your ffmpeg cmd and flac.
ffmpeg -i 00003.m2ts -map 0:2 -c pcm_s32le pcm.mov

i tried:
-map 0:AUDIO_STREAM_ID -c pcm_s24be -ar 48000 -rf64 auto \path\to\audio.mov
and
-map 0:AUDIO_STREAM_ID -c pcm_s24le -ar 48000 -rf64 auto \path\to\audio.mov
On my iPad, pcm_f/s/u_16/32/64_be/le all worked.
But I don't know what -ar 48000 -rf64 auto means.
You could just test those samples, they totally work on my iPad, so should do the same on ATV.
sw5163 wrote:
Sun Jul 17, 2022 8:33 pm
I have some samples produced through my usually workflow. These could probably be the highest standards video on iOS devices for now. Feel free to test them:
https://drive.google.com/drive/folders/ ... sp=sharing
I'll spend some time to try lossless and atmos audio.
Does anyone know where to find a decrypted Apple lossless atmos music file?
RESET_9999
Posts: 2090
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

nop, " pcm_s32le " did not work.
@ragico will try your sample tomorrow probably.
Last edited by RESET_9999 on Mon Jul 18, 2022 2:54 am, edited 1 time in total.
sofakng
Posts: 74
Joined: Fri Mar 19, 2010 12:51 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by sofakng »

Are there any ELI5 (explain like I'm five) guides for Dolby Vision?

I've tried searching but I can't find anything really straightforward to explain RPU, MEL, FEL, etc.
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

sw5163 wrote:
Mon Jul 18, 2022 1:14 am
I'll spend some time to try lossless and atmos audio.
Does anyone know where to find a decrypted Apple lossless atmos music file?
Never mind, it turns out Apple Music can only play 2 channel lossless or Atmos one at a time.
But, I would still be happy to know where I can download Apple atmos music, thx.
The attachment 屏幕截图 2022-07-18 003804.png is no longer available
I'll keep my opinion limitation for ATV is loseless 7.1 atmos.
If there is a public way to generate this "Dolby MAT PCM Atmos"
屏幕截图 2022-07-18 003804.png
屏幕截图 2022-07-18 003804.png (86.25 KiB) Viewed 9437 times
Last edited by sw5163 on Thu Aug 25, 2022 6:07 am, edited 2 times in total.
sw5163
Posts: 146
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

sofakng wrote:
Mon Jul 18, 2022 2:22 am
Are there any ELI5 (explain like I'm five) guides for Dolby Vision?

I've tried searching but I can't find anything really straightforward to explain RPU, MEL, FEL, etc.
I'm very amateur, this is for reference only, it may contain mistakes.

Once upon a time, cats only use 0-255 to represent brightness of themselves. Black cat is 0 and white cat is 255. This is called SDR.

And then there is a 5-year-old cat Tom, who is a grey cat with a little blue. His color is somewhere around 255/2 in the middle. Tom likes to take selfie with his friends on his 300 nit iPhone. Since the display brightness back then were close to each other, with no more than 400 nit, it seems fine for Tom to tell himself from other cat.

But one day, Tom bought a 1000 nit Samsung tv home and started to enjoy his good old selfies. He immediately noticed he is whiter(500 nit) in the TV than himself in the mirror(250 nit). He also noticed his good old selfies are slightly darker(150 nit) in his iPhone. He became a white cat in his Samsung tv and a dark blue cat on his iPhone. What's worse, he found himself a 5000-nit glowing cat on a 10000-nit experimental monitor.

"This can't be good." he thought. So he gathered all other cats to make a new standard. They use 0 to represent 0 nit completely dark black hole cat, somewhere between 700-750 to represent 1000-nit snow-white cat, and 1023 to represent 10000-nit dazzling Apollo cat who lives on the sun. And now Tom can finally be the same grey blue cat. This is called PQ curve HDR bl(base layer).
PQ_curve_code_value_vs._luminance.jpg
As time went by, Tom gradually grows fond of those >1000 nit snow-white cats. However they all appear to be idendical white on his 1000 nit tv. He doesn't want to mess up with the Apollo cat. Thankfully, Dolby provides RPU(reference processing unit) to indicate how cats above 1000 nit should exactly display on Tom's tv and phone. (tone mapping). It also provides EL(enhancement layer) to generate even more accurate 12-bit color depth. And now Tom can know exactly which cat is which. Yet there are so many profiles and unknown specifics, Tom has to post and ask about Dolby Vision here.

In human words:
BL(base layer): an HDR10 2160p YCbCr 4:2:0 10-bit video.
Dolby Vision fall back to this when not supported.

EL(enhancement layer): an HDR10 1080p YCbCr 4:2:0 10-bit video.
Supported device use BL and EL to mux a final 4:2:2 12-bit video.

RPU(reference processing unit): To indicate how filmmaker would like the video to be separately shown on 100nitSDR/600nit/1000nit/10000nit display. (despite the actual brightness record in BL)

There are basically 4 types of Dolby Vision video:
Profile 5(streaming): ICtCp 4:2:0(?) 10-bit video + RPU.
It uses a more efficient color coding, but appear green and purple on non support device.

Profile 8.1: BL+RPU
Profile 8.4: Dolby Vision shot on iPhone, HLG BL+RPU

FEL(Full Enhancement Layer)
Profile 7 DT_DL FEL: BL in one video track, EL+RPU in another video track.
Profile 7 ST_DL FEL: BL+EL+RPU in one same video track.

MEL(Minimum Enhancement Layer)
Profile 7 MEL: BL+RPU same as 8.1 just in bluray container.

Please don't hesitate to point out my mistake!
ragico
Posts: 258
Joined: Fri Feb 15, 2019 1:09 am

Re: Dolby Vision now possible through MP4 Mux.

Post by ragico »

sw5163 wrote:
Sun Jul 17, 2022 8:33 pm
I have some samples produced through my usually workflow. These could probably be the highest standards video on iOS devices for now. Feel free to test them:
https://drive.google.com/drive/folders/ ... 1qTe?usp=s
Tested your files in Atv via the native player:
Alac and Flac play in pcm 5.1
Pcm plays in pcm 7.1 and to me has the best sound quality.
My sound system is Sonos Arc + 2 surround + sub
There is no indication of atmos but the sound generated is immersive and engaging.
RESET_9999
Posts: 2090
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

sw5163 wrote:
Mon Jul 18, 2022 5:00 am
ah, I know why my lpcm track didn't work on the ATV (video and lossy audio were ok).

My mp4 headers depending on my command line were:

Code: Select all

Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom)
or

Code: Select all

Format                                   : mp43
Codec ID                                 : mp43 (isom/mp43/dby1)
and only this work

Code: Select all

Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : iso4 (iso4/iso6)
I didnt know mp4box could mux a raw hevc track with the wrong profile by default (strange that it does that). I thought the mp4muxer was needed for that so I was muxing a DV mp4 with mp4box and not an HEVC file.
The only problem I see with this method is that the static MDL metadata seems messed up now.
Mastering display luminance : min: 19.6608 cd/m2, max: 4000 cd/m2
MasteringDisplay_Luminance_Original : min: 0.0050 cd/m2, max: 4000 cd/m2

Code: Select all

Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : iso4 (iso4/iso6)
File size                                : 971 MiB
Duration                                 : 2 min 0 s
Overall bit rate                         : 67.6 Mb/s
Encoded date                             : UTC 2022-07-18 13:09:41
Tagged date                              : UTC 2022-07-18 13:09:41
Writing application                      : GPAC-2.0-rev0-g418db414-master

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.05.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible / SMPTE ST 2086
Codec ID                                 : dvh1
Duration                                 : 2 min 0 s
Bit rate                                 : 55.4 Mb/s
Maximum bit rate                         : 104 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
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.278
Stream size                              : 795 MiB (82%)
Title                                    : hevc@GPAC2.0-rev0-g418db414-master
Encoded date                             : UTC 2022-07-18 13:09:41
Tagged date                              : UTC 2022-07-18 13:09:42
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: 19.6608 cd/m2, max: 4000 cd/m2
MasteringDisplay_Luminance_Original      : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 1203 cd/m2
Maximum Frame-Average Light Level        : 281 cd/m2
mdhd_Duration                            : 120412
Codec configuration box                  : hvcC+dvcC
quietvoid
Posts: 373
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

RESET_9999 wrote:
Mon Jul 18, 2022 1:28 pm
The only problem I see with this method is that the static MDL metadata seems messed up now.
Mastering display luminance : min: 19.6608 cd/m2, max: 4000 cd/m2
MasteringDisplay_Luminance_Original : min: 0.0050 cd/m2, max: 4000 cd/m2
Use hdr=none when muxing.
Example:
MP4Box -add video.hevc:dv-profile=f8.hdr10:hdr=none
RESET_9999
Posts: 2090
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

thanks that worked!

I see that we can keep DVH1 with profile 8 file using mp4box... maybe we dont have to use profile 5 on the ATV ???

Code: Select all

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.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : dvh1
Duration                                 : 4 min 59 s
Bit rate                                 : 68.4 Mb/s
Maximum bit rate                         : 121 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
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.344
Stream size                              : 2.39 GiB (85%)
Title                                    : hevc:dv-profile=f8.hdr10:hdr=none@GPAC2.0-rev0-g418db414-master
Encoded date                             : UTC 2022-07-18 14:41:27
Tagged date                              : UTC 2022-07-18 14:41:31
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: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 986 cd/m2
mdhd_Duration                            : 300008
Codec configuration box                  : hvcC+dvvC
Post Reply