Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
Message
Author
rosavanwinkle
Posts: 70
Joined: Fri Aug 09, 2019 11:10 am

Re: Dolby Vision now possible through MP4 Mux.

#1726 Post by rosavanwinkle » Thu Mar 19, 2020 10:56 pm

RESET_9999 wrote:
Thu Mar 19, 2020 10:24 pm
Alldu wrote:
Thu Mar 19, 2020 9:44 pm
Hy guys, anybody know what's the best way to embed sub/idx or ass subtitles into the DV mp4? I play my DV files via X700 and for some reason it can't read ass subs properly and sub/idx at all, if I put them in the same folder as DV mp4. Thanks!
You don't have to use the MP4 container anymore with the x700. You can remux your UHD bluray disc directly to .TS or .M2TS using this tsMuxer:

https://drive.google.com/file/d/1IWYPO4 ... sp=sharing

DV, Atmos and subs will work.

so wait you got all 3 to work together but on that X700 player not on the shield/build in LG player? or am i mistaken something?
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.

#1727 Post by planet_hoarder » Thu Mar 19, 2020 11:13 pm

rosavanwinkle wrote:
Thu Mar 19, 2020 10:56 pm
RESET_9999 wrote:
Thu Mar 19, 2020 10:24 pm
Alldu wrote:
Thu Mar 19, 2020 9:44 pm
Hy guys, anybody know what's the best way to embed sub/idx or ass subtitles into the DV mp4? I play my DV files via X700 and for some reason it can't read ass subs properly and sub/idx at all, if I put them in the same folder as DV mp4. Thanks!
You don't have to use the MP4 container anymore with the x700. You can remux your UHD bluray disc directly to .TS or .M2TS using this tsMuxer:

https://drive.google.com/file/d/1IWYPO4 ... sp=sharing

DV, Atmos and subs will work.

so wait you got all 3 to work together but on that X700 player not on the shield/build in LG player? or am i mistaken something?
Built-in LG player doesn't support Atmos, even on C9 with eARC (unless they updated)
but bitstreams Atmos with no problems if you can play it (e.g. HTPC)

RESET_9999
Posts: 2090
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

#1728 Post by RESET_9999 » Thu Mar 19, 2020 11:21 pm

rosavanwinkle wrote:
Thu Mar 19, 2020 10:56 pm
so wait you got all 3 to work together but on that X700 player not on the shield/build in LG player? or am i mistaken something?
yep but so far, Dual layer DV + Atmos TS(or m2ts) only works on the x700 and the oppo.

A friend of mine tried the Philips and LG DV Bluray player which both support dual layer DV MP4 but no success.

rosavanwinkle
Posts: 70
Joined: Fri Aug 09, 2019 11:10 am

Re: Dolby Vision now possible through MP4 Mux.

#1729 Post by rosavanwinkle » Fri Mar 20, 2020 12:10 am

i rather have a nice dolby vision that works perfect then a atmos sound,since i dont have a full atmos sound system atm xD
Mediaplayer: Nvidia Shield TV Pro
TV: LG 55SK7900PLA
Soundbar: LG SK8 (not LG SK8Y)
plex pass user
Discord:Rosa#1111

kamus
Posts: 2
Joined: Thu Mar 19, 2020 9:30 pm

Re: Dolby Vision now possible through MP4 Mux.

#1730 Post by kamus » Fri Mar 20, 2020 1:19 am

Did anyone ever find a fix for the stutter problems using Grencola's tool?

I haven't been able to get a single working file with that tool, they all stutter like crazy on my LG B9.

Grencola
Posts: 343
Joined: Sun Jan 27, 2019 5:19 pm

Re: Dolby Vision now possible through MP4 Mux.

#1731 Post by Grencola » Fri Mar 20, 2020 3:40 am

kamus wrote:
Fri Mar 20, 2020 1:19 am
Did anyone ever find a fix for the stutter problems using Grencola's tool?

I haven't been able to get a single working file with that tool, they all stutter like crazy on my LG B9.
are you using mkv remux or m2ts? had a few remuxes that stuttered, all m2ts have been fine though. I don't own a B9 but many others who do have no problems. you can try yusesope's tool and make a bl+el-rpu hevc then run that through mp4 muxer via profile 7.

Deihnyx
Posts: 9
Joined: Mon Jan 29, 2018 11:31 am

Re: Dolby Vision now possible through MP4 Mux.

#1732 Post by Deihnyx » Fri Mar 20, 2020 7:44 am

Hello,
I've also been having stuttering issues.
Tested on a OLED C7 and C9 with Emby/Plex. Also tested on Nvidia shield (2019)
My goal would be to have DV work on devices that can fully support it, otherwise fallback to HDR. I'm fully aware that Atmos will not work on WebOS client and I'm ok with it.
I used Joker for testing.
So:
  • On C7 WebOS, It should play DV, AC3 5.1 Core
  • On C9 WebOS, It should play DV, AC3 5.1 Core
  • On Nvidia Shield it should play DV, Atmos
I used the method described in the past threads.
  • ffmpeg to decode the BL + EL layer

    Code: Select all

    ffmpeg -i bluray:H:\ -map 0:0 -c copy D:\output\BL.hevc -map 0:1 -c copy D:\output\EL.hevc
    
  • yusesope's script to merge the layers (all counters to 100%)

    Code: Select all

    python src\bl_el_rpu_builder.py -bl D:\output\BL.hevc -el D:\output\EL.hevc -of D:\output\Full.hevc
    
  • tsmuxer to remux the new hevc + truehd atmos to TS
On the C7:
  • If I pick the TrueHD file, Emby goes into direct streaming (downgrade the sound) and HDR shows up
  • If I pick the Core AC3 file, black screen
On the C9:
  • If I pick the TrueHD file, Emby goes into direct streaming (downgrade the sound) and HDR shows up (e-ARC doesn't work as it should, but that's a known issue)
  • If I pick the Core AC3 file, Dolby Vision shows up, but it stutters really really bad
On Shield 2019 (DV is enabled)
  • If I pick the TrueHD file, HDR is triggered (direct play) on C7, Dolby Vision on C9. Only Plex works.
  • If I pick the Core AC3 file, HDR is triggered (direct play) on C7, Dolby Vision on C9. Only Plex works.
    Not sure why the result would be different between the C7 and the C9 while running on Shield though...
I'm really not sure what's going on. Are TS DV not working at all with the OLED or does it need a different dv profile?
I'd like to avoid having to make a mp4 and a ts version of each movie depending of the source.

MediaInfo:

Code: Select all

General
ID                             : 1 (0x1)
Complete name                  : \\192.168.0.200\movies\Movies\Joker (2019)\Joker (2019) - UHD.ts
Format                         : MPEG-TS
File size                      : 48.6 GiB
Duration                       : 2 h 1 min
Overall bit rate mode          : Variable
Overall bit rate               : 57.1 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.06, BL+EL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                       : 36
Duration                       : 2 h 1 min
Bit rate                       : 53.7 Mb/s
Width                          : 3 840 pixels
Height                         : 2 160 pixels
Display aspect ratio           : 16:9
Frame rate                     : 23.976 (24000/1001) FPS
Color space                    : YUV
Chroma subsampling             : 4:2:0 (Type 2)
Bit depth                      : 10 bits
Bits/(Pixel*Frame)             : 0.270
Stream size                    : 45.7 GiB (94%)
Language                       : English
Color range                    : Limited
Color primaries                : BT.2020
Transfer characteristics       : PQ
Matrix coefficients            : BT.2020 non-constant
Mastering display color primar : Display P3
Mastering display luminance    : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level    : 992 cd/m2
Maximum Frame-Average Light Le : 120 cd/m2

Audio
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                       : 2 h 1 min
Bit rate mode                  : Variable
Bit rate                       : 640 kb/s
Maximum bit rate               : 7 158 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                    : 558 MiB (1%)
Language                       : English
Service kind                   : Complete Main
Number of dynamic objects      : 15
Bed channel count              : 1 channel
Bed channel configuration      : LFE

yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

#1733 Post by yusesope » Fri Mar 20, 2020 10:58 am

baker99 wrote:
Thu Mar 19, 2020 9:12 pm
I have posted it on the forum for you
I really appreciate it. Thank you.



shawnc22 wrote:
Thu Mar 19, 2020 10:35 pm
So one last thing with that problematic movie. I stripped out the BL layer from the mkv that I made out of the original disk, and it surprisingly mixed successfully (equal AUDs) with the EL layer I had extracted prior from the decrypted M2TS. But once muxed back into the TS container with the Atmos audio, there was definitely a hiccup in the video at the 0:43:35 mark and the audio became desynced thereafter. Odd that there was no hiccup in playback of the mkv file though at the same point, so the EL is seemingly the problematic source even though the original BL was the one with the missing AUD.
It's a cursed movie. It is the only explanation. :twisted: :twisted: :twisted:
shawnc22 wrote:
Thu Mar 19, 2020 10:35 pm
I just commented out that entire conditional block with the "Duallayers" variable and simply forced the DV profile to 4 (bitWriter.putBits(7,4))
...
Triggers DV on the shield and looks pretty much the same as the profile 8 video. Again, I know what I did was very hacky as I was just curious if changing the DV profile would do anything :lol: . Perhaps after the devs take a look at it and implement a real change, there will be some noticeable differences.
Yes, it was exactly what I meant.
Changing the profile does not affect the visual quality ( :wink: ) but I think it is important to correctly signal the Dolby Vision track to the hardware decoder.
In the case of an MPEG-2 TS it is important that a Registration Descriptor with the value 0x0504444F5649 is created (
you can search for these 6 bytes in your ts files with any hex editor like HxD) and that the DOVI_video_stream_descriptor (the part of the program you edited) is constructed with a precise semantics.
In the official document it says that "The el_present_flag set according to the profile. Note that certain profiles defined in Signaling Dolby Vision Profiles and Levels do not include an EL."
Profile 8 does not have the EL layer, 4 does.

As for the DVCompatibility value, it was used to choose between profile 8 and 5 (the part of the program you excluded).

In the case of a profile 4, according to the guidelines, cross-compatibility should be set to SDR (DVCompatibility = 2). My files are reported as compatible with HDR10: tsMuxeR correctly manages the VUIs (0,9,16,9,2) while my file is slightly out of standard (as it is derived from a UHD-BD). But the behavior of the decoder is not dependent on these Dolby Vision defined crosscompatibility IDs, so we're safe!



Deihnyx wrote:
Fri Mar 20, 2020 7:44 am
I used the method described in the past threads.
  • ffmpeg to decode the BL + EL layer

    Code: Select all

    ffmpeg -i bluray:H:\ -map 0:0 -c copy D:\output\BL.hevc -map 0:1 -c copy D:\output\EL.hevc
    
  • yusesope's script to merge the layers (all counters to 100%)

    Code: Select all

    python src\bl_el_rpu_builder.py -bl D:\output\BL.hevc -el D:\output\EL.hevc -of D:\output\Full.hevc
    
  • tsmuxer to remux the new hevc + truehd atmos to TS
Everything seems OK to me.

To try to understand where the problem lies, I recommend you:
Download version_0.0.3_revision_1 of my tool and start it with the command:

Code: Select all

python bl_el_rpu_builder_v0.0.3_rev_1.py -bl D:\output\BL.hevc -el D:\output\EL.hevc -of D:\output\New_Full.hevc
It is important that all the counters reach 100%, that the total number of BL AUDs is equal to those of EL Layer and that the program ends with the invitation to "press a button to exit".

If everything was ok, I recommend, before using tsMuxeR, to test only the video with mp4muxer (HERE) by trying both profile 4 and profile 7 (it takes some time).

Code: Select all

mp4muxer -i D:\output\New_Full.hevc --dv-profile 4 -o D:\output\New_Full_dvhe04.mp4

Code: Select all

mp4muxer -i D:\output\New_Full.hevc --dv-profile 7 -o D:\output\New_Full_dvhe07.mp4
If the video is displayed correctly on your devices then add the audio with tsMuxeR (as you did previously).
If that doesn't work, try creating a BL + RPU file by adding the "-mode 2" switch to my script.

Code: Select all

python bl_el_rpu_builder_v0.0.3_rev_1.py -mode 2 -bl D:\output\BL.hevc -el D:\output\EL.hevc -of D:\output\BL_RPU.hevc

MastaG
Posts: 91
Joined: Thu Aug 08, 2019 11:40 am

Re: Dolby Vision now possible through MP4 Mux.

#1734 Post by MastaG » Fri Mar 20, 2020 1:18 pm

yusesope wrote:
Fri Mar 20, 2020 10:58 am
To try to understand where the problem lies, I recommend you:
Download version_0.0.3_revision_1 of my tool and start it with the command:

Code: Select all

python bl_el_rpu_builder_v0.0.3_rev_1.py -bl D:\output\BL.hevc -el D:\output\EL.hevc -of D:\output\New_Full.hevc
It is important that all the counters reach 100%, that the total number of BL AUDs is equal to those of EL Layer and that the program ends with the invitation to "press a button to exit".

If everything was ok, I recommend, before using tsMuxeR, to test only the video with mp4muxer (HERE) by trying both profile 4 and profile 7 (it takes some time).

Code: Select all

mp4muxer -i D:\output\New_Full.hevc --dv-profile 4 -o D:\output\New_Full_dvhe04.mp4

Code: Select all

mp4muxer -i D:\output\New_Full.hevc --dv-profile 7 -o D:\output\New_Full_dvhe07.mp4
If the video is displayed correctly on your devices then add the audio with tsMuxeR (as you did previously).
If that doesn't work, try creating a BL + RPU file by adding the "-mode 2" switch to my script.

Code: Select all

python bl_el_rpu_builder_v0.0.3_rev_1.py -mode 2 -bl D:\output\BL.hevc -el D:\output\EL.hevc -of D:\output\BL_RPU.hevc
So if I understand correctly, by muxing the hevc file first into mp4 container with dolby's mp4muxer, it will get the correct profile (eg 04 or 07).
So this is like a workaround when muxing the hevc file directly using TSMuxeR's causing profile 08 to be set?

yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

#1735 Post by yusesope » Fri Mar 20, 2020 1:55 pm

MastaG wrote:
Fri Mar 20, 2020 1:18 pm
So if I understand correctly, by muxing the hevc file first into mp4 container with dolby's mp4muxer, it will get the correct profile (eg 04 or 07).
So this is like a workaround when muxing the hevc file directly using TSMuxeR's causing profile 08 to be set?
No, it's only for testing purpose.

kazuma
Posts: 162
Joined: Fri Nov 08, 2019 9:51 pm

Re: Dolby Vision now possible through MP4 Mux.

#1736 Post by kazuma » Fri Mar 20, 2020 3:37 pm

why dvdfab isn't work well anymore? is this because the new updates? i have problems with 1917 and more others. i have a black screen on my lg c9. anyone else?

shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

#1737 Post by shawnc22 » Fri Mar 20, 2020 3:38 pm

Deihnyx wrote:
Fri Mar 20, 2020 7:44 am
Hello,
I've also been having stuttering issues.
Tested on a OLED C7 and C9 with Emby/Plex. Also tested on Nvidia shield (2019)
My goal would be to have DV work on devices that can fully support it, otherwise fallback to HDR. I'm fully aware that Atmos will not work on WebOS client and I'm ok with it.
I used Joker for testing.
So:
  • On C7 WebOS, It should play DV, AC3 5.1 Core
  • On C9 WebOS, It should play DV, AC3 5.1 Core
  • On Nvidia Shield it should play DV, Atmos
I may be wrong but I don't believe that the "AC3 core" is an actual track that can be played. You'd either have to convert that truehd track into LPCM like you'd do for the mp4 method or include one of the other non-truehd tracks from the original disk into the TS container.
yusesope wrote:
Fri Mar 20, 2020 10:58 am
As for the DVCompatibility value, it was used to choose between profile 8 and 5 (the part of the program you excluded).
Right, I saw that part and started to backtrack the code to see how I can correctly change DualLayers and m_hdr->isHDR10 to fall into the other side of the conditional and choose profile 4 on its own, but it eventually got too much for my understanding of the subject and hence the hacky change :lol: . I'll leave it up the real devs to make the correct changes

jcdr428
Posts: 34
Joined: Fri Mar 20, 2020 6:55 pm

Re: Dolby Vision now possible through MP4 Mux.

#1738 Post by jcdr428 » Fri Mar 20, 2020 7:30 pm

shawnc22 wrote:
Fri Mar 20, 2020 3:38 pm
Right, I saw that part and started to backtrack the code to see how I can correctly change DualLayers and m_hdr->isHDR10 to fall into the other side of the conditional and choose profile 4 on its own, but it eventually got too much for my understanding of the subject and hence the hacky change :lol: . I'll leave it up the real devs to make the correct changes
Hi all, so I registered to the forum, as it will certainly be more efficient than members notifying of discussions from here on the tsMuxer forum (thanks @baker99). By the way I am far from being a 'real dev'...

Patch for tsMuxer profile 4 / single track double layer has been pushed here.

@yusesope, according to the DV profile & level document, profile 4 is normally limited to BL signal cross-compatibility ID 2 = SDR with VUI BL 0, 1, 1, 1, 0 EL 1, 2, 2, 2, 0. Your profile 4 single track files created from Blu-ray double tracks have VUI BL & EL 0, 9, 16, 9, 2. I don't have any DV hardware to test lecture of the files, should I keep BL signal cross-compatibility ID to 6, or change it to 2 ?

oldirtydog
Posts: 22
Joined: Fri Mar 20, 2020 9:09 pm

Re: Dolby Vision now possible through MP4 Mux.

#1739 Post by oldirtydog » Fri Mar 20, 2020 9:17 pm

with eactogui i create a 1.hevc 2.hevc and 3.ac3 but when i trying to make it in 1 i had error ac3 something... http://alfa.kachi-snimka.info/vij.php?i ... 8992o.jpeg

box4m
Posts: 68
Joined: Tue Sep 10, 2019 7:23 pm

Re: Dolby Vision now possible through MP4 Mux.

#1740 Post by box4m » Fri Mar 20, 2020 9:33 pm

Mortenjorstad wrote:
Wed Mar 18, 2020 1:39 pm
I have know made M2ts files with hd audio on all my 56 DV movies. Every movie play perfect on shield 2019 with DV and Atmos/dts x sound.

1 demux with eac3to Eac3to path to moviefolder 2:bl.hevc 3:el.hevc

2 tak the 2 files and import them into yuseope tool v02

3 use tsmuxer modified Version, mux file made by yuseope tool with audio from Blu-ray.

https://drive.google.com/uc?id=10zOr0IU ... t=download
care to explain the steps and commands u use for this?
would appriciate alot

Post Reply