TrueHD+AC3 file gap processing?

DAE avatar
von Suppé
Posts: 21
Joined: Mon Dec 06, 2021 3:16 am

TrueHD+AC3 file gap processing?

Post by von Suppé »

Hi Rocky,

Sorry if this has been dealt with earlier. Only having used DGDemux GUI, I just learned that there's no gap processing when not splitting TrueHD and embedded AC3. As confirmed in your txt file.
Is there any chance this becomes available, or is this plainly not possible?
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

It's certainly possible. Will look into it and report back.
DAE avatar
von Suppé
Posts: 21
Joined: Mon Dec 06, 2021 3:16 am

TrueHD+AC3 file gap processing?

Post by von Suppé »

Thanks, Rocky.

Reason I'm asking is I want to rule out any issues when importing the demuxed streams into tsMuxer for remux. As you know for (UHD)BD it's mandatory to have an embedded AC3 track, of course I can let eac3to create a legacy AC3 stream from TrueHD and interleave as thd+ac3 output. But I'd find it more proper and convenient when DGDemux could do the same with both filegap-processed THD and AC3 from the source.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

I'm feelin ya.
DAE avatar
von Suppé
Posts: 21
Joined: Mon Dec 06, 2021 3:16 am

TrueHD+AC3 file gap processing?

Post by von Suppé »

Actually, I'm glad you do.

Latest versions of tsMuxer regarding remuxing Dolby Vision seamless branched discs are a topic of talk. I haven't recently checked behaviour for myself, but certain (or other) issues may have risen since tsMuxer has undergone efforts to get TrueHD and EAC3 "only" working. So without embedded AC3.
Also MakeMKV is mentioned to not always being able to spit out proper result when handling seamless branched DV discs. Of course double audiotracks wouldn't be of any concern with mkv. But when I'd choose to go BD remux instead, I'm gonna need the track with embedded AC3.
I just wanna be fool-proof with importing elementary streams in any tool, actually. And I blindly trust you when you could say that DGDemuxed "double" audiotracks are 100% issue-free.
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

TrueHD+AC3 file gap processing?

Post by Sherman »

Mr vS, could you live with a utility that merges the separately demuxed TrueHD and embedded AC3 streams? That seems like the quickest and easiest thing to do, and it could be useful elsewhere (Rocky's idea). Honestly, I'm surprised no-one has done this yet.
DAE avatar
von Suppé
Posts: 21
Joined: Mon Dec 06, 2021 3:16 am

TrueHD+AC3 file gap processing?

Post by von Suppé »

I already had the idea that gap processed TrueHD+AC3 might come down to a two-step of first demuxing and then remuxing again.
The suggested tool is something I could totally live with.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Great, then here you go:

http://rationalqm.us/misc/thdmerge.zip

Syntax:

thdmerge thd_file ac3_file merged_file

The input files are the gaps-corrected files created by DGDemux or DGIndexNV. Didn't try to remux it with tsmuxer, but it's tested by dropping the merged file into mkvtoolnix, seeing both streams listed, and making an MKA. The MKA plays fine in MPC-HC and allows to select either the thd or ac3 stream. The bluray spec does not specify how the streams are to be interleaved, so did something sensible and it seems OK.

Lemme know how it goes.
DAE avatar
von Suppé
Posts: 21
Joined: Mon Dec 06, 2021 3:16 am

TrueHD+AC3 file gap processing?

Post by von Suppé »

First tests show the tool working like a charm. Importing and muxing raise no issues using tsMuxer and MKVToolnix. Resulting files show no playback problems on both pc and at least three standalone mediaplayers. MediaInfo of resulting file shows exact same properties as those of a directly demuxed thd+ac3 track. Will do further testing. Of course, will try it out on a burned bluray video disc to see how my player reacts. Will let you know of course.

Thanks so much for this cute little gem, Rocky :bow:
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Music to my ears. Thank you for your testing.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Released as version 1.1. It is included in the distribution for DGDemux 1.0.0.59. Marking resolved.
DAE avatar
Guest

TrueHD+AC3 file gap processing?

Post by Guest »

About new option, rejoin thd+ac3
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

gonca wrote:
Tue Mar 08, 2022 7:03 pm
About new option, rejoin thd+ac3
When I get the time and energy.
DAE avatar
von Suppé
Posts: 21
Joined: Mon Dec 06, 2021 3:16 am

TrueHD+AC3 file gap processing?

Post by von Suppé »

First quick & dirty tests with TrueHD+AC3 authored and burned to BD video show no issues. Discs play like a charm on my standalone blu-ray player.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

gonca wrote:
Tue Mar 08, 2022 7:03 pm
About new option, rejoin thd+ac3
On second thought I don't understand you. Please explain your point. If you are talking about automatic invocation in DGDemux/DGIndexNV, then I will do that when I have time and energy. For now, it is manual.

@von Suppé

Thank you for your testing.
DAE avatar
Guest

TrueHD+AC3 file gap processing?

Post by Guest »

Rocky wrote:
Wed Mar 09, 2022 7:25 am
gonca wrote:
Tue Mar 08, 2022 7:03 pm
About new option, rejoin thd+ac3
On second thought I don't understand you. Please explain your point. If you are talking about automatic invocation in DGDemux/DGIndexNV, then I will do that when I have time and energy. For now, it is manual.
Yep, automatic invocation.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

OK, thank you.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

For the automatic invocation, how about this? Get rid of the 'do not split THD' option, and generate gaps corrected file.thd, file.ac3, file.thd+ac3. Then the user uses what he wants. It's more disk space but I think we can live with it.

The 'no gaps processing' option would remain.
DAE avatar
Guest

TrueHD+AC3 file gap processing?

Post by Guest »

Sounds good, and disk space is not that expensive.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

All righty then, that's what I will do. Thank you.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

I've got it working for DGDemux. Will slipstream tomorrow.
DAE avatar
Guest

TrueHD+AC3 file gap processing?

Post by Guest »

Good stuff. :hat:
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Better get some testing before releasing, as changes are nontrivial. Your results will be appreciated.

The 'do not split THD' option is removed and for each THD stream 3 gaps-corrected files are generated: THD, AC3, THD+AC3.

http://rationalqm.us/misc/DGDemux_test.zip
DAE avatar
Guest

TrueHD+AC3 file gap processing?

Post by Guest »

Looks good and seems to work right
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

TrueHD+AC3 file gap processing?

Post by Rocky »

Thank you. Forgot to mention that there is no truncate option. I was wondering, though, if one day somebody is going to say "I just want the raw thd+ac3as demuxed from the disk, rather than re-created." The point is that the interleaving of the thd+ac3 is probably going to be different between the two. My reaction to that is who cares? And getting the raw is going to miss gaps correction. So disinclined to do anything about that.
Post Reply