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
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!