Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
box4m
Posts: 68
Joined: Tue Sep 10, 2019 7:23 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by box4m »

deadchip12 wrote:
Fri May 29, 2020 1:03 pm
kazuma wrote:
Fri May 29, 2020 10:00 am
deadchip12 wrote:
Fri May 29, 2020 8:53 am

Which device did you use to play the profile 7 mp4 file?
LG C9
The internal player? I have played 4k hdr files using my c9's internal player and using my pc with PowerDVD 20. The image quality using the internal player is at least as good as when using my pc, which is pretty powerful. The powerdvd software is no slouch either I guess. I'm not sure what kind of magic the oppo device pulls to make the image quality drastically better. Maybe you can try describing the differences you see?
DV in windows with powerdvd?
stephon1024
Posts: 14
Joined: Thu May 21, 2020 8:30 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by stephon1024 »

MartyMcNuts wrote:
Fri May 29, 2020 12:41 am
stephon1024 wrote:
Thu May 28, 2020 11:10 pm
shawnc22 wrote:
Thu May 28, 2020 10:37 pm

People have always had mixed results with DV TS file playback on the LG internal player. With full rips, some have worked flawlessly and some will stutter to no end. I've always suggested that if the LG internal player is your only playback device, leave tsmuxer alone and stick to the old mp4muxer method. TSMuxer's main advantage is the ability to mux in both dolby vision and truehd dolby atmos audio tracks. If you're using the TV for playback, the atmos audio track does nothing for you. Have you tried muxing a downsampled BL with the original EL using mp4muxer?
Hey Shawn,

Appreciate the comment.

Yeah i tried the MP4 method and no dice there either. As I stated in a previous post, I can get a "playable" file using the mp4muxer method just like the TSmuxer method - they just stutter like crazy. Since I got the same result using multiple methods I'm starting to think it's a bottleneck with the C9's SOC (system on chip) at the extremely high bitrate the raw BL+EL+RPU file (created using Yusesope's tool) has with no treatment off the disc. It's meant for streaming content from Netflix, Hulu, Disney+ (which has Dolby Vision!) that is compressed (internet... obvi!). It's not a 4K UHD player designed to handle extremely high bitrate multi-layer multi-stream content.

I don't believe it's a compatibility issue as much as a total bitrate issue, but I'll know soon enough. And the TrueHD does matter to me as I'll be running this through a receiver in the future with support for lossless audio, but honestly - TS muxer is just easy to use and LG TV's support TS video format (so does Plex) so I really don't care about the container. I'm mostly concerned with getting a compressed BL layer to merge properly with an EL layer using Yusesope's tool. I think that's my key. Then with a significantly smaller BL+EL+RPU I can either use TSmuxer or mp4muxer to create the final output - at that point it doesn't really matter.

Once I have that... I think I'll be golden.
stephon1024,

I've uploaded some new samples for you to try. They are profile 4. Please try the first 2 files. One is a MP4 and the other is a TS.

https://www.makemkv.com/forum/viewtopic ... 505#p90663
MARTY!!! I don't know what you did or how you did it... but you did it!!! Those dual layer files you gave me with the EL being profile 04.09 worked perfectly. The only one that didn't was the BL_EL_RPU TS file...

How did you put those together? I must know! it's the key!!!!

Thanks so much man!!!
stephon1024
Posts: 14
Joined: Thu May 21, 2020 8:30 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by stephon1024 »

shawnc22 wrote:
Fri May 29, 2020 12:37 am
stephon1024 wrote:
Thu May 28, 2020 11:10 pm
shawnc22 wrote:
Thu May 28, 2020 10:37 pm

People have always had mixed results with DV TS file playback on the LG internal player. With full rips, some have worked flawlessly and some will stutter to no end. I've always suggested that if the LG internal player is your only playback device, leave tsmuxer alone and stick to the old mp4muxer method. TSMuxer's main advantage is the ability to mux in both dolby vision and truehd dolby atmos audio tracks. If you're using the TV for playback, the atmos audio track does nothing for you. Have you tried muxing a downsampled BL with the original EL using mp4muxer?
Hey Shawn,

Appreciate the comment.

Yeah i tried the MP4 method and no dice there either. As I stated in a previous post, I can get a "playable" file using the mp4muxer method just like the TSmuxer method - they just stutter like crazy. Since I got the same result using multiple methods I'm starting to think it's a bottleneck with the C9's SOC (system on chip) at the extremely high bitrate the raw BL+EL+RPU file (created using Yusesope's tool) has with no treatment off the disc. It's meant for streaming content from Netflix, Hulu, Disney+ (which has Dolby Vision!) that is compressed (internet... obvi!). It's not a 4K UHD player designed to handle extremely high bitrate multi-layer multi-stream content.

I don't believe it's a compatibility issue as much as a total bitrate issue, but I'll know soon enough. And the TrueHD does matter to me as I'll be running this through a receiver in the future with support for lossless audio, but honestly - TS muxer is just easy to use and LG TV's support TS video format (so does Plex) so I really don't care about the container. I'm mostly concerned with getting a compressed BL layer to merge properly with an EL layer using Yusesope's tool. I think that's my key. Then with a significantly smaller BL+EL+RPU I can either use TSmuxer or mp4muxer to create the final output - at that point it doesn't really matter.

Once I have that... I think I'll be golden.
Did you use mp4muxer with the untouched BL and EL layers and not the result of yusecope's tool? Also it has to be an older version of mp4muxer (mp4muxer64.exe) and not the latest one from github. With that, you shouldn't have any issues with an mp4. Whenever you do get a receiver, be sure to get it along with a dedicated streamer as well since the LGs at the moment is not able to passthrough lossless atmos, even with e-ARC.
Hey Shawn,

I did not use the mp4muxer64.exe... I couldn't find it on the internet!!! That may be my problem...

Anyway you could share your mp4muxer64 folder with me so I could get that verison?

That may be my problem this entire time...

Thanks for the help and great note on the receiver. I'll look for that exactly - had no idea LG didn't have passthrough for TrueHD.
shawnc22
Posts: 636
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by shawnc22 »

stephon1024 wrote:
Fri May 29, 2020 7:09 pm
Hey Shawn,

I did not use the mp4muxer64.exe... I couldn't find it on the internet!!! That may be my problem...

Anyway you could share your mp4muxer64 folder with me so I could get that verison?

That may be my problem this entire time...

Thanks for the help and great note on the receiver. I'll look for that exactly - had no idea LG didn't have passthrough for TrueHD.
Sure, here you go:

https://mega.nz/file/Jawn3ADa#vN1ai3llv ... ktTQ4uFYkk

The LG passthrough is unfortunately only limited to external devices (even a bit iffy at that with lossless atm, but potential fix coming). With internal apps (internal media player, plex, etc), it will definitely not be able to pass truehd audio onto your future receiver because it lacks the decoder.
deadchip12
Posts: 206
Joined: Thu May 02, 2019 2:49 am

Re: Dolby Vision now possible through MP4 Mux.

Post by deadchip12 »

box4m wrote:
Fri May 29, 2020 2:18 pm
deadchip12 wrote:
Fri May 29, 2020 1:03 pm
kazuma wrote:
Fri May 29, 2020 10:00 am


LG C9
The internal player? I have played 4k hdr files using my c9's internal player and using my pc with PowerDVD 20. The image quality using the internal player is at least as good as when using my pc, which is pretty powerful. The powerdvd software is no slouch either I guess. I'm not sure what kind of magic the oppo device pulls to make the image quality drastically better. Maybe you can try describing the differences you see?
DV in windows with powerdvd?
No, hdr10. I'm just assuming it would be a similar story with dolby vision.
MartyMcNuts
Posts: 2460
Joined: Wed Nov 22, 2017 11:45 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by MartyMcNuts »

stephon1024 wrote:
Fri May 29, 2020 6:09 pm
MartyMcNuts wrote:
Fri May 29, 2020 12:41 am
stephon1024 wrote:
Thu May 28, 2020 11:10 pm


Hey Shawn,

Appreciate the comment.

Yeah i tried the MP4 method and no dice there either. As I stated in a previous post, I can get a "playable" file using the mp4muxer method just like the TSmuxer method - they just stutter like crazy. Since I got the same result using multiple methods I'm starting to think it's a bottleneck with the C9's SOC (system on chip) at the extremely high bitrate the raw BL+EL+RPU file (created using Yusesope's tool) has with no treatment off the disc. It's meant for streaming content from Netflix, Hulu, Disney+ (which has Dolby Vision!) that is compressed (internet... obvi!). It's not a 4K UHD player designed to handle extremely high bitrate multi-layer multi-stream content.

I don't believe it's a compatibility issue as much as a total bitrate issue, but I'll know soon enough. And the TrueHD does matter to me as I'll be running this through a receiver in the future with support for lossless audio, but honestly - TS muxer is just easy to use and LG TV's support TS video format (so does Plex) so I really don't care about the container. I'm mostly concerned with getting a compressed BL layer to merge properly with an EL layer using Yusesope's tool. I think that's my key. Then with a significantly smaller BL+EL+RPU I can either use TSmuxer or mp4muxer to create the final output - at that point it doesn't really matter.

Once I have that... I think I'll be golden.
stephon1024,

I've uploaded some new samples for you to try. They are profile 4. Please try the first 2 files. One is a MP4 and the other is a TS.

https://www.makemkv.com/forum/viewtopic ... 505#p90663
MARTY!!! I don't know what you did or how you did it... but you did it!!! Those dual layer files you gave me with the EL being profile 04.09 worked perfectly. The only one that didn't was the BL_EL_RPU TS file...

How did you put those together? I must know! it's the key!!!!

Thanks so much man!!!
Cool, I'm glad they worked for you. Here are the steps to create them. For this example, I used Birds of Prey which is MEL. Just change the inputs/outputs to your source.


1. Extract the BL and EL to separate hevc files and any audio tracks you want. I prefer to use eac3to for this task. You can use ffmpeg if you want. Here are both commands:

eac3to N:\BIRDS_OF_PREY\BDMV\PLAYLIST\00800.mpls 1) 2: N:\BIRDS_OF_PREY\TEMP_FOLDER\BL.hevc 3: N:\BIRDS_OF_PREY\TEMP_FOLDER\EL.hevc 4: N:\BIRDS_OF_PREY\TEMP_FOLDER\audio.ac3 -core

ffmpeg -y -hide_banner -analyzeduration 999M -probesize 999M -playlist 00800 -i bluray:N:\BIRDS_OF_PREY -map 0:0 -c:v copy N:\BIRDS_OF_PREY\TEMP_FOLDER\BL.hevc -map 0:1 -c:v copy N:\BIRDS_OF_PREY\TEMP_FOLDER\EL.hevc -map 0:2 -c:a ac3 -b:a 640k N:\BIRDS_OF_PREY\TEMP_FOLDER\audio.ac3


2. Shrink the BL. I use NVencC64 for this using a bitrate of 25000k. The command is:

NVEncC_5.01_x64\NVEncC64 --avhw -i N:\BIRDS_OF_PREY\TEMP_FOLDER\BL.hevc --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 --transfer smpte2084 --chromaloc 2 --master-display copy --max-cll copy -o N:\BIRDS_OF_PREY\TEMP_FOLDER\BL_shrunk.hevc


3. Then use mp4muxer to mux the BL, EL and audio to a mp4 file. The command is:

mp4muxer_64bits.exe --dv-profile 4 -i N:\BIRDS_OF_PREY\TEMP_FOLDER\BL_shrunk.hevc -i N:\BIRDS_OF_PREY\TEMP_FOLDER\EL.hevc -i N:\BIRDS_OF_PREY\TEMP_FOLDER\audio.ac3 --media-lang eng -o N:\BIRDS_OF_PREY\TEMP_FOLDER\Birds.of.Prey.(2020).2160p.UHDRip.(Dolby.Vision).HEVC.AC3.mp4


This should give you a re-encoded mp4 that is DV 04.06 with AC3 audio.

Here is the link for the Birds of Prey sample I created. It is DV 04.06 with ac3 audio.

https://www.mediafire.com/file/zakxv8ym ... 9.zip/file
Cheers :D
----------------------------------------------------------------------------------------------------------------------------
For UHD enabled drives (AU/NZ/SG) & DIY Single Drive Flasher (WW): https://www.uhdenableddrives.com
shawnc22
Posts: 636
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by shawnc22 »

MartyMcNuts wrote:
Sat May 30, 2020 8:39 am
3. Then use mp4muxer to mux the BL, EL and audio to a mp4 file. The command is:

mp4muxer_64bits.exe --dv-profile 4 -i N:\BIRDS_OF_PREY\TEMP_FOLDER\BL_shrunk.hevc -i N:\BIRDS_OF_PREY\TEMP_FOLDER\EL.hevc -i N:\BIRDS_OF_PREY\TEMP_FOLDER\audio.ac3 --media-lang eng -o N:\BIRDS_OF_PREY\TEMP_FOLDER\Birds.of.Prey.(2020).2160p.UHDRip.(Dolby.Vision).HEVC.AC3.mp4
I think profile 7 should really be used here. These are, spec-wise, profile 7 files, and the LG internal player supports it. Any stuttering issues caused by this method is likely because of the bitrate and not the profile choice.
MartyMcNuts
Posts: 2460
Joined: Wed Nov 22, 2017 11:45 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by MartyMcNuts »

shawnc22 wrote:
Sat May 30, 2020 1:34 pm
MartyMcNuts wrote:
Sat May 30, 2020 8:39 am
3. Then use mp4muxer to mux the BL, EL and audio to a mp4 file. The command is:

mp4muxer_64bits.exe --dv-profile 4 -i N:\BIRDS_OF_PREY\TEMP_FOLDER\BL_shrunk.hevc -i N:\BIRDS_OF_PREY\TEMP_FOLDER\EL.hevc -i N:\BIRDS_OF_PREY\TEMP_FOLDER\audio.ac3 --media-lang eng -o N:\BIRDS_OF_PREY\TEMP_FOLDER\Birds.of.Prey.(2020).2160p.UHDRip.(Dolby.Vision).HEVC.AC3.mp4
I think profile 7 should really be used here. These are, spec-wise, profile 7 files, and the LG internal player supports it. Any stuttering issues caused by this method is likely because of the bitrate and not the profile choice.
You are probably right but stephon1024 asked for profile 4 so that is what I showed.
Cheers :D
----------------------------------------------------------------------------------------------------------------------------
For UHD enabled drives (AU/NZ/SG) & DIY Single Drive Flasher (WW): https://www.uhdenableddrives.com
jlpsvk
Posts: 50
Joined: Thu Sep 06, 2018 11:33 am

Re: Dolby Vision now possible through MP4 Mux.

Post by jlpsvk »

any way to add subtitles, dts-hd ma to MP4???
RESET_9999
Posts: 1853
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

jlpsvk wrote:
Sun May 31, 2020 9:16 pm
any way to add subtitles, dts-hd ma to MP4???
need to be SRT

Code: Select all

ffmpeg.exe -i X:\DTSHD.mka -map 0:0 -c copy X:\DTSHD.mp4

Code: Select all

mp4box.exe -add X:\DV.mp4:rate=0 -add D:\DTSHD.mp4#audio:lang=en-EN -add X:\SUBS.srt#subtitle:lang=en-EN -tmp X:\ -brand mp42isom -ab dby1 -no-iod X:\DV-DTSHD-SUBS.mp4
sonysg
Posts: 8
Joined: Tue May 26, 2020 5:10 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sonysg »

RESET_9999 wrote:
Sun May 31, 2020 11:21 pm
jlpsvk wrote:
Sun May 31, 2020 9:16 pm
any way to add subtitles, dts-hd ma to MP4???
need to be SRT

Code: Select all

ffmpeg.exe -i X:\DTSHD.mka -map 0:0 -c copy X:\DTSHD.mp4

Code: Select all

mp4box.exe -add X:\DV.mp4:rate=0 -add D:\DTSHD.mp4#audio:lang=en-EN -add X:\SUBS.srt#subtitle:lang=en-EN -tmp X:\ -brand mp42isom -ab dby1 -no-iod X:\DV-DTSHD-SUBS.mp4
sorry it mean .ass and .sup still yet to be supported?
Woodstock
Posts: 9912
Joined: Sun Jul 24, 2011 11:21 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Woodstock »

Subtitle types you can put in an MP4 file are very limited. Other than timed text and closed captioning, everything else depends on the player understanding a non-standard extension.
MakeMKV Frequently Asked Questions
How to aid in finding the answer to your problem: Activating Debug Logging
chrisandy
Posts: 60
Joined: Fri May 29, 2020 6:33 am

Re: Dolby Vision now possible through MP4 Mux.

Post by chrisandy »

ragico wrote:
Sun May 10, 2020 4:42 pm
yusesope wrote:
Sun May 10, 2020 9:26 am
The 0.0.4 ALFA version of my program is out.
As always, I have updated my original post (at the bottom). HERE.

Two main changes:
  • the ability to manage raw streams extracted from REMUXed files (out there, into the wild) that in the past have retained the stream relating to the Enhancement Layer.
  • given the requests of different users, I have introduced the DEMUX function. Starting from a raw Single Track Double Layer HEVC file (BL_EL_RPU.hevc) it is possible to restore the Base Layer (BL.hevc) and the Enhancement Layer (EL_RPU.hevc)
People who are afraid of black screens with white writing (a.k.a command line), can use the handy "MUXER.bat" (the old "start_bl_el_rpu_builder.bat") and "DEMUXER.bat" files and follow the instructions on the screen.
The more practical ones can run the program with the "-h" switch and see the help output.

Considerations:
  • as for the first point, I recommend to always use the copy of your original disc. Technically speaking, REMUXed files may have lost important information during their creation. So a 1:1 copy of a BD disc may be different than a 1:1 copy of a REMUXed file. Take a look at the counters: if the total number of Access Units of BL Layer is different from that of EL Layer (the numbers you see in parentheses), it is likely that the file obtained does not work correctly (especially if the difference is greater than 1).

    WARNING
    Out of curiosity, I tested my program using a REMUXed mkv (Birds of Prey) that can be found "into the wild".
    The first video stream is already a BL_EL_RPU stream (evidently they used the latest version of MakeMKV) and then they added a second video stream which is actually the Enhancement Layer.
    A mess...

    If you mux (using my program) these anomalous video streams you will create a file with duplicate layers (because part of them were already present in the first stream which, strictly speaking, should be the Base Layer and not Base Layer + Enhancement Layer).

    Pay attention to the REMUX (with two video streams) created after the release of the latest version of MakeMKV (v1.15.1).

    The good news is that, if you notice it before making a mess, you can directly import the REMUX file into tsMuxer and tick only the box of the first video stream!
  • As for the second point, if you intend to use the DEMUX function starting from REMUXed files (even those created with the latest version of MakeMKV), in case you want to recreate a BL_EL_RPU.hevc file you MUST NECESSARILY use version 0.0.4 ALFA of my program. Previous versions (<= 0.0.3) will not be able to complete the analysis and writing cycle of the file.
  • It's an experimental version, there are likely to be errors in the code ( :mrgreen: ).
    If you provide me with relevant feedback, I will try to improve it!


First a very big thank you for the new tool.
I am going to try the Demux tool. Once demuxed how can I mux again with the new Alfa tool in -mode 2 (BL+RPU)?

Edit: Demuxed Cold Pursuit BL_EL_RPU and got BL and EL_RPU. Muxed this 2 files with your new tool in -mode 2 and the muxed file in tsmuxer profile5 (single layer). This final file works beautifully in Apple 4k via Infuse app with DV and LPCM audio.
Thank you maestro, you are a genius. :D :D :D
Trying to achieve this but unfortunately level is grayed out for me - is there something obvious I am missing?
Annotation 2020-05-31 232956.png
Annotation 2020-05-31 232956.png (14 KiB) Viewed 17671 times
sonysg
Posts: 8
Joined: Tue May 26, 2020 5:10 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sonysg »

Woodstock wrote:
Mon Jun 01, 2020 2:06 am
Subtitle types you can put in an MP4 file are very limited. Other than timed text and closed captioning, everything else depends on the player understanding a non-standard extension.
I see I hope future improve version of makemkv could support different type of subtitle format
jlpsvk
Posts: 50
Joined: Thu Sep 06, 2018 11:33 am

Re: Dolby Vision now possible through MP4 Mux.

Post by jlpsvk »

chrisandy wrote:
Mon Jun 01, 2020 6:36 am

Trying to achieve this but unfortunately level is grayed out for me - is there something obvious I am missing?

Annotation 2020-05-31 232956.png
Don't download latest nigthly of tsMuxer, but this one:

Code: Select all

https://bintray.com/justdan96/tsMuxer/tsMuxerGUI-Nightly/2020-03-30--02-11-36#files
it will create dvhe.05 instead dvhe.06... :)
Post Reply