Official Dolby Vision MKV spec support

Please post here for issues related to UHD discs
Post Reply
VANLUC
Posts: 1
Joined: Sun Jul 26, 2020 2:44 pm

Re: Official Dolby Vision MKV spec support

Post by VANLUC »

mike admin wrote:
Tue Jul 28, 2020 10:57 pm
A little bit of topic. For testing purposes I was asked to create MKV files out of official Dolby test files - profile 5 and 8. Figured should be no harm to share with everyone for testing. Files do not contain audio track, they are video-only.

http://www.makemkv.com/download/dvtest/
All clips played on Zidoo Z9X (SETUP: 1080P/60 with FRAMERATE & RESOLUTION auto and HDR MODE Auto). On "Loewe Bild 7.65" DV compatible through DENON AVC-X8500H.

P4: played 4K/24 SDR ITU 709
P5: played 4K/60 DV / Atmos PERFECT PLAYING WIHOUT ANY SHUTTERING OR ANYTHING ELSE WITH ATMOS SOUND PERFECT
P7 FEL: played 4K/24 HDR10 VERY BAD PLAYING WITH SHUTTERING ALL DURING THE CLIP
P7 MEL: played 4K/24 DV PERFECT PLAYING WIHOUT ANY SHUTTERING OR ANYTHING ELSE
P81: 4K/60 DV PERFECT PLAYING WIHOUT ANY SHUTTERING OR ANYTHING ELSE

:wink:
DaMacFunkin
Posts: 311
Joined: Tue Oct 30, 2018 4:17 pm

Re: Official Dolby Vision MKV spec support

Post by DaMacFunkin »

My findings with Z9X are:

MEL converted to single layer mp4 play fine and look fine, Z9X does not recognise DTS-HD tracks muxed in like Shield does.

FEL converted to single layer mp4 don’t play (green screen).

MEL converted to MKV with 1.5.2 play but have a slight colour push compared to mp4.

FEL converted to MKV with 1.5.2 play as HDR10 and look properly saturated.
shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Official Dolby Vision MKV spec support

Post by shawnc22 »

DaMacFunkin wrote:
Mon Aug 24, 2020 12:30 pm
My findings with Z9X are:

MEL converted to single layer mp4 play fine and look fine, Z9X does not recognise DTS-HD tracks muxed in like Shield does.

FEL converted to single layer mp4 don’t play (green screen).

MEL converted to MKV with 1.5.2 play but have a slight colour push compared to mp4.

FEL converted to MKV with 1.5.2 play as HDR10 and look properly saturated.
Single layer mp4 is made with dvdfab/yusecope’s tool in mode -2 (BL+EPU) or is it just yusecope’s tool in mode 1 straight into mp4muxer (BL+EL+RPU)?
DaMacFunkin
Posts: 311
Joined: Tue Oct 30, 2018 4:17 pm

Re: Official Dolby Vision MKV spec support

Post by DaMacFunkin »

Erm, whatever the default is in DVDFab or Yousopes, I haven’t changed the mode.
Cannikin
Posts: 178
Joined: Tue Aug 18, 2020 11:54 pm

Re: Official Dolby Vision MKV spec support

Post by Cannikin »

The pull request to add Dolby Vision support to ExoPlayer is stalled: https://github.com/google/ExoPlayer/pul ... -679973445

Anyone have examples of public domain or open source Dolby Vision content? The author included actual video snippets in the code that prove Dolby Vision is recognized, and the snippets are from publicly available clips on Dolby's website, but Dolby's terms of use say you can't modify any of their content in any way.
flashback8
Posts: 48
Joined: Fri Dec 15, 2017 7:20 pm

Re: Official Dolby Vision MKV spec support

Post by flashback8 »

I know a couple of people at authoring houses. I'll see if some clips I can shoot (SDR and HDR) can get converted to DV using official equipment. Of course, I'd consider all this to be copyright-free (copyleft, IIRC?). :)
Cannikin
Posts: 178
Joined: Tue Aug 18, 2020 11:54 pm

Re: Official Dolby Vision MKV spec support

Post by Cannikin »

flashback8 wrote:
Tue Aug 25, 2020 9:18 pm
I know a couple of people at authoring houses. I'll see if some clips I can shoot (SDR and HDR) can get converted to DV using official equipment. Of course, I'd consider all this to be copyright-free (copyleft, IIRC?). :)
That would be awesome! There might have a solution (someone from LG said we can use their demos) but I don't know if the maintainer will go for that (this was a response from a random LG support person).

Can you leave a response in that thread to let them know you may have an alternate route if needed?
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Official Dolby Vision MKV spec support

Post by yusesope »

Cannikin wrote:
Tue Aug 25, 2020 3:51 pm
The pull request to add Dolby Vision support to ExoPlayer is stalled: https://github.com/google/ExoPlayer/pul ... -679973445

Anyone have examples of public domain or open source Dolby Vision content? The author included actual video snippets in the code that prove Dolby Vision is recognized, and the snippets are from publicly available clips on Dolby's website, but Dolby's terms of use say you can't modify any of their content in any way.
Here on the forum we have gained a deep understanding of the structure of these Dolby Vision files.
We have become like monkeys that imitate perfectly :mrgreen: :mrgreen: :mrgreen:
I don't think you need an expensive tool and no license to create a working DV file.

I'm going to take a stab!
I leave the whole process here in case anyone wants to review it.

The basic idea is to create a solid black DV profile 7 FEL UHD-BD compliant file (10 seconds duration). To do this I use ffmpeg and x265.

Both the Base Layer (10 seconds of solid black) and the Enhancement Layer (10 seconds of solid gray) will have the following characteristics (refer to the document "Dolby Vision Profiles & Levels").

Code: Select all

Bit depth: 10-bit 
Chroma subsampling: 420
Colour primaries: ITU-R BT.2020
Transfer characteristics: smpte-2084 
Matrix coefficients: ITU-R BT.2020 non-constant luminance system
In particular VUI = 0,9,16,9,2 (range,color primaries, EOTF, matrix, and chroma sample location type)
For the Base Layer

Code: Select all

ffmpeg.exe -y -t 10 -r 24000/1001 -f lavfi -i color=c=black:s=3840x2160 -strict -1 -pix_fmt yuv420p10le -vf scale=out_color_matrix=bt2020 BL.y4m

x265-10b.exe --input-depth 10 --uhd-bd --preset slow --crf 18 --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --master-display "G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)" --max-cll "0,0" --chromaloc 2 --output BL.hevc BL.y4m
For the Enhancement Layer

Code: Select all

ffmpeg.exe -y -t 10 -r 24000/1001 -f lavfi -i color=c=gray:s=1920x1080 -strict -1 -pix_fmt yuv420p10le -vf scale=out_color_matrix=bt2020 EL_without_RPU.y4m

x265-10b.exe --input-depth 10 --uhd-bd --preset slow --crf 18 --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --master-display "G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)" --max-cll "0,0" --chromaloc 2 --output EL_without_RPU.hevc EL_without_RPU.y4m

The enhancement layer is clearly devoid of RPU metadata. Then, with the help of a hex editor, I add the following NAL RPU unit in such a way that it precedes all the AUD NAL units (except for the first one).

Code: Select all

000000017c011908090840613650af003ff801ffc00ffc001fffa000001000000d0000030080000068000004000003020090000080080080000080240000200200200000200900000800800800000e4acc00006bd44acdf3f9d6384acc8994000003020000030010000003001000000300386c4486030c14bc611c0a28000003034c7cb5fffe0000030000030000030000c040fb9c02a3003008005d219980c028218047fc80080080010001805647001001001001000fff040400e03d120c4e2000644e200d184b23342380 
The EL_RPU layer thus obtained has RPU metadata that are all the same (they should be different from each other). But it is still a test file whose video is completely black. There isn't much to "enhance".
I generated the RPU unit taking into account that it would be used in a FEL file (Refer to the document "Dolby Vision Profiles & Levels"). Therefore:

Code: Select all

nlq_offset != 0;
vdr_in_max_int != 1;
vdr_in_max != 0;
linear_deadzone_slope_int = 0;
linear_deadzone_slope != 0;
linear_deadzone_threshold_int = 0;
linear_deadzone_threshold = 0;

Using mp4muxer it is possible to generate a DV profile 7 FEL mp4 file (Dual track Dual Layer).

Using my tool it is possible to generate a single raw HEVC file (BL_EL_RPU.hevc). With the help of mp4muxer it is then possible to create a Single track Dual Layer mp4 file (profile 7 FEL).

Through TsMuxer it is possible to create an ISO file to be read by MakeMKV to generate an mkv test file (profile 7 FEL)

I have no way to test what is written (I have no device capable of playing DV):
I leave HERE the files generated by the whole process in case someone wants to try them.
The result should be a black screen (10 seconds) with the "Dolby Vision" logo appearing on the screen.

If the files are found to work, I give you permission to use them as you see fit!
Last edited by yusesope on Wed Aug 26, 2020 1:18 pm, edited 1 time in total.
Meister_Proper
Posts: 79
Joined: Mon Mar 07, 2016 8:27 pm

Re: Official Dolby Vision MKV spec support

Post by Meister_Proper »

Excellent work yusesope!
May I ask you to do the same for MEL?
Cannikin
Posts: 178
Joined: Tue Aug 18, 2020 11:54 pm

Re: Official Dolby Vision MKV spec support

Post by Cannikin »

Thank you yuseope!!
Cannikin
Posts: 178
Joined: Tue Aug 18, 2020 11:54 pm

Re: Official Dolby Vision MKV spec support

Post by Cannikin »

Pull request merged!! https://github.com/google/ExoPlayer/pul ... -680168520 They just left out the test files for now, but would love to get some at some point.

Now how do we get Plex to merge this??
SamuriHL
Posts: 2346
Joined: Mon Jun 14, 2010 5:32 pm

Re: Official Dolby Vision MKV spec support

Post by SamuriHL »

That part's not quite that simple. Plex doesn't strictly use exoplayer. They use parts of it. However, they'll likely see that code and poke at it. It'll be nice to get plex support.
jayper
Posts: 318
Joined: Sat Sep 29, 2012 5:57 pm

Re: Official Dolby Vision MKV spec support

Post by jayper »

Not that we need it, as the custom version of ExoPlayer has been meeting most of our needs, but does this mean we could use the official version of ExoPlayer as an external player with Kodi? Once there's a build of it, of course.
Cannikin
Posts: 178
Joined: Tue Aug 18, 2020 11:54 pm

Re: Official Dolby Vision MKV spec support

Post by Cannikin »

I created an issue over there to hopefully encourage them to take a look :) https://github.com/plexinc/plex-media-player/issues/982
Cannikin
Posts: 178
Joined: Tue Aug 18, 2020 11:54 pm

Re: Official Dolby Vision MKV spec support

Post by Cannikin »

jayper wrote:
Wed Aug 26, 2020 4:34 pm
Not that we need it, as the custom version of ExoPlayer has been meeting most of our needs, but does this mean we could use the official version of ExoPlayer as an external player with Kodi? Once there's a build of it, of course.
This is Plex running as a Kodi plugin, correct? I tried that last week and the performance seemed horrible...video stuttering and dropping frames...maybe I needed to restart my Shield or something.

The native Plex app on the Shield has been rock solid for me, just missing that DV tag! At least it's falling back to HDR10, which is almost acceptable. ;)
Post Reply