Authoring Dolby Vision compatible/compliant mp4 files for HTPC/Media Server

Having trouble playing all your different media types? Ask here!
Post Reply
Ed 

Posts: 806
Joined: Sat May 24, 2014 3:14 pm
Location:

HTPC Specs: Show details

Authoring Dolby Vision compatible/compliant mp4 files for HTPC/Media Server

#1

Post by Ed  » Sun Aug 15, 2021 6:54 pm

I posted this elsewhere, figured maybe some people here might be able to use this though. Needless to say, this has nothing to do with WMC and I haven't even used WMC in years now. Posting this for anyone on Win10 and up trying to use Dolby Vision with Plex on a SHIELD TV or something.



I freak hate Dolby Vision. It fragmented this video generation so much and even fragmented itself within the fragments. And it's a proprietary color space. But it can't be out there and I not have it.



Anyway, here's the tools I use to author Dolby Vision files for archiving (mainly my own Dolby Vision UHD rips from purchased discs that then serve as the 1:1 hard backup) on Windows.



You need to have some knowledge of command line, and muxing video/audio streams. Also gonna have to use a hex editor at one point.



These are all freely available, gathered from the makemkv forums, and github, links provided. I'll post the readme's I made for myself for each tool (3 total) to give you an idea of what they do, how to use them, what is possible. This is also helpful if you want to just mux in separate (better) audio streams, or encode the base HDR10 layer to save some space over a 1:1 copy.



-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
yusesope's Tool v0.0.4 Beta: https://mega.nz/file/mdU00TZR#bCiuGx6-7 ... rjLOOKESeE

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Tool to demux single layer DV7 streams (from mkv) back into dual layer streams(from UHD); as well as mux dual layer streams into a single layer stream. Can also turn DV7 dual stream to DV8.1 single stream



1: Open 'DEMUX.bat' and follow prompts to demux single layer DV7 stream from mkv back into base HDR10 layer and DV extension layer



2: Open 'MUX_AND_CONVERT_TO_PROFILE_81.bat' and follow prompts to convert base HDR10 layer and DV extension layer into single layer DV8 stream



-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

quietvoid's Dovi_Tool 0.4.0 (from github: https://github.com/quietvoid/dovi_tool/releases/ )

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Alternate way to make DV 8.1 files if Yuescope's Tool fails to complete (happens on ones you have to encode base HDR10 layer first so are then not perfect untouched copies)



Command 1: 'dovi_tool -m 2 extract-rpu Video2.hevc' (Converts Dolby Vision 7 second stream into Dolby Vision 8 and extracts RPU metadata)



Command 2: 'dovi_tool.exe inject-rpu --input Video1.hevc --rpu-in RPU.bin' (Injects RPU metadata into Dolby Vision 7 base HDR10 stream turning it into single layer Dolby Vision 8 stream)



-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Dolby Laboratories' Dolby Vision MP4 streaming muxer (from github: https://github.com/DolbyLaboratories/dlb_mp4base )

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Mux DV5 or DV8 single streams or base HDR10 stream and DV7 second stream along with audio stream into Dolby Vision compatible mp4 file



Dolby Vision Profile 5 Command: - 'mp4muxer --dv-profile 5 --input-file Video.hevc --input-file Audio.aac --media-lang eng --output-file FILENAME.mp4'



Dolby Vision Profile 7 Command - 'mp4muxer --dv-profile 7 --input-file Video1.hevc --input-file Video2.hevc --input-file Audio.aac --media-lang eng --output-file FILENAME.mp4'



Dolby Vision Profile 8 Command - 'mp4muxer --dv-profile 8 --dv-bl-compatible-id 1 --input-file Video.hevc --input-file Audio.aac --media-lang eng --output-file FILENAME.mp4'



*Important: Dolby Muxer has a bug where it does not apply 'dvhe' Codec ID to resulting mp4 files. This only applies to DV7 and DV8 made files. DV5 files output correctly.



After Dolby Vision mp4 mux is complete, open resulting mp4 file in hex editor. Search for 'hev1'



In a DV7 file, there will be 2 'hev1' entries, one for each video stream in the mp4. Change the second 'hev1' entry in the DV7 file (the actual Dolby Vision stream) to 'dvhe'



In a DV8 file, there will only be 1 'hev1' entry. Change that to 'dvhe'



After saving, final mp4 should now be fully Dolby Vision compatible.



🙃🔫
Last edited by Ed  on Sun Aug 15, 2021 6:55 pm, edited 1 time in total.

Ed 

Posts: 806
Joined: Sat May 24, 2014 3:14 pm
Location:

HTPC Specs: Show details

#2

Post by Ed  » Sun Aug 15, 2021 6:54 pm

yusesope's Tool v0.0.4 Beta discussion from makeMKV forums: https://forum.makemkv.com/forum/viewtop ... 413#p85413

Also, if you're unaware of different Dolby Vision profile levels, here: https://www.diversifiedvideosolutions.c ... tories.pdf

Post Reply