Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
siriusbox
Posts: 31
Joined: Thu Mar 12, 2020 3:07 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by siriusbox »

I only have tested it on my Shield 2019 TV Pro, I've a LG C7 but not sure if its Plex app supports TS, since Plex on LG TVs relys on WebOS player, so probably not, I will try later.
siriusbox
Posts: 31
Joined: Thu Mar 12, 2020 3:07 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by siriusbox »

Just tested, Plex app on LG C7 TV supports TS and looks like it supports Dolby Vision as well, since the Dolby Vision LG promotional video that someone put on that forum works, but the Doctor Sleep TS I made which switch to Dolby Vision on Plex in Shield only shows HDR on Plex in TV, so it looks like it is a problem with the profile, since in the promotional video is 04.06 and the result with the yousepe method is 08.06.
kazuma
Posts: 148
Joined: Fri Nov 08, 2019 9:51 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by kazuma »

how make you a DV TS file in steps?
MastaG
Posts: 91
Joined: Thu Aug 08, 2019 11:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by MastaG »

So on my Fedora machine I created a mode 2 single layer DV file using V3.

python src/bl_el_rpu_builder.py -bl ./BL.hevc -el EL.hevc -of ./gemini.hevc -mode 2

BL_ANALYSIS: 100.0% EL_ANALYSIS: 100.0% BL_EL_RPU WRITING: 100.0%

ELAPSED TIME: 16m 57s
Total BL NAL units AUD: 420962
Total EL NAL units AUD: 420962


Press a button to exit

Now I should have a single layer dolby vision hevc file:
mediainfo gemini.mp4
General
Complete name : gemini.mp4
Format : HEVC
Format/Info : High Efficiency Video Coding
File size : 66.3 GiB
FileExtension_Invalid : hevc h265 265

Video
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
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.0010 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 5180 cd/m2
Maximum Frame-Average Light Level : 1577 cd/m2


Should I now use TsMuxeR to mux into a TS file? or MP4Box or dolby labs mp4muxer?
I'd like to add Atmos audio with it.

EDIT: Could somebody please:
- Tell me which mode I should use or LG C8 ? (1 or 2)
- Post the modifications (patch file if possible) for TsMuxeR for DV compatibility? (@RESET_99?)
rosavanwinkle
Posts: 70
Joined: Fri Aug 09, 2019 11:10 am

Re: Dolby Vision now possible through MP4 Mux.

Post by rosavanwinkle »

I have followed every step in yusesope's guide he was so nice too make(super thanks)
I just used the latest version of Tsmuxer,(idk how to get dolby mp4muxer to work)
and playing it in both VLC or plex shield i get the problem that as soon as i skip ahead the audio goes out of sync...
I tested the file in Plex Shield and i get HDR. same for the in TV App
IDK where i'm messing up?
my movie was Shutter island.

Image
Mediaplayer: Nvidia Shield TV Pro
TV: LG 55SK7900PLA
Soundbar: LG SK8 (not LG SK8Y)
plex pass user
Discord:Rosa#1111
eblackadder
Posts: 15
Joined: Mon Mar 16, 2020 8:32 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by eblackadder »

Hello,

I found this wonderful board and i'm very interested in Dolby Vision on back ups. I have an LG C7 Tv and n NVidia Shield (2019).
I followed Yusope's guide to make a TS file. I tried the latest Spider-Man and It Chapter Two. Both movies muxed fine. When I tried it on Plex it triggers DV and also Dolby Atmos but it stops after a minute. My wifi speed is 60-70 mbps . I guess that's the problem, that the connection is too slow? Then I tried MX Player(HW Decoder) and it played great. Both Dolby Vision and Dolby Atmos.
However, when I stop the movie and when I want to resume it goes to HW+ and it says HDR10. When I try to chose HW Decoder again it says that it doesn't support HW Decoder.
Only when I get back to the beginning and choose HW Decoder at the configuration setting then it starts with Dolby Vision again. Does someone have an idea what's the reason for this?
Thanks in advanced and especially to everyone who are contributing to make dolby vision possible.
shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by shawnc22 »

Not sure about the audio going out of sync issue as I also have come across it, but the tsmuxer version you need to get DV into a TS container is the one listed here in this post:

https://www.makemkv.com/forum/viewtopic ... 485#p85786
rosavanwinkle
Posts: 70
Joined: Fri Aug 09, 2019 11:10 am

Re: Dolby Vision now possible through MP4 Mux.

Post by rosavanwinkle »

shawnc22 wrote:
Mon Mar 16, 2020 9:30 pm
Not sure about the audio going out of sync issue as I also have come across it, but the tsmuxer version you need to get DV into a TS container is the one listed here in this post:

https://www.makemkv.com/forum/viewtopic ... 485#p85786
Cheers,i'll do a convert,in a few hours, and test it.
Mediaplayer: Nvidia Shield TV Pro
TV: LG 55SK7900PLA
Soundbar: LG SK8 (not LG SK8Y)
plex pass user
Discord:Rosa#1111
rosavanwinkle
Posts: 70
Joined: Fri Aug 09, 2019 11:10 am

Re: Dolby Vision now possible through MP4 Mux.

Post by rosavanwinkle »

Update:
Conversion with shawnc22 link to the altered TSmuxer worked!
audio is in sync now in VLC ,
and mediainfo shows Dolby Vision instead of HDR10

the .TS plays perfect in plex:
Image

tv(ignore the mom sleeping in the reflexion):
Image

Info of the file:
Image

idk if these now need converting too MKV or not?
also I do not know how to create a sample file,if someone can assist me with that i can upload it and have someone else test it.
next one i'm doing is Schindlers list
Good job everyone who has being so caring and hardworking
TV info in my signature
Mediaplayer: Nvidia Shield TV Pro
TV: LG 55SK7900PLA
Soundbar: LG SK8 (not LG SK8Y)
plex pass user
Discord:Rosa#1111
planet_hoarder
Posts: 33
Joined: Tue Mar 17, 2020 10:32 am

Re: Dolby Vision now possible through MP4 Mux.

Post by planet_hoarder »

so does the bl_el_rpu_builder v0.0.3 works only with MEL?

I tried to use it in Win10 (via *.bat-file) with bl.hevc and el.hevc extracted via ffmpeg from Rocketman.Remux.mkv, but BL stuck at 0.0%, even though EL went ahead to 100%.
Then I used it with the A.Star.Is.Born.Remux.mkv (similarly extracted with fffmpeg), and it went through to BL+EL+RPU 100%.

Both *.mkv-files work fine with Dolby's mp4muxer (-profile 7) and C8 shows Dolby Vision.
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

baker99 wrote:
Mon Mar 16, 2020 10:13 am
There was a comparison of Stranger things DV on Netflix Shield vs from a different device and that had colour issues, so I suspect it's the Shield's processing rater than the tool causing the red
I am of the same opinion. I believe that "the problem" is the same analyzed in THIS post.


ragico wrote:
Sun Mar 15, 2020 10:10 pm
TS Mediainfo: HDR format Dolby Vision Version 1.0, dvhe 08.06 BL+EL /SMPTE ST 2086 HDR10 compatible
Something went wrong. Your file is a BL + EL while it should be BL + RPU.
I recommend using mp4muxer (HERE) for testing purposes (without audio). The command to use is:

Code: Select all

mp4muxer -i \path\to\yusesope_BL_RPU_file.hevc --dv-profile 5 -o \path\to\output.mp4
(wait for completion, it takes some time)

If it works, you can follow my "old" guide (HERE) which explains how to mux lossless audio in mp4 container (LPCM is the maximum audio quality output for a Fire Stick)

siriusbox wrote:
Mon Mar 16, 2020 11:45 am
Just tested, Plex app on LG C7 TV supports TS and looks like it supports Dolby Vision as well, since the Dolby Vision LG promotional video that someone put on that forum works, but the Doctor Sleep TS I made which switch to Dolby Vision on Plex in Shield only shows HDR on Plex in TV, so it looks like it is a problem with the profile, since in the promotional video is 04.06 and the result with the yousepe method is 08.06.
My tool just returns a raw HEVC stream.
The final output depends on the application that you decide to use after (in this case tsMuxeR) .
As I advised ragico, try using mp4muxer to test on the LG TV (so you can make a comparison with the Shield).
In your case, the command is:

Code: Select all

mp4muxer -i \path\to\yusesope_BL_EL_RPU_file.hevc --dv-profile 4 -o \path\to\output.mp4


kazuma wrote:
Mon Mar 16, 2020 4:54 pm
how make you a DV TS file in steps?
MastaG wrote:
Mon Mar 16, 2020 6:46 pm
EDIT: Could somebody please:
- Tell me which mode I should use or LG C8 ? (1 or 2)
- Post the modifications (patch file if possible) for TsMuxeR for DV compatibility? (@RESET_99?)
Follow the advice given to rosavanwinkle on these last two pages


rosavanwinkle wrote:
Tue Mar 17, 2020 12:30 am
Update:
Conversion with shawnc22 link to the altered TSmuxer worked!
....
idk if these now need converting too MKV or not?
Congrats!
For now, use the .ts container
MastaG
Posts: 91
Joined: Thu Aug 08, 2019 11:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by MastaG »

For Dolby Vision + Atmos:

Here's my success story for Gemini Man 2019 which is a 60fps movie which plays much more fluent.
I'm using Fedora 31 Linux but I've also posted windows links

Tools:
- ffmpeg - compiled from latest git (Windows build: https://ffmpeg.zeranoe.com/builds/)
- yusesope - tool V3: https://www.makemkv.com/forum/viewtopic ... 335#p85413
- eac3to portable version with wine - https://www.videohelp.com/software/eac3to
- tsmuxer modified for DV by a5180007/justdan96 - compiled from his github https://github.com/justdan96/tsMuxer (Windows build: https://bintray.com/justdan96/tsMuxer/t ... UI-Nightly) (Original forum thread: http://forum.doom9.org/showthread.php?t=176668&page=31)
Use the latest nightly tsMuxerGUI from this link, it's more recent compared the one posted a few pages back! and a5180007 also added support for eac3 dolby digital plus! (only 5.1)

First I demux the original bluray (will only work if I compile the latest FFMpeg git from source):

Code: Select all

ffmpeg -i bluray:/path/to/my/bluray -map 0:0 -c copy ./BL.hevc -map 0:1 -c copy ./EL.hevc -map 0:2 -c:a copy -strict -2 ./atmos.mp4
Now I have:
BL.hevc - Base Layer
EL.hevc - Enhanced Layer
atmos.mp4 - Dolby TrueHD Atmos audio

Now I use yusescope V3 tool to create a single layer DV file:

Code: Select all

python src/bl_el_rpu_builder.py -bl ./BL.hevc -el ./EL.hevc -of gemini_dv.hevc -mode 1
Now I also have:
gemini_dv.hevc - Full movie Single Layer DV

Now I use eac3to Gui to convert the atmos.mp4 to a compatible truehd+ac3 track for use with TSMuxeR:

Code: Select all

wine UsEac3To.exe
- Click Input File and select atmos.mp4
- Under Track Input and Output format change "ac3" to "thd+ac3" then click Add
- In the bottom click RUN CL and wait
When finished you will have a "atmos.mp4_.thd+ac3" file, rename this to "atmos.ac3"

Now launch justdan96's version of TsMuxerGUI then add your movie file: "gemini_dv.hevc" and audio file: "atmos.ac3".
Click Start and then you can copy the output .ts file to your Plex/Emby server.

When I try to play the TrueHD Atmos track Emby will start down-converting the audio (losing the DV metadata), this is probably because my LG C8 does not support e-ARC, so it cannot send high definition audio to my amp. This causes the movie to play in HDR10.
Selecting the AC3 audio instead works and will trigger Dolby Vision, so perhaps somebody with a C9 or nVidia Shield could try this method and test whether Atmos audio will work.

Two questions remain from my side:
1. What's the difference between mode 1 and 2? mode 1 seems to be the default and will produce a slightly larger file.
However both mode 1 and 2 will trigger Dolby Vision on my TV and I cannot see the difference.
2. I don't like the fact that I have to use eac3to to convert the truehd atmos audio to a compatible "thd+ac3" format for TSMuxer, because I have to run it with wine.
Can I achieve the same with ffmpeg instead? (e.g. convert the truehd atmos track to something TSMuxer will accept)


EDIT:
I've also added a second Dolby Digital Plus (eac3) 5.1 track now.

Code: Select all

General
ID                                       : 1 (0x1)
Complete name                            : Gemini Man 2019.ts
Format                                   : MPEG-TS
File size                                : 75.4 GiB
Duration                                 : 1 h 57 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 92.2 Mb/s
Maximum Overall bit rate                 : 35.5 Mb/s

Video
ID                                       : 4117 (0x1015)
Menu ID                                  : 1 (0x1)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : Dolby Vision, Version 1.0, dvhe.08.09, BL+EL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 1 h 57 min
Bit rate                                 : 86.6 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 59.940 (60000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.174
Stream size                              : 70.8 GiB (94%)
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.0010 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 5180 cd/m2
Maximum Frame-Average Light Level        : 1577 cd/m2

Audio #1
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3 MLP FBA 16-ch
Format/Info                              : Audio Coding 3 + Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Muxing mode                              : Stream extension
Codec ID                                 : 131
Duration                                 : 1 h 57 min
Bit rate mode                            : Variable
Bit rate                                 : 640 kb/s
Maximum bit rate                         : 7 944 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 536 MiB (1%)
Language                                 : English
Service kind                             : Complete Main
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Audio #2
ID                                       : 4353 (0x1101)
Menu ID                                  : 1 (0x1)
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : 135
Duration                                 : 1 h 57 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 375 MiB (0%)
Language                                 : English
Service kind                             : Complete Main
Happy times!
Last edited by MastaG on Wed Mar 18, 2020 8:13 am, edited 1 time in total.
planet_hoarder
Posts: 33
Joined: Tue Mar 17, 2020 10:32 am

Re: Dolby Vision now possible through MP4 Mux.

Post by planet_hoarder »

MastaG wrote:
Tue Mar 17, 2020 1:05 pm
EDIT:
I've also added a second Dolby Digital Plus (eac3) 5.1 track now.
why not add another lossless track like DTS-HD MA?
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

planet_hoarder wrote:
Tue Mar 17, 2020 10:45 am
I tried to use it in Win10 (via *.bat-file) with bl.hevc and el.hevc extracted via ffmpeg from Rocketman.Remux.mkv
Do not use remuxed files.
You have to work with the copy of the bluray disc.


MastaG wrote:
Tue Mar 17, 2020 1:05 pm
Here's my success story for Gemini Man 2019 which is a 60fps movie which plays much more fluent.
Thanks for your post. I'm glad it worked!
MastaG wrote:
Tue Mar 17, 2020 1:05 pm
Two questions remain from my side:
1. What's the difference between mode 1 and 2? mode 1 seems to be the default and will produce a slightly larger file.
However both mode 1 and 2 will trigger Dolby Vision on my TV and I cannot see the difference.
Find more info HERE.
In summary, "-mode 1" creates a Single Track Double Layer file (1:1 copy of a UHD).
"-mode 2" instead generates a Single Track Single Layer file (such as DVDFab).
Not all people own devices that can play files with dvhe.04 or dvhe.07 profile (-mode 1), so I have given the possibility to create files of type dvhe.05 (-mode 2).
The fact that you see no difference is a bit like someone who cannot distinguish a 320 kbps 16bit/44.1kHz MP3 from a 1200 kbps 24bit/192kHz FLAC: it depends on your equipment and subjective sensitivity.
MastaG wrote:
Tue Mar 17, 2020 1:05 pm
2. I don't like the fact that I have to use eac3to to convert the truehd atmos audio to a compatible "thd+ac3" format for TSMuxer, because I have to run it with wine.
Can I achieve the same with ffmpeg instead? (e.g. convert the truehd atmos track to something TSMuxer will accept)
I don't use tsMuxeR yet but I would try something like this:
instead of demuxing the audio track with ffmpeg and then re-editing it with eac3to, why don't you import the original disc and my HEVC file into tsMuxeR and then just check my raw stream and the TrueHD/ATMOS track (from the disc)?



shawnc22 wrote:
Sun Mar 15, 2020 11:53 pm
Odd thing just happened while I was trying to redo the Quiet Place TS with v0.0.3 of yusesope's tool. When all the counters reached 100%, the tool just seem to be hanging without showing the press button to exit message. It's been like this for almost 30 minutes now with no change. I do remember vaguely this happening with the temp version of the tool and the same title, but that lasted maybe no longer than 5 minutes before the message showed up to exit; never this long.
Perhaps some data has become corrupted in RAM before it can be written to the disk.
I slightly revised the mechanism that regulates the amount of data temporarily stored in RAM.

This is version_0.0.3_revision_1 (source code only)

Wait for the "press a button to exit" message, all the counters must reach 100% and the total number of NAL AUD (Access Unit Delimiter) processed and present in the BL layer must be equal, in the end, to those of the EL layer.

Happy testing!
Last edited by yusesope on Tue Mar 17, 2020 6:24 pm, edited 1 time in total.
shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by shawnc22 »

planet_hoarder wrote:
Tue Mar 17, 2020 10:45 am
so does the bl_el_rpu_builder v0.0.3 works only with MEL?

I tried to use it in Win10 (via *.bat-file) with bl.hevc and el.hevc extracted via ffmpeg from Rocketman.Remux.mkv, but BL stuck at 0.0%, even though EL went ahead to 100%.
Then I used it with the A.Star.Is.Born.Remux.mkv (similarly extracted with fffmpeg), and it went through to BL+EL+RPU 100%.

Both *.mkv-files work fine with Dolby's mp4muxer (-profile 7) and C8 shows Dolby Vision.
Don't think it's an issue with MEL, I've tried both Black Panther and A Quiet Place (both FEL) and they processed fine with yusecope's tool (temp version). Although when I did try to redo a quiet place with the v3 tool, everything reached 100% and it just stuck there without reaching the exit message. Btw, how did you get both the BL and EL track into an mkv to begin with? Do you see both video tracks when opening the original disk in makemkv? Maybe trying extracting the BL and EL layers from the original m2ts file instead.
MastaG wrote:
Tue Mar 17, 2020 1:05 pm
2. I don't like the fact that I have to use eac3to to convert the truehd atmos audio to a compatible "thd+ac3" format for TSMuxer, because I have to run it with wine.
Can I achieve the same with ffmpeg instead? (e.g. convert the truehd atmos track to something TSMuxer will accept)

For all the remuxes I've done, I never actually extracted the atmos extract from the original disk. If you open the original decrypted m2ts/mpls file in tsmuxer, you'll notice that the atmos track is already in ac3+thd format. I simply unchecked every other track except for the atmos track, add in the merged hevc video track from yusecope's tool, and mux. Only issue I've had so far is with audio desyncing a bit 2/3 of the way into A Quiet Place. Not sure if this issue is with tsmuxer or yusecope's tool, but more tests will be needed
Post Reply