Feature request: Demux only TrueHD and No THD+AC3 merge

User avatar
hubblec4
Posts: 221
Joined: Tue May 02, 2023 6:03 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by hubblec4 »

While implementing DGDemux in cE, I found an interesting behavior for the THD+AC3 streams.

DGDemux extract first both ES's(THD and embedded AC3) and perform than a merge process.
eac3to and TsMuxeR extract the full THD+AC3 ES directly.

MKVToolNix(MTX) separates this combined stream into two independent streams again,
because Matroska don't support a combined THD+AC3 stream.
MTX presents for the m2ts files also an extra stream for each embedded AC3 of a TrueHD stream.

For the finial MKV I use always only the TrueHD ES. The embedded AC3 is not necessary for playback for the TrueHD stream. (others than as with DTS-HD and the DTS-Core)

That means, DGDemux could omit the THD+AC3 merge, because all what I need is already there.
That would save a lot of write processes on the hard drive and my SSD would be happy.

To save more write processes, DGDemux could also omit the embedded AC3 file creation.

I have two switches in my mind.
"-noTHDmerge" both streams will be only extracted
"-onlyTHD" extract only the THD ES and logical there is no THD+AC3 merge
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by SomeHumanPerson »

It's funny that the THD merge was a requested feature not that long ago, but I also find it annoying as the default because I always have to delete it.

If those two switches are not too much effort to implement, I would find them helpful too.
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

How about a dropdown labeled 'THD Processing' with three choices:

Full
Only THD (also implies no merge)
No THD/AC3 Merge
User avatar
hubblec4
Posts: 221
Joined: Tue May 02, 2023 6:03 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by hubblec4 »

Rocky wrote:
Sat Jul 01, 2023 6:14 am
How about a dropdown labeled 'THD Processing' with three choices:
...
That is for the GUI, right? It looks fine to me.
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

Yes. For the CLI you would have something like '-thd n' where n specifies the selection:

0: full (default)
1: only THD
2: no merge

OK?
User avatar
hubblec4
Posts: 221
Joined: Tue May 02, 2023 6:03 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by hubblec4 »

Yes, that's also fine to me.
Only one new switch.
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

Yes, only one. We're running out of real estate on the GUI. ;)

I should have a test version later today.
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

Please redownload the test version.

-thd 0 -- full
-thd 1 -- no ac3
-thd 2 -- no merge

Your test results will be appreciated. Next step is to add support to the GUI.
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by SomeHumanPerson »

I tested this on two discs (Uncharted USA UHD-BD with TrueHD 7.1/Atmos and Yojimbo JPN 'Toho' 2009 Blu-ray with "ordinary" TrueHD 5.1) and it worked as advertised for both.
However, may I propose a slight adjustment to the ordering of the options? It seems more intuitive to me to put "no merge" in the middle (i.e. -thd 1).

That gives you a hierarchical ordering with respect to what is created: 0 = "AC3 + merge" --> 1 = "AC3 only (no merge)" --> 2 = "no AC3".

Maybe I'm too OCD... :ugeek:

EDIT: On a tangential note, if you ever need to make room for more options in the GUI, it wouldn't hurt my feelings at all to see the "command line" box extended by another line or two. With long-ish paths it's easily filled at the current size (i.e. needs scrolling to see the most useful information which is all at the end). I don't know what your other constraints are on the chosen window size, though.
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

Thank you for your testing.
SomeHumanPerson wrote:
Sat Jul 01, 2023 11:45 am
However, may I propose a slight adjustment to the ordering of the options? It seems more intuitive to me to put "no merge" in the middle (i.e. -thd 1).
Makes sense. Let's see if I can eat enough acorns today to generate the requisite energy, after I have just modified DGDemuxGUI too.
On a tangential note, if you ever need to make room for more options in the GUI, it wouldn't hurt my feelings at all to see the "command line" box extended by another line or two. With long-ish paths it's easily filled at the current size (i.e. needs scrolling to see the most useful information which is all at the end). I don't know what your other constraints are on the chosen window size, though.
It's possible, but let's see when and if new options are required. At some point, a settings page may be what the doctor orders.

Please try to have your OCD moments while the proposal is still in the "is it OK?" stage. :salute:
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by SomeHumanPerson »

Rocky wrote:
Sat Jul 01, 2023 12:01 pm
Please try to have your OCD moments while the proposal is still in the "is it OK?" stage. :salute:
You're too quick for me on the long weekend (I presume it is for you too with the 4th on Tuesday). Forget the acorns, I think you need a big ol' box of fireworks and an open field!
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

SomeHumanPerson wrote:
Sat Jul 01, 2023 12:39 pm
I presume it is for you too with the 4th on Tuesday
:?: no comprende
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by SomeHumanPerson »

Sorry, I'm making some assumptions... 1) that you are American, and 2) that July 4th is treated similarly to our July 1st (Canada Day) in creating a de facto long weekend even if it falls mid-week (i.e. most businesses close for the nearest Monday or Friday).

Neither of those may be correct.

Also I just remembered that you're presumably (hopefully) happily retired at this point.
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

I see. My brain is too active to sit idle for 4 days. ;)
User avatar
hubblec4
Posts: 221
Joined: Tue May 02, 2023 6:03 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by hubblec4 »

Downloaded and tested. It works perfect! Many thanks.

Maybe you could add one more option?

What is when a user only needs the embedded AC3 stream?
It is much work to add an option "only AC3"?
User avatar
hubblec4
Posts: 221
Joined: Tue May 02, 2023 6:03 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by hubblec4 »

SomeHumanPerson wrote:
Sat Jul 01, 2023 11:45 am
However, may I propose a slight adjustment to the ordering of the options? It seems more intuitive to me to put "no merge" in the middle (i.e. -thd 1).

That gives you a hierarchical ordering with respect to what is created: 0 = "AC3 + merge" --> 1 = "AC3 only (no merge)" --> 2 = "no AC3".
Yes that makes indeed sense to change the order. (and I guess you mean: 1 = THD only, not AC3 only)

With the new Option for "only AC3", this is my suggestion

-thd 0 = full
-thd 1 = no merge (extract both streams)
-thd 2 = no AC3 (THD only)
-thd 3 = only AC3 (no THD stream)
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

For technical implementation reasons I will not do an 'AC3 only' option. I will change the order as requested, however.
User avatar
hubblec4
Posts: 221
Joined: Tue May 02, 2023 6:03 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by hubblec4 »

Rocky wrote:
Sat Jul 01, 2023 6:01 pm
For technical implementation reasons I will not do an 'AC3 only' option.
OK, and fine to me.
Rocky wrote:
Sat Jul 01, 2023 6:01 pm
I will change the order as requested, however.
Thank you.
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

Here is a release candidate for DGDemux/DGDemuxGUI build 70. The OCD order is implemented and DGDemuxGUI is implemented, along with modified text document and sample INI file.

The INI file format is changed, so either delete or edit your current INI file.

Your testing will be appreciated.

https://rationalqm.us/misc/DGDemux_1.0. ... didate.zip
DAE avatar
renols
Posts: 150
Joined: Tue Feb 22, 2011 2:34 am

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by renols »

Sorry, but I just want to ask.

Isn't a TrueHD track without an embedded AC3 track a "bad" TrueHD track?

I know that Mkvmerge adds it as two seperate tracks, but the embedded AC3 file should still be there for compatibility?

Maybe I misunderstand the pupose of all those options, but there already is an option to not do the merge, and just save the thd and the embedded AC3 file as two seperate files. I use that always, as I have nothing to use the thd+ac3 file for. The request for the thd+ac3 file, I believe was made to be able to create an iso file or something. One can't do that without thd+ac3, as a thd file alone breaks the specs (as I understand it).

renols
User avatar
hubblec4
Posts: 221
Joined: Tue May 02, 2023 6:03 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by hubblec4 »

Hi renols

If you want to create a Blu-ray or UHD disc structure than is the AC3 core maybe necessary. (I'm not an expert in this stuff).

But the TrueHD can always be played standalone. The embedded AC3 stream is there for compatibility, like you said.

My final container is always MKV and my Pioneer receiver can handle TrueHD streams and don't need the AC3 "core".
MPC-HC can't play the THD+AC3 file properly but has no issues with the THD file.
User avatar
hubblec4
Posts: 221
Joined: Tue May 02, 2023 6:03 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by hubblec4 »

Hi Rocky

Many thanks for your work. The GUI looks fine and for some first quick tests everything went fine.
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

renols wrote:
Sun Jul 02, 2023 10:39 am
Isn't a TrueHD track without an embedded AC3 track a "bad" TrueHD track?
Only if you are making a BluRay/UHD, as hubblec4 explained.
Maybe I misunderstand the purpose of all those options, but there already is an option to not do the merge, and just save the thd and the embedded AC3 file as two separate files.
That option only existed for DGIndexNV. It had been removed from DGDemux some time ago, and thd, ac3, and thd+ac3 were always generated. Now we have an option to control that in DGDemux/DGDemuxGUI.

@hubblec4

Thank you for your initial testing. If I hear of no issues I'll release build 70 tomorrow.
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by SomeHumanPerson »

I tested the GUI using 3 TrueHD discs (all 3 options for each) and everything seems to work as expected.

:salute:



Just about jumped out of my chair on the first run, though, because I had forgotten how loud the "finished" noise is. A long time ago I replaced "finished.wav" with a much quieter alternative but I ran this release candidate from a new temp folder instead of clobbering anything (the .INI) in DGDemux's normal home and forgot about the .WAV.

:shock: :lol:
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

Feature request: Demux only TrueHD and No THD+AC3 merge

Post by Rocky »

SomeHumanPerson wrote:
Mon Jul 03, 2023 1:48 pm
I tested the GUI using 3 TrueHD discs (all 3 options for each) and everything seems to work as expected.
Great. Thank you for your testing.
Just about jumped out of my chair on the first run
Mission accomplished. :lol:
Post Reply