TrueHD+AC3 file gap processing?

DAE avatar
BDgeek2
Posts: 18
Joined: Tue Jul 07, 2020 10:48 pm

TrueHD+AC3 file gap processing?

Post by BDgeek2 »

Thanks a lot Rocky!!! That's why DGDemux is the best!

I'll redownload and check it out today
DAE avatar
oniiz86
Posts: 26
Joined: Wed Oct 26, 2022 5:52 am

TrueHD+AC3 file gap processing?

Post by oniiz86 »

I was just wondering if the thdmerge utility has been optimised to behave like this new "interleaveDolbyStreams.py" utility listed here https://forum.doom9.org/showthread.php? ... ost1977184

Apparently the difference is how the streams are interleaved according to this post, https://forum.doom9.org/showthread.php? ... ost1977234
One difference is how the streams are interleaved. I saw this comment about how the output of thdmerge doesn’t exactly match ripped files: https://forum.doom9.org/showthread.p...47#post1965447

To investigate, I used thdmerge to create some .thd+ac3 files. I examined these test files and saw the discrepancy. In official blu-ray streams, there are 192 TrueHD access headers for every 5 AC3 frames (the only possible exception is at the end of the interleaved stream). Thdmerge starts with an error: there are 193 TrueHD access headers for the first 5 AC3 frames, and then the remaining bit stream is more correct, with 192 access headers per 5 frames, but not arranged exactly as in blu-ray.

Another difference is that thdmerge alternates reading and writing files throughout the interleaving process. I looked at the source code, and it looks like the code reads one input file, writes its data to the .thd+ac3 file, and then reads/writes for the other input file, repeating the process until reaching the end of each input file. (Thdmerge is written in C++, which isn’t my programming language, so I might be mistaken.) My interleaving script reads the entirety of the .ac3 and .thd files first, parses the data, interleaves the data, and then writes the data to the .thd+ac3 file.

The last difference I noticed is that my script doesn’t have the truncate feature that thdmerge has. I can add the truncate feature if requested.
Is there any chance of improving thdmerge to behave in a similar manner?
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

There is no specification for the interleaving and no issues have been reported with streams interleaved by thdmerge. Saying it starts with an error is unsubstantiated FUD. I have looked at many BD disks and there is no consistent pattern to the interleaving, despite what the guy claims. thdmerge merges 5GB files in less than 5-10 seconds on my system. There is no performance issue and I seriously doubt a python solution is as fast.

Use whatever you like. If you can demonstrate a true issue and not just random musings on the internet then we'll be happy to investigate and fix as needed.

This stuff we face is one of the reasons I have recently scaled back my development work. If I hadn't made thdmerge people would still be moaning about how there is no way to merge without expensive recoding. Now instead of a grateful attitude (no mention of thdmerge or DG at the git you cited), he just rips off our original concept without even a simple hat tip. He also GPL licensed it when my original is public domain. The right way is the way of domy. He clearly acknowledges my pioneering work on THD gaps correction in presenting his solution, and he fairly describes the pros and cons of each.

Thanks for the thread; vitriol not intended for you OP. Maybe it will be more interesting than Britney nostalgia. :D
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

TrueHD+AC3 file gap processing?

Post by Guest 2 »

Rocky wrote:
Thu Oct 27, 2022 10:21 am
This stuff we face is one of the reasons I have recently scaled back my development work.
Assholes are everywhere. Don't let us down. :salute:

P.S: Please post some news in the DGCube thread. I am killed by anxiety. :mrgreen:
User avatar
LastOne
Posts: 12
Joined: Thu Jul 14, 2022 10:37 am

TrueHD+AC3 file gap processing?

Post by LastOne »

Hi there,
i have the problem that DGDemux dont finishet aufter starting to fix the THD gaps.

the material has multible files (seamless) with thd and embeded ac3.

Is there a way to look why it does nit finished?

mfg
LastOne
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Make sure you have the latest version of DGDemux. Download it fresh from my website. How long have you waited? It could take up to a minute or two for a large disk and slow processsor. If you have waited long enough, please give me a link to purchase your disk that shows the problem.
User avatar
LastOne
Posts: 12
Joined: Thu Jul 14, 2022 10:37 am

TrueHD+AC3 file gap processing?

Post by LastOne »

hi,
i waited round about 15 Minutes and i used the latest version xxx63.

date: 05.12.2022
version: 1.0.0.63

i downloaded it from this website, is this what you mean?

regards
LastOne
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Latest version online is dated 12-5-2022. Assuming you are uropeon and use dates the wrong way, yes, that is correct.

Please give a link to purchase this disk.
User avatar
LastOne
Posts: 12
Joined: Thu Jul 14, 2022 10:37 am

TrueHD+AC3 file gap processing?

Post by LastOne »

Hi Rocky,
did you get the pm?
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Yes, the disk is on order.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Well, it worked just fine for me. Try checking "No preallocation", as you may be short on disk space.
User avatar
LastOne
Posts: 12
Joined: Thu Jul 14, 2022 10:37 am

TrueHD+AC3 file gap processing?

Post by LastOne »

Hi Rocky,
i will try to use it with no preallocation.

thx
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Also, does this happen only with this disk or for all your disks with THD?
User avatar
LastOne
Posts: 12
Joined: Thu Jul 14, 2022 10:37 am

TrueHD+AC3 file gap processing?

Post by LastOne »

Hi Rocky,
only for this one.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

That's a relief.
Post Reply