Official Dolby Vision MKV spec support

Please post here for issues related to UHD discs
EvilWays1
Posts: 8
Joined: Mon Nov 23, 2020 12:45 am

Re: Official Dolby Vision MKV spec support

Post by EvilWays1 »

MartyMcNuts wrote:
Tue Dec 08, 2020 11:30 pm
snip
Following your steps, I got Atomic Blonde shrunk down from just under 60 GB to 26.3 GB on final product. MediaInfo recognizes that it is a Dolby Vision/HDR10 video. Now is the part that I think is my LG C9 TV being odd. When playing the video, it triggers HDR mode and not Dolby Vision mode (per the text that pops up when playing the video). Running the LG Dolby Vision 4K Demo video does trigger Dolby Vision Mode on my TV. On MediaInfo, it shows the demo video only having Dolby Vision under HDR Mode (nothing about HDR10 compatible being shown). I'm wondering if my TV is seeing the HDR info and choosing it instead of Dolby Vision (or is maybe activating both but only indicating HDR and giving me the HDR display modes instead of the DV display modes).

Outside of that "issue", this fits my current needs/wants on DV UHD movies.
shawnc22
Posts: 636
Joined: Tue Jan 21, 2020 7:40 am

Re: Official Dolby Vision MKV spec support

Post by shawnc22 »

EvilWays1 wrote:
Thu Dec 10, 2020 12:24 am
MartyMcNuts wrote:
Tue Dec 08, 2020 11:30 pm
snip
Following your steps, I got Atomic Blonde shrunk down from just under 60 GB to 26.3 GB on final product. MediaInfo recognizes that it is a Dolby Vision/HDR10 video. Now is the part that I think is my LG C9 TV being odd. When playing the video, it triggers HDR mode and not Dolby Vision mode (per the text that pops up when playing the video). Running the LG Dolby Vision 4K Demo video does trigger Dolby Vision Mode on my TV. On MediaInfo, it shows the demo video only having Dolby Vision under HDR Mode (nothing about HDR10 compatible being shown). I'm wondering if my TV is seeing the HDR info and choosing it instead of Dolby Vision (or is maybe activating both but only indicating HDR and giving me the HDR display modes instead of the DV display modes).

Outside of that "issue", this fits my current needs/wants on DV UHD movies.
If you're playing it off your TV's internal player, it's not going to work because there's no support for DV in mkv containers. From Marty's steps, after you get the encoded BL hevc file, you can try muxing it into an mp4 container and see if that works. The steps can be found the mp4 thread.
EvilWays1
Posts: 8
Joined: Mon Nov 23, 2020 12:45 am

Re: Official Dolby Vision MKV spec support

Post by EvilWays1 »

shawnc22 wrote:
Thu Dec 10, 2020 12:34 am
If you're playing it off your TV's internal player, it's not going to work because there's no support for DV in mkv containers. From Marty's steps, after you get the encoded BL hevc file, you can try muxing it into an mp4 container and see if that works. The steps can be found the mp4 thread.
Am I able to keep the original audio tracks (for what I'm testing with, it has DTS:X and DTS) using the MP4 method, or would I still be stuck having to convert them to AC3?

EDIT #1: What options for external players would possibly play DV MKVs? nVidia Shield?

EDIT #2: Just a thought, but the LG DV Demo video uses a .ts extension. It plays fine without PleX transcoding. I'm going to experiment with going as far as the tsMuxeR step from Marty's direction, but change the part where he saves it as a .m2ts and change it to a .ts and stop there, and see if that works (I'm not exactly getting my hopes up yet, but worth a shot).
shawnc22
Posts: 636
Joined: Tue Jan 21, 2020 7:40 am

Re: Official Dolby Vision MKV spec support

Post by shawnc22 »

EvilWays1 wrote:
Thu Dec 10, 2020 1:16 am
shawnc22 wrote:
Thu Dec 10, 2020 12:34 am
If you're playing it off your TV's internal player, it's not going to work because there's no support for DV in mkv containers. From Marty's steps, after you get the encoded BL hevc file, you can try muxing it into an mp4 container and see if that works. The steps can be found the mp4 thread.
Am I able to keep the original audio tracks (for what I'm testing with, it has DTS:X and DTS) using the MP4 method, or would I still be stuck having to convert them to AC3?

EDIT #1: What options for external players would possibly play DV MKVs? nVidia Shield?

EDIT #2: Just a thought, but the LG DV Demo video uses a .ts extension. It plays fine without PleX transcoding. I'm going to experiment with going as far as the tsMuxeR step from Marty's direction, but change the part where he saves it as a .m2ts and change it to a .ts and stop there, and see if that works (I'm not exactly getting my hopes up yet, but worth a shot).
No, you would need to convert the lossless audio tracks down to AC3, but if you're playing them off the TV speakers, it doesn't really matter. Yes, the Shield pro is your best bet at playing DV mkvs atm, but there are some existing color issues during playback.

You can mux them back into a TS container and try it to play it off the TV, but you're going to have to combine the layers into a single track using yusecope's tool first. Whether or not the resulting file plays without stutter is a bit of a ymmv situation with each movie. The most reliable way to play DV off your LG internal player is still the mp4 method.
jwolf
Posts: 1
Joined: Tue Dec 15, 2020 4:57 am

Re: Official Dolby Vision MKV spec support

Post by jwolf »

MartyMcNuts wrote:
Tue Dec 08, 2020 11:30 pm
EvilWays1 wrote:
Tue Dec 08, 2020 8:47 am
MartyMcNuts wrote:
Mon Dec 07, 2020 11:43 pm
I doubt Handbrake can be used for UHD as I don't think it can do HDR. In any case, the layers must be separated as only the BL can be re-encoded.

What I do is:

1. Rip to folder using MakeMKV.
2. Use NVENCC64 command line to re-encode BL, keeping HDR (and HDR10+ metadata if included).
3. Use TSmuxer to create a new copy of the original m2ts file swapping out the original BL for my encoded BL.
4. Open the UHD folder in MakeMKV to create a MKV file with HDR/DV (and HDR10+ if included)


Now, I'm also unsure how well (or if at all) these files play as I currently don't have a TV with Dolby Vision. Hopefully soon!!
I've got a Dolby Vision capable TV (LG C9 series), so hopefully it doesn't puke on my tests. I'll just have to figure out how to use NVEncC64 and TSmuxer (I've messed around a bit with MKVGuiNix, but not sure if it will work for this).
MKVtoolnix won't work for this. TSmuxer is very easy. Use the (04.06 fix) version. To use nvencc64 (I'm using v5.22) you need a compatible NVIDIA graphics card. Mine is a RTX 2070.

Here is the nvencc64 command I used to encode the BL @25000 and include the HDR/HDR10+ info.:

NVEncC64 --avhw -i G:\BACK_TO_THE_FUTURE_PART_II\BDMV\STREAM\00294.m2ts --output-res 3840x2160 --fps 23.976 --codec h265 --preset quality --level 5.1 --profile main10 --tier high --output-depth 10 --lookahead 32 --vbrhq 25000 --output-buf 64 --aud --colorprim bt2020 --colormatrix bt2020nc --dhdr10-info copy --transfer auto --chromaloc 2 --master-display copy --max-cll copy -o "G:\BACK_TO_THE_FUTURE_PART_II\BL_shrunk.hevc"


Once I have my BL-shrunk.hevc file:

1. I open up TSmuxer and drag/drop this file.

2. Then I drag/drop the original m2ts file (00294.m2ts renamed to 00294-old.m2ts) from the ripped UHD folder and deselect the first segment from this original m2ts file.

3. Change the output to "M2TS muxing", using the original file name as the output name,so this new file is 00294.m2ts and save to the STREAM folder.

Here is a pic to show you.


TSmuxer-pic.jpg


Once TSmuxer has completed, open the UHD folder in MakeMKV to create your new (already re-encoded) MKV file with HDR/HDR10+/DV.

Here is a MakeMKV pic. As you can see, the file is no longer 80+GB. It is my re-encoded file.


MakeMKV-pic.jpg


Now create the MKV file and you are done!

Here is a pic from MediaInfo showing the video of my newly created MKV:


MediaInfo-pic.jpg
quick question for a noob at this. your example shows an m2ts file, but when I use makemkv, i get an mkv file does that matter?
MartyMcNuts
Posts: 2434
Joined: Wed Nov 22, 2017 11:45 pm

Re: Official Dolby Vision MKV spec support

Post by MartyMcNuts »

jwolf wrote:
Tue Dec 15, 2020 5:39 am
MartyMcNuts wrote:
Tue Dec 08, 2020 11:30 pm
EvilWays1 wrote:
Tue Dec 08, 2020 8:47 am


I've got a Dolby Vision capable TV (LG C9 series), so hopefully it doesn't puke on my tests. I'll just have to figure out how to use NVEncC64 and TSmuxer (I've messed around a bit with MKVGuiNix, but not sure if it will work for this).
MKVtoolnix won't work for this. TSmuxer is very easy. Use the (04.06 fix) version. To use nvencc64 (I'm using v5.22) you need a compatible NVIDIA graphics card. Mine is a RTX 2070.

Here is the nvencc64 command I used to encode the BL @25000 and include the HDR/HDR10+ info.:

NVEncC64 --avhw -i G:\BACK_TO_THE_FUTURE_PART_II\BDMV\STREAM\00294.m2ts --output-res 3840x2160 --fps 23.976 --codec h265 --preset quality --level 5.1 --profile main10 --tier high --output-depth 10 --lookahead 32 --vbrhq 25000 --output-buf 64 --aud --colorprim bt2020 --colormatrix bt2020nc --dhdr10-info copy --transfer auto --chromaloc 2 --master-display copy --max-cll copy -o "G:\BACK_TO_THE_FUTURE_PART_II\BL_shrunk.hevc"


Once I have my BL-shrunk.hevc file:

1. I open up TSmuxer and drag/drop this file.

2. Then I drag/drop the original m2ts file (00294.m2ts renamed to 00294-old.m2ts) from the ripped UHD folder and deselect the first segment from this original m2ts file.

3. Change the output to "M2TS muxing", using the original file name as the output name,so this new file is 00294.m2ts and save to the STREAM folder.

Here is a pic to show you.


TSmuxer-pic.jpg


Once TSmuxer has completed, open the UHD folder in MakeMKV to create your new (already re-encoded) MKV file with HDR/HDR10+/DV.

Here is a MakeMKV pic. As you can see, the file is no longer 80+GB. It is my re-encoded file.


MakeMKV-pic.jpg


Now create the MKV file and you are done!

Here is a pic from MediaInfo showing the video of my newly created MKV:


MediaInfo-pic.jpg
quick question for a noob at this. your example shows an m2ts file, but when I use makemkv, i get an mkv file does that matter?
Uummm.... Did you read that fully? The end result is a MKV file created via MakeMKV.
Cheers :D
----------------------------------------------------------------------------------------------------------------------------
For UHD enabled drives (AU/NZ/SG) & DIY Single Drive Flasher (WW): https://www.uhdenableddrives.com
Cannikin
Posts: 173
Joined: Tue Aug 18, 2020 11:54 pm

Re: Official Dolby Vision MKV spec support

Post by Cannikin »

Posted this on the wrong thread! Moved to viewtopic.php?f=12&t=23363&p=102065#p102065
Last edited by Cannikin on Sun Dec 20, 2020 1:24 am, edited 1 time in total.
DylanValenti
Posts: 9
Joined: Sat Dec 19, 2020 9:42 pm

Re: Official Dolby Vision MKV spec support

Post by DylanValenti »

So if I have a DV .mkv file from makemkv, what exactly would I need to do to effectively remux it into and .m2ts file without losing any quality or hdr layers.
lexyz
Posts: 119
Joined: Fri May 08, 2020 5:32 am

Re: Official Dolby Vision MKV spec support

Post by lexyz »

Good news, everyone! :D
Another player supports DV mkv's
Behold Kodi test builds both for 18 and 19 versions
Andoroid only for now
https://forum.kodi.tv/showthread.php?ti ... pid2997625
Bravia XF90, Shield TV Pro'19, UBP-X700
CyB0rg
Posts: 1
Joined: Sun Dec 27, 2020 9:38 am

Re: Official Dolby Vision MKV spec support

Post by CyB0rg »

MartyMcNuts wrote:
Tue Dec 08, 2020 11:30 pm
Here is the nvencc64 command I used...
Any chance for a correct ffmpeg syntax for us not blessed with the Nvidia card ?
Of course I am aware that I would need to extract the Mastering display metadata and Content light level metadata and use it in -x265-params

Thanks !
MartyMcNuts
Posts: 2434
Joined: Wed Nov 22, 2017 11:45 pm

Re: Official Dolby Vision MKV spec support

Post by MartyMcNuts »

CyB0rg wrote:
Sun Dec 27, 2020 9:43 am
MartyMcNuts wrote:
Tue Dec 08, 2020 11:30 pm
Here is the nvencc64 command I used...
Any chance for a correct ffmpeg syntax for us not blessed with the Nvidia card ?
Of course I am aware that I would need to extract the Mastering display metadata and Content light level metadata and use it in -x265-params

Thanks !
Nope, FFMPEG doesn't work for this as it won't retain the HDR/HDR10+ info. Also, it will take many, many hours to encode HEVC if not using hardware encoding.

Here is a command to shrink your video but not sure if it will do you any good without the HDR information.

ffmpeg -hide_banner -i "G:\BACK_TO_THE_FUTURE_PART_II\BDMV\STREAM\00294.m2ts" -c:v libx265 -b:v 25000k -minrate 25000k -maxrate 25000k -bufsize 2000k -preset slow -level:v 5.1 -profile:v main10 -tier:v high -map 0:0 "G:\BACK_TO_THE_FUTURE_PART_II\BL_shrunk.hevc"
Cheers :D
----------------------------------------------------------------------------------------------------------------------------
For UHD enabled drives (AU/NZ/SG) & DIY Single Drive Flasher (WW): https://www.uhdenableddrives.com
cuculain
Posts: 12
Joined: Fri Oct 09, 2020 6:28 am

Re: Official Dolby Vision MKV spec support

Post by cuculain »

Zidoos latest .85 patch for the Z9X etc is finally working smoothly with DVhe 07 files created with makemkv .54/53

there had been an issue with stutters and lag after 3 mins or so , but thats now sorted

just gotta sort out a Fel to mel one click now :P
userr
Posts: 61
Joined: Sat Apr 04, 2020 7:10 pm

Re: Official Dolby Vision MKV spec support

Post by userr »

cuculain wrote:
Mon Dec 28, 2020 9:28 pm
Zidoos latest .85 patch for the Z9X etc is finally working smoothly with DVhe 07 files created with makemkv .54/53

there had been an issue with stutters and lag after 3 mins or so , but thats now sorted

just gotta sort out a Fel to mel one click now :P
zidoo doesnt play fel?
EvilWays1
Posts: 8
Joined: Mon Nov 23, 2020 12:45 am

Re: Official Dolby Vision MKV spec support

Post by EvilWays1 »

So following Marty McNuts' method, along with playing through an nVidia Shield TV Pro (2019 model) with the latest version of Plex, I am able to trigger Dolby Vision mode on my LG C9. I still need to sit through a full movie to see if there are any color issues as noted before.

One thing to note is that on the second pass of the movie with MakeMKV (the last step), the video is converted from two video stream DV to one video stream DV.
DylanValenti
Posts: 9
Joined: Sat Dec 19, 2020 9:42 pm

Re: Official Dolby Vision MKV spec support

Post by DylanValenti »

I have a profile 5 dolby vision .mp4 file, how do I mux it into an .mkv file? I would just really like to be able to label all of my audio and subtitle tracks. Any help would be much appreciated as I couldn't find any methods that worked after many days of searching now.
Post Reply