Page 1 of 1

[RESOLVED] What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 6:53 am
by renols
Hi.

Maybe this has been covered, but I have not been able to find it with a search for truehd.

When I select to demux a truehd track which has an embedded AC3 track, it seems like only the truehd part gets demuxed.

What happens to the embedded AC3 stream?

Is it because dgindex doesn't detect the embedded AC3 stream, or is it just by design that only the truehd part gets demuxed?

I would like the complete truehd track including the embedded stream to be demuxed.

Is it possible or am I just missing and option somewhere?

renols

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 10:28 am
by admin
Tell me the details of your source file and provide a sample if possible.

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 11:05 am
by renols
Hi.

Source is UHD disk.

Output from eac3to:

1: Chapters, 16 chapters
2: h265/HEVC, 2160p24 /1.001 (16:9), 10 bits
3: TrueHD/AC3 (Atmos), English, 7.1 channels, 48kHz
(embedded: AC3, 5.1 channels, 640kbps, 48kHz)
4: DTS Master Audio, English, 5.1 channels, 16 bits, 48kHz
(core: DTS, 5.1 channels, 1509kbps, 48kHz)

dgindex log file:

Stream Type: Transport [192]
Video Type: HEVC
Profile: Main 10
Level: 5.1/High
Coded Size: 3840x2160
SAR: 16x9
Display Size: 3840x2160
Frame Rate: 23.976024 fps
Colorimetry: BT.2020 [9]
Frame Structure:
Frame Type:
Coded Number: 129520
Playback Number: 129520
Frame Repeats: 0
Field Repeats: 0
Bitrate:
Bitrate (Avg):
Bitrate (Max):
Audio Stream: 1100: THD 48000 8ch [eng]
Audio Stream: 1101: DTS HDMA C+L+R+SL+SR 48 1536 [eng]
Elapsed: 0:08:12
Remain: 0:00:00
FPS:
Info: Finished!

4352: D:\audio PID 1100 48000 8ch eng.thd
4353: D:\audio PID 1101 C+L+R+SL+SR 48 1536 eng.dts

If it can be of any help, I can cut a minute or so of the m2ts file. Since full file is 83 GB or so.

There are more audios and some subs on there as well, and they are all demuxed just fine. Just the thd file seems to just demux the thd part and drop the embedded ac3.

renols

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 11:15 am
by admin
I already asked for a sample. Why are you making me ask again?

Also, what makes you think DGIndexNV is dropping anything?

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 11:43 am
by renols
Hi.

Sorry, was not sure if you needed a sample.

http://www.mediafire.com/file/5d89c30wn ... .m2ts/file

I hope it Works. I have never used mediafire before.

If it is by design that dgindex only outputs the thd stream without the embedded AC3 stream, then it does what it is supposed to do.

Mostly TrueHD streams has an imbedded AC3 track though. So it would be nice if dgindex would extract the complete track.

Please let me know if you need any more information.

renols

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 11:44 am
by admin
Thank you for the sample, but maybe you missed my question: What makes you think DGIndexNV is dropping anything?

I simply write out the packet data. There is no intentional design to drop anything.

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 12:03 pm
by admin
I demuxed the THD using DGIndexNV. Then I was able to extract the core AC3 from the demuxed THD:

"C:\Standalone Apps\EAC3TO\eac3to" "uhd_sample PID 1100 48000 8ch.thd" output.ac3 -core

Also, the files demuxed by EAC3TO and DGIndexNV are identical (except that EAC3TO drops a small amount of data at the end).

So I'm not seeing any issue here.

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 12:17 pm
by renols
Hi.

Hm, then I must be doing something wrong.

the file demuxed by dgindex is much smaller than the file demuxed by eac3to.

eac3to file is 4971488816 bytes
dgindex file is 4305622576 bytes

I guess I will have to do some more testing. All I do is select the thd track in the demuxing menu, and the file I get is the small one.

Am using build 175 so should be the most recent one.

I will try to investigate why on my system the file made by dgindex is without the embedded AC3 track and much smaller than the one made by eac3to.

Must be something on my system, since you get identical files.

renols

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 12:35 pm
by admin
OK, I did some research on all this and here are my findings:

Using EAC3TO, you can demux to one of three things (by choosing the appropriate extension):

1) file.thd: Just gives the TRUEHD stuff

2) file.ac3: Re-encodes an AC3 from the TRUEHD.

3) file.thd+ac3: Gives a stream with both THD and embedded AC3.

Now, if you do the third one, then you can extract (not re-encode) the embedded AC3 with:

eac3to file.thd+ac3 core.ac3

So you are correct and DGIndexNV only does the first of the three demux things above. I will have to do some further work to see if it is possible to support demuxing to file.thd+ac3, or perhaps just outputting the embedded AC3 directly to core.ac3.

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 12:46 pm
by renols
Hi.

Thanks for the explanation.

When just using -demux with eac3to, it looks like it does the thd+ac3 output by default then.

I have tried the sample on my other PC, and of course got the same result, and was starting to pull my hair out :-)

Anyway, dgindex does what it should do, and I am sorry for stating that it "drops" anything.

Would be great if it could also extract the AC3 part though, ending up with a thd+ac3 file. If others may only want the thd file, then maybe it can be optional?

Am using dgindex on a daily basis, and it just keeps getting better.

Thanks again for the quick support.

renols

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 12:48 pm
by admin
Sure, renols, it's highly desirable to be able to extract the embedded AC3 one way or another. I'll try to make it happen. Thank you for bringing this to light.

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 12:59 pm
by admin
OK, it's easy to output thd+ac3 from DGIndexNV. But is that what you want? How would you then get the embedded AC3?

I'm thinking to have an option saying whether you want .thd, .ac3 (embedded), or .thd+ac3 when demuxing TRUEHD tracks. What do you think?

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 1:08 pm
by renols
If all three options could be available it would be super.

The options I use personally is thd+ac3 or just ac3. Don't think I have ever used just thd.

But maybe someone would like that option.

If it is no big programming task for you to add all three options, that would make it most flexible, and people can choose whatever they want.

renols

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 1:10 pm
by admin
OK, but how do you use the thd+ac3 file that you get? We want to avoid needing EAC3TO for anything.

I could just always output thd+ac3 as the only option. That would be trivial to implement. The full options much more work.

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 1:22 pm
by renols
When I use the thd+ac3 file I always mux it with mkvtoolnix, which automatically seperates thd and ac3 to two seperate tracks in the mkv file.

But I also use the AC3 track alone sometimes. Which would mean having to use eac3to to extract the AC3 (embedded) stream.

If eac3to should be out of the equation for me thd+ac3 and ac3 (embedded) would be the two outputs I would need.

If thd+ac3 is the only option, I would have to use eac3to to extract the embedded ac3 sometimes. But if thd+ac3 is trivial to do, and ac3 or thd alone Means a lot of Work, I can easily live with just thd+ac3 output.

renols

Re: What happens to embedded AC3 in truehd?

Posted: Sat May 18, 2019 1:31 pm
by admin
Got it, thank you. I'll think it over.

Re: What happens to embedded AC3 in truehd?

Posted: Fri May 24, 2019 11:24 am
by admin
OK, here is what I have working. When you demux a TrueHD stream it will always generate a file.thd that is stripped of the core AC3, and if there is an embedded AC3 it will generate a file.ac3 that contains the embedded AC3 by itself. I do not generate a .thd+ac3 file for an obscure technical reason (don't ask :lol:).

@renols

Then for your sample the following files are generated:

uhd_sample PID 1100 48000 8ch.thd
uhd_sample PID 1100 embedded.ac3

The contents are identical to what you get from EAC3TO when you do the appropriate commands.

Will this solution work for you? I like it because I do not have to add any new settings and associated processing. Presumably where you loaded the .thd+ac3 into mkvtoolnix, you can now just add both the separate streams.

Re: What happens to embedded AC3 in truehd?

Posted: Fri May 24, 2019 12:19 pm
by renols
Sounds great.

I see no reason as to why it should not give the same result muxing the streams seperatly rather than adding the thd+ac3, since mkvmerge splits it in two streams anyway.

What you are suggesting should Work just fine I believe.

Thanks a lot.

renols

Re: What happens to embedded AC3 in truehd?

Posted: Fri May 24, 2019 12:31 pm
by admin
Great. Thank you, renols. I'll do some regression testing/refactoring and then make a slipstream.

It is thanks to users like yourself that we are able to make DGDecNV better and better. :salute:

Re: [RESOLVED] What happens to embedded AC3 in truehd?

Posted: Sun May 26, 2019 12:36 pm
by admin
Released in slipstream 176. Let's see what I broke. :P