Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

Silergo wrote:
Mon Sep 02, 2019 1:16 pm
The only difference between our files is Mastering display luminance. Is it really give affect for playback?
Color space and luminance range can affect playback on some devices (you should read THIS post). There is also the fact that the DVDFab algorithm is not the "standard way" to obtain a proper mp4 DV mux.
tr000
Posts: 71
Joined: Thu Jul 18, 2019 11:03 am

Re: Dolby Vision now possible through MP4 Mux.

Post by tr000 »

Wow, much progress being made. I have extensive knowledge in this area but it seems @yusesope's got the bases covered here! Currently, I have been enjoying Dolby Vision quite nicely on my TCL TV. It took a https://www.makemkv.com/forum/viewtopic ... 358#p76356 lot of growing pains but I've finally reached a state of relative zen with regards to DV where it once gave me migraines and the plague. I've surmised my TV only supports profile 5, and also supports E-AC3 but as to whether lossless audio packaged in a E-AC3 format works (Meridian), I don't think so, but I'll have to test it. I'm pretty sure it threw an error when I tried but that was a while ago.

Regarding my experiences with DV, DVDFab's Profile 5 conversion was atrocious for Godzilla: King of the Monsters, I don't know if this is the Roku Media Player's fault but every so often it would stop showing subtitles, the video would get wonky, and it would say "loading..." forever. I then had to restart the video and precisely fast forward to just after the glitched part and it'd play fine. Happened at three or four points.

Next, Dolby MP4 Muxer. I took a raw .m2ts from The Secret Life of Pets 2 Blu-ray, converted the True-HD Atmos to AC3, got the base layer and enhancement layer and used dv-profile-5. This played perfectly on my TV, and it was honestly such a relief to not have to be worried about something going wrong while the family was watching and having to hear them groan as I try to remedy the issue as a result of my insatiable desire to experience everything in the best quality possible. However, the video did get a little jerky towards the end of the film. It'd hang for a split second like every third frame or so. Not enough to cause major disturbance, but passable.

Right now, I've just obtained John Wick 3 and am using the tool made by @Grencola. I tried it on a Blu-ray of Transformers a couple weeks ago and while it played it gave me that loading issue at certain points, except it would just refuse to play after a certain point. I had to do the manual MP4 Mux to get a working version. Let's see how this turns out, maybe it'll produce a perfect file. Would save me a lot of trouble.
Last edited by tr000 on Fri Sep 06, 2019 2:29 am, edited 1 time in total.
Strange Design
Posts: 2
Joined: Thu Sep 05, 2019 11:25 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Strange Design »

yusesope wrote:
Sun Sep 01, 2019 11:16 am
You just gave me an idea.
Instead of using a simple USB device, why not build a SMART USB device!

Image

The new Raspberry pi 4 (like the old models A, A+ and Pi Zero) implements a USB (Type-C) On-The-Go (OTG. Official info HERE). It would thus be possible to connect devices that do not have the ability to use network protocols directly to a NAS/Server (Samba, NFS, etc...).
Another advantage could be that you don't have to wait two weeks before data transfer it's over (mechanical Hard Disk, slow USB 3.0 Transfer, etc...).
Some devices also do not allow playback of certain video/audio formats over DLNA; others may present bugs.

More information HERE and HERE (post number 10 is enlightening) in case anyone's interested.

I wish you all a good day!
This would be a major time saver for my use case (dual-layer DV playback on a Phillips BDP-7502 as an AVCHD folder via USB). I read the links you posted but my Linux troubleshooting ability is limited, so I’m curious if you were able to get it working. Thanks in advance.
seleste
Posts: 9
Joined: Thu Sep 05, 2019 3:20 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by seleste »

First would like to thank everyone on this forum for their invaluable input, and yusesope for the Dolby Vision muxing technique.
I successfully did couple of dual layer mp4 for myself, those play on LG OLED65C perfectly.

However, as I started deepening into the process, some issues emerged, and I need help or advice.
I did everything by the instruction
1. used ffmpeg ro demux BL, EL and some AC3 audio
2. muxed dual video in mp4muxer
3. used mp4box to mux together mp4muxer output with more-than-one AC3.
The mp4box ended with no errors, MediaInfo shows every track in the final dual layer mp4, and when I play it on TV the first AC3 plays fine, but after switching to the second AC3 - there is no sound. Switched back to the first audio, that was just played fine - no sound there neither.
I acidentally discovered how to get either audio back without re-starting mp4 - if I move video one step forward or backwards with remote, the sound re-appears on either AC3 track.
Is that sound issue because I did something wrong muxing in mp4box, and now my TV has issues with that?
Here's my mp4box code, I put it inside of .bat file and execute by double clicking.

Code: Select all

mp4box.exe -add L:\input_video.mp4:rate=0 -add L:\main_audio.ac3#audio:lang=en-US -add L:\comm.ac3#audio:lang=en-US -name 4="Commentary by director" -no-iod -tmp D:\ final_with_comm.mp4
I also tried muxing the first AC3 with BL and EL in mp4muxer, and then adding the second AC3 in mp4box, but that didn't fix the audio switching issue.
tr000
Posts: 71
Joined: Thu Jul 18, 2019 11:03 am

Re: Dolby Vision now possible through MP4 Mux.

Post by tr000 »

seleste wrote:
Thu Sep 05, 2019 4:27 pm
First would like to thank everyone on this forum for their invaluable input, and yusesope for the Dolby Vision muxing technique.
I successfully did couple of dual layer mp4 for myself, those play on LG OLED65C perfectly.

However, as I started deepening into the process, some issues emerged, and I need help or advice.
I did everything by the instruction
1. used ffmpeg ro demux BL, EL and some AC3 audio
2. muxed dual video in mp4muxer
3. used mp4box to mux together mp4muxer output with more-than-one AC3.
The mp4box ended with no errors, MediaInfo shows every track in the final dual layer mp4, and when I play it on TV the first AC3 plays fine, but after switching to the second AC3 - there is no sound. Switched back to the first audio, that was just played fine - no sound there neither.
I acidentally discovered how to get either audio back without re-starting mp4 - if I move video one step forward or backwards with remote, the sound re-appears on either AC3 track.
Is that sound issue because I did something wrong muxing in mp4box, and now my TV has issues with that?
Here's my mp4box code, I put it inside of .bat file and execute by double clicking.

Code: Select all

mp4box.exe -add L:\input_video.mp4:rate=0 -add L:\main_audio.ac3#audio:lang=en-US -add L:\comm.ac3#audio:lang=en-US -name 4="Commentary by director" -no-iod -tmp D:\ final_with_comm.mp4
I also tried muxing the first AC3 with BL and EL in mp4muxer, and then adding the second AC3 in mp4box, but that didn't fix the audio switching issue.
Have you tested to see if the second AC3 works in a basic transport stream?
seleste
Posts: 9
Joined: Thu Sep 05, 2019 3:20 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by seleste »

tr000 wrote:
Fri Sep 06, 2019 2:28 am
seleste wrote:
Thu Sep 05, 2019 4:27 pm
First would like to thank everyone on this forum for their invaluable input, and yusesope for the Dolby Vision muxing technique.
I successfully did couple of dual layer mp4 for myself, those play on LG OLED65C perfectly.

However, as I started deepening into the process, some issues emerged, and I need help or advice.
I did everything by the instruction
1. used ffmpeg ro demux BL, EL and some AC3 audio
2. muxed dual video in mp4muxer
3. used mp4box to mux together mp4muxer output with more-than-one AC3.
The mp4box ended with no errors, MediaInfo shows every track in the final dual layer mp4, and when I play it on TV the first AC3 plays fine, but after switching to the second AC3 - there is no sound. Switched back to the first audio, that was just played fine - no sound there neither.
I acidentally discovered how to get either audio back without re-starting mp4 - if I move video one step forward or backwards with remote, the sound re-appears on either AC3 track.
Is that sound issue because I did something wrong muxing in mp4box, and now my TV has issues with that?
Here's my mp4box code, I put it inside of .bat file and execute by double clicking.

Code: Select all

mp4box.exe -add L:\input_video.mp4:rate=0 -add L:\main_audio.ac3#audio:lang=en-US -add L:\comm.ac3#audio:lang=en-US -name 4="Commentary by director" -no-iod -tmp D:\ final_with_comm.mp4
I also tried muxing the first AC3 with BL and EL in mp4muxer, and then adding the second AC3 in mp4box, but that didn't fix the audio switching issue.
Have you tested to see if the second AC3 works in a basic transport stream?

Yes, plays perfectly fine in mkv, also would play fine if placed as the only audio, or the first audio stream in mp4.
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

Strange Design wrote:
Thu Sep 05, 2019 11:43 am
This would be a major time saver for my use case (dual-layer DV playback on a Phillips BDP-7502 as an AVCHD folder via USB). I read the links you posted but my Linux troubleshooting ability is limited, so I’m curious if you were able to get it working. Thanks in advance.
I don't own a Raspberry Pi 4 and I can't say with absolute certainty that the procedure works (my concern is about the size of the virtual disk to be mounted with g_mass_storage) but you'll never know if you don't try! My suggestion is to give it a shot: at worst you will have spent only a few euros/dollars. The community that revolves around Rasperry Pi is however very active and in case of problems, I am sure that you will be provided with valid advice!
seleste wrote:
Thu Sep 05, 2019 4:27 pm
However, as I started deepening into the process, some issues emerged......with more-than-one AC3.
Take tr000's advice and then try using only mp4muxer:

Code: Select all

mp4muxer --dv-profile 7 -i BL.hevc -i EL.hevc -i first_audio.ac3 --media-lang eng -i second_audio.ac3 --media-lang eng --mpeg4-comp-brand mp42,iso6,isom,msdh,dby1 -o DV.mp4
tr000
Posts: 71
Joined: Thu Jul 18, 2019 11:03 am

Re: Dolby Vision now possible through MP4 Mux.

Post by tr000 »

tr000 wrote:
Thu Sep 05, 2019 7:48 am
Right now, I've just obtained John Wick 3 and am using the tool made by @Grencola. I tried it on a Blu-ray of Transformers a couple weeks ago and while it played it gave me that loading issue at certain points, except it would just refuse to play after a certain point. I had to do the manual MP4 Mux to get a working version. Let's see how this turns out, maybe it'll produce a perfect file. Would save me a lot of trouble.
Good news, Grencola’s tool worked perfectly. No errors at all on John Wick 3: Parabellum (excellent film by the way). I just modified the .exe in WinRAR to do dv-profile-5 instead of 7. I think the issue I had last time with the tool was that I was using a REMUXed .mkv and not the raw .M2TS, though the tool claims to work with both. @yusesope, do you have any idea why this is? I've always had issues with DV on remuxes and have resorted to always getting full Blu-ray .m2ts's.
yusesope wrote:
Fri Sep 06, 2019 7:12 am
Take tr000's advice and then try using only mp4muxer:

Code: Select all

mp4muxer --dv-profile 7 -i BL.hevc -i EL.hevc -i first_audio.ac3 --media-lang eng -i second_audio.ac3 --media-lang eng --mpeg4-comp-brand mp42,iso6,isom,msdh,dby1 -o DV.mp4
What's the comp-brand flag doing? Is there documentation of all the options for it? As I see it it's defining format/features?
seleste
Posts: 9
Joined: Thu Sep 05, 2019 3:20 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by seleste »

yusesope wrote:
Fri Sep 06, 2019 7:12 am
seleste wrote:
Thu Sep 05, 2019 4:27 pm
However, as I started deepening into the process, some issues emerged......with more-than-one AC3.
Take tr000's advice and then try using only mp4muxer:

Code: Select all

mp4muxer --dv-profile 7 -i BL.hevc -i EL.hevc -i first_audio.ac3 --media-lang eng -i second_audio.ac3 --media-lang eng --mpeg4-comp-brand mp42,iso6,isom,msdh,dby1 -o DV.mp4
@yusesope - thanks for the suggestion and code, I did try it..... with the same outcome as before :(
daddy
Posts: 77
Joined: Sat Jul 06, 2019 8:17 am

Re: Dolby Vision now possible through MP4 Mux.

Post by daddy »

@seleste
I have the same issue with multi audio DV mp4 files on LG C7.
Djreversal
Posts: 2
Joined: Sun Sep 08, 2019 11:13 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Djreversal »

Hey guys, just getting involved with the group here, new to all of this so trying to catch up and read as much as possible... I would love to take full advantage with and use Dolby Vision. Seems like it still might need some time but it looks like people have been successful with eArc and the current LG tvs.. my setup now is:

Lg C9
Marantz SR5014 (eArc)
Qnap 10GBE 30tb NAS to my Computer

I currently have a handful of Dolby Vision BluRays ripped into folders. Just wondering if someone can tell me the best method for this setup.. if its mkv, Dual layer vs single layer, etc. I see people going back and forth depending on what setup they need compatibility with, but this is just for my 1 tv in my house and im not sharing to other systems.


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

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

tr000 wrote:
Fri Sep 06, 2019 7:54 pm
do you have any idea why this is? I've always had issues with DV on remuxes and have resorted to always getting full Blu-ray .m2ts's.
Perhaps some valuable information is stripped out during the remuxing process. A Bluray iso instead is a perfect 1:1 bit-to-bit copy.
tr000 wrote:
Fri Sep 06, 2019 7:54 pm
What's the comp-brand flag doing? Is there documentation of all the options for it? As I see it it's defining format/features?
That's kind of what you said. (more info HERE)


seleste wrote:
Fri Sep 06, 2019 11:08 pm
thanks for the suggestion and code, I did try it..... with the same outcome as before :(
If you want, you can try another audio codec. For example, before creating a mux with mp4muxer, you can convert your ac3 track to an aac (both or just one track, the choice is yours!).

Code: Select all

ffmpeg -i input.ac3 -c:a aac -q:a 2 output.aac
After that, use the command from my previous post with the aac track/tracks instead of the ac3 one/ones.
I believe however that the issue depends on the internal TV player.



Djreversal wrote:
Sun Sep 08, 2019 11:51 am
Lg C9
Marantz SR5014 (eArc)
Qnap 10GBE 30tb NAS to my Computer

...I would love to take full advantage with and use Dolby Vision...
First of all, congratulations for the setup.
However, as far as I know, the LG C9 (the only device of your configuration capable of reproducing Dolby Vision) has some problems with lossless audio.
I invite you to read carefully pages 1 and 20 of THIS THREAD and also HERE. If you have any doubts, that's where you need to ask.
Long story short:
  • Internal TV apps (I also assume the WebOS media player) are unable to play lossless audio codecs.
  • The eARC of the TV does not support pass-through for PCM Multi-Channel audio (more HERE).
Djreversal wrote:
Sun Sep 08, 2019 11:51 am
if its mkv, Dual layer vs single layer, etc
The only container capable of hosting a Dolby Vision track is the mp4. The container in question supports all lossless codecs with the exception of Dolby ATMOS (the variant based on TrueHD).

The best you can get is therefore an mp4 file with:
  • DV + DTS-HD MA
    DV + DTS: X
    DV + PCM
You have to test various audio sources (upload demo files to a USB stick):
HERE (Dolby) and HERE (DTS) you will find everything you need.
tr000
Posts: 71
Joined: Thu Jul 18, 2019 11:03 am

Re: Dolby Vision now possible through MP4 Mux.

Post by tr000 »

yusesope wrote:
Sun Sep 08, 2019 6:43 pm
tr000 wrote:
Fri Sep 06, 2019 7:54 pm
do you have any idea why this is? I've always had issues with DV on remuxes and have resorted to always getting full Blu-ray .m2ts's.
Perhaps some valuable information is stripped out during the remuxing process. A Bluray iso instead is a perfect 1:1 bit-to-bit copy.
Could be. There is no quality loss in a REMUX but it is in fact re-encoded, even if the video is copied.
yusesope wrote:
Sun Sep 08, 2019 6:43 pm
tr000 wrote:
Fri Sep 06, 2019 7:54 pm
What's the comp-brand flag doing? Is there documentation of all the options for it? As I see it it's defining format/features?
That's kind of what you said. (more info HERE)
Here's the relevant part for anyone interested: "A brand might indicate the type of encoding used, how the data of each encoding is stored, constraints and extensions that are applied to the file, the compatibility, or the intended usage of the file."


Djreversal wrote:
Sun Sep 08, 2019 11:51 am
Lg C9
Marantz SR5014 (eArc)
Qnap 10GBE 30tb NAS to my Computer

...I would love to take full advantage with and use Dolby Vision...
Hey man, good to see you came on here from my link. We were talking on Reddit. For the C9, the best you will indeed get on a Dolby codec is probably 640KBPS AC3. Play around with the stuff yusesope mentioned, but in the meantime you can use Grencola’s tool I linked you to on some of your .m2ts files.
Djreversal
Posts: 2
Joined: Sun Sep 08, 2019 11:13 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Djreversal »

Hey man, good to see you came on here from my link. We were talking on Reddit. For the C9, the best you will indeed get on a Dolby codec is probably 640KBPS AC3. Play around with the stuff yusesope mentioned, but in the meantime you can use Grencola’s tool I linked you to on some of your .m2ts files.

Yea started digging and catching up.. Playing around with the tools and ill see how it goes, Will test it tonight and see how it goes.
box4m
Posts: 68
Joined: Tue Sep 10, 2019 7:23 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by box4m »

Sooo, its alot to read and i tried but.

What do you need to play dual layer dv mp4?
And is the single layer dv mp4 made with dvdfab the same thing?
Post Reply