[RESOLVED] Seamless branching issues?

Support forum for DGDecNV
DAE avatar
renols
Posts: 149
Joined: Tue Feb 22, 2011 2:34 am

[RESOLVED] Seamless branching issues?

Post by renols »

Hi.

Disney have just released a bunch of their animation movies on 4k. I got one of them, Cars 2, and wanted to make a compressed mkv file for my home system, while leaving the physical disk on my shelf.

This disk however has no less than 74 m2ts files in the english playlist. Yes, 74.

When I demux the video and the audio with dgdindexnv I end up with a h265 file a thd file, an a3c file named embedded, and a bunch of other ac3 files. And also some .sup files.

If I take these files and mux them together with mkvtoolnix and play back the file, the thd file seems to be in perfect sync, and the subs also seems to be in perfect sync. But the embedded ac3 file is in sync at the start, but at the end they are several seconds out of sync.
Whats strange about this mux is that my player, MPC-HC reports a thd and two ac3 files, eventhough I have only muxed in the thd file and the embedded ac3 file. I am not quite sure why MPC-HC shows 2 ac3 files. I can choose both, and one is way louder than the other.

I believe that is is related to the huge number of m2ts files. I don't have the technical knowledge about ac3 to speculate as to what might happen.

If i use eac3to to demux video and audio, I end up with a h265 file, a thd+ac3 file and a bunch of other ac3 files and sup files.
With this mux my player MPC-HC only shows a thd file and one ac3 file as expected.

If I mux those files with mkvtoolnix I end up with an mkv file where both the thd and the ac3 audio are in sync all the way through, but the subs are out of sync (which we have established aerlier and fixed in dgindexnv).

If I open the files in mediainfo, it only shows the thd file and one ac3 file for each of the muxed mkv files.

The source is more than 65 GB. It has been decrypted with makemkv to be able to get files that I can work with. Otherwise I am not able to make a x265 compressed mkv for my home system.

If I can help in any way to figure out whats going on just let me know.

If this is out of the scope of dgindexnv, because I am using decryppted data from a disk I have bought, then just delete the message.
I don't have 65 GB of space on my home system to store each 4k movie though, so I have to make them smaller.

I am using degdec 186.

renols
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

Can you please give me a link to purchase the exact same disk you have? Will I need a UHD capable drive to rip it with MAKEMKV?
DAE avatar
renols
Posts: 149
Joined: Tue Feb 22, 2011 2:34 am

Re: Seamless branching issues?

Post by renols »

Hi.

I bought it from amazon.com.

https://www.amazon.com/CARS-Blu-ray-Lar ... 223&sr=8-1

It has English Dolby Atmos and Spanish Dolby Digital Plus audio tracks.

To decrypt it you need a UHD "friendly" drive. I bought mine long ago, so haven't really followed which ones are "friendly" now.
But I can look at makemkv forum and see if I can figure out which one would suffice.

Thank you very much for looking into it.

renols
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

UHD friendly drive and that disk are now on order for debugging.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

Disk arrived. Drive arrived DOA, have to get it replaced.
DAE avatar
renols
Posts: 149
Joined: Tue Feb 22, 2011 2:34 am

Re: Seamless branching issues?

Post by renols »

Sorry to hear that drive didn't work.

Hopefully the next one will work.

renols
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

If not, I will take up your offer to provide the stream. I need to have UHD capability in house.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

Replacement disk is in hand. I'll install it tonight and try to rip it.
DAE avatar
renols
Posts: 149
Joined: Tue Feb 22, 2011 2:34 am

Re: Seamless branching issues?

Post by renols »

Sounds great.

Hope you get the same result as I did, so we can get it sorted :-)

renols
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

Drive seems to be working. Please tell me in detail how to rip it and then reproduce your issue. I'm guessing AnyDVD. If so I'll have to get that as well. I've been meaning to get AnyDVD in any case but the bitcoin nonsense was an obstacle. They have a 21 day trial so that may be enough.
DAE avatar
Guest

Re: Seamless branching issues?

Post by Guest »

How to rip it
Easy way
Install MakeMKV
Set it up, make sure Allow contacting web server for updates

Launch MakeMKV
Put disc in drive
Select folder back up (2nd icon from left, I believe)
Name it and go

Issue is up to renois to describe
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

Thank you, gonca!
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

It's ripping. Whee!

Boatloads of tiny M2TS files. :wow:
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

What is this LibreDrive stuff? Found links saying we need LibreDrive support to rip UHD disks. But MakeMKV reports LibreDrive is not supported for my drive but goes ahead and rips the disk. :scratch:
DAE avatar
renols
Posts: 149
Joined: Tue Feb 22, 2011 2:34 am

Re: Seamless branching issues?

Post by renols »

Hi.

Download makemkv and use that to decrypt the disc.

You should end up with a folder with all the files decryted. From there on it is just the same as working with "normal" bluray disk (more or less).

At least in dgindexnv there is no difference wether you index a decryoted 4k disk or a bluray disk.

What I did was to open the english mpls file in dgindexnv and then indexed both the video, audio (truehd) and subs.

Then I used mkvtoolnix to mux the h265 file and the truedhd and embedded ac3 file into an mkv file.

After that the mkv file when played back in MPC-HC showed the truehd and 2-3 ac3 streams. Eventhough I only added the embedded AC3 in the mux.

The truehd stream was in perfect sync, but the AC3 file was ok at the start, but got worse and worse out of sync throughout the movie.

If I used eac3to to demux to thd+ac3 and muxed that file into an mkv file only one AC3 stream would show up in MPC-HC and both truehd and AC3 would be in sync throughout. With eac3to the subs would be quite a bit out of sync towards the end, whereas they were in perfect sync with the files from dgindexnv.

It looks as if for some reason the number of m2ts files in the mpls causes som problem when creating the embedded ac3 file.

Hope that the above helps. The entire idea was to encode it to smaller size to save space, but then I noticed the out of sync issue, and put that on pause for now.

renols
DAE avatar
Guest

Re: Seamless branching issues?

Post by Guest »

LibreDrive
https://www.makemkv.com/forum/viewtopic ... 19&t=18856
and
https://www.makemkv.com/forum/viewforum ... b6a795e267

What drive did you get, firmware as well, if you don't mind my asking

P.S.
Are you sure LibreDrive mode is not supported?
Reason I ask is that there are some features, like unrestricted read speed, which are not yet supported but the drive in general is.
You do have the "Decryption" checkbox marked?
DAE avatar
Guest

Re: Seamless branching issues?

Post by Guest »

renols
Try to re multiplex the mpls directly with MKVToolNix and see if the problem is still there
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

Thank you guys for your posts and information. Very helpful!

I'll tell you how things currently work or don't work, and then we'll decide where to go. I'm not very interested in what other tools are doing.

When we demux multiple M2TS files we can run into desync because the granularity of the audio is not the same as that of the video. So each M2TS file gap can contribute to a desync. DGIndexNV knows about this but only for pure AC3 files (not embedded AC3). The Cars 2 disk has a THD stream, an AC3 stream embedded in the THD, two EAC3 streams, and three pure AC3 streams. DGIndexNV includes special processing to adjust for file gaps, but only for pure AC3 streams. It currently has not been coded for the THD stream, the embedded AC3 stream, and EAC3 streams. To be honest, I don't know why the THD file is not affected by the gaps. I'll look into it but we can be thankful!

If you use DGIndexNV to demux everything and then use mkvtoolnix to mux the HEVC stream and a given audio, one can test whether that audio file was properly demuxed. Here are my results for Cars 2:

HEVC stream muxed with...
THD: good sync throughout
Embedded AC3: bad sync at end
pure AC3: good sync throughout
EAC3: bad sync at end

It appears that I can easily add this processing for the EAC3 streams. Then we would have a situation where only the embedded AC3 stream is problematic. For technical reasons, it's not easy to treat it as we treat the pure AC3 streams, but I don't think it is impossible to do gaps processing on embedded AC3 streams.

So, my plan:

1. Support the EAC3 audio for gaps processing.
2. Look into supporting the embedded AC3 stream for gaps processing.
3. Out of curiosity, look into THD streams versus gaps processing.

I'll answer the questions about my drive, etc., tomorrow.

@renols

At least for Cars 2, you do not have to use the embedded AC3, as there is a pure AC3 stream you can use that is in sync. That seems like a viable workaround until I get gaps processing working for all streams.

Congratulations on attaining Distinguished Member status. We are lucky to have you. :salute:
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

gonca wrote:
Wed Oct 02, 2019 5:15 pm
renols
Try to re multiplex the mpls directly with MKVToolNix and see if the problem is still there
Even if it is OK we would want to fix DGIndexNV demuxing.
DAE avatar
Guest

Re: Seamless branching issues?

Post by Guest »

Was actually meant to see if problem was in DGDecNV or elsewhere, now we know
FYI Disney movies tend to be like this
As for your drive
It decrypted fine so all is good
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

@gonca

Gotcha. Quite right.

The drive is an ASUS BC-12D2HT. Not sure what firmware it has, nor how to query that. It was pre-flashed by the vendor ClonerAlliance and advertised as "UHD friendly". That appears to be true. Nevertheless, MakeMKV says that the drive firmware is "not updated for LibreDrive". Seems to not matter; good enough for us.

@all

Extending M2TS file gaps processing to EAC3 was a tad harder than expected. You have to allow for the presence of an AC3 core, other substreams, and numblkscod (number of blocks per frame). I do have it working with the EAC3 streams from the Cars 2 disk.

So now we just need to consider the THD embedded AC3; everything else from the Cars 2 disk is in sync with the change just described. Looking into the embedded AC3 case now.

Let's first slipstream this EAC3 demux fix together with some improvements to the HDR to SDR dialog.

Meanwhile, very happy that we are beating EAC3TO for SUP file demuxing in this use case. 8-)
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

Just in case you are curious the current dinner plate includes the following delicacies:

1. Complete audio demuxing fixes stemming from renols's report (THD embedded AC3).
2. Fix an issue with DGIndexNV's handling of start codes split between transport packets (rare but we like to be fully correct and robust).
3. Implement 2390 target display scaling for PQ (EETF) in DGHDRtoSDR (and DGIndexNV), as pointed out by Bullwinkle.
4. Other things like export resize settings, free zoom in the GUI, etc.

Whee!
User avatar
Bullwinkle
Posts: 338
Joined: Thu Sep 05, 2019 6:37 pm

Re: Seamless branching issues?

Post by Bullwinkle »

ha. people say I am correct and robust. snort!

all this drop audio frames nonsense is a fart of the you-know-what. repeat video frames when needed no BIG deal (repeat flags in the video ES duh). people call me a big deal get used to it.

wanna stick to the little deal then just map the embedded ac3 to an auxiliary audio[] entry you already know that. warts warts warts should I say whee?

even hoomans know audio interruptions are more startling than video ones

moose regards to culture lovers everywhere.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Re: Seamless branching issues?

Post by Rocky »

That's great, Bullwinkle, but only if all the audio streams need the same adjustment. Is that always true? And is it so easy to insert repeat flags?
User avatar
Bullwinkle
Posts: 338
Joined: Thu Sep 05, 2019 6:37 pm

Re: Seamless branching issues?

Post by Bullwinkle »

Exercises are for students. The details. Move on. This is more EXCITING trigger warning!

https://www.youtube.com/watch?v=9xZdWhVQ4RU

Turn up the volume!!!
Post Reply