Log in

View Full Version : Mux TrueHD to MKV whilst retaining AC3 core.


liquidskin76
1st March 2010, 14:05
Ok, so i use mkvmerge to mux TrueHD to MKV however it appears to strip out the AC3 core. MakeMKV i think also does the same.

So does anyone know a way of muxing TrueHD to MKV whilst also retaining it's AC3 core?

Thanks

rica
1st March 2010, 21:17
Use eac3to to extract thd+ac3 and you can use this file with mkvmerge gui.

Here is a sample code:
eac3to v3.17
command line: eac3to\eac3to D:\ 1) 2: G:\thd\video.h264 7: G:\thd\audio.thd+ac3
------------------------------------------------------------------------------
M2TS, 1 video track, 5 audio tracks, 13 subtitle tracks, 1:44:15, 24p /1.001
1: Chapters, 16 chapters
2: h264/AVC, 1080p24 /1.001 (16:9)
3: TrueHD/AC3, French, 5.1 channels, 48khz, dialnorm: -30dB
(embedded: AC3, 5.1 channels, 448kbps, 48khz, dialnorm: -30dB)
4: TrueHD/AC3, German, 5.1 channels, 48khz
(embedded: AC3, 5.1 channels, 448kbps, 48khz)
5: AC3 Surround, English, 2.0 channels, 192kbps, 48khz, dialnorm: -26dB
6: AC3 Surround, English, 2.0 channels, 192kbps, 48khz, dialnorm: -29dB
7: TrueHD/AC3, English, 5.1 channels, 48khz, dialnorm: -27dB
(embedded: AC3, 5.1 channels, 448kbps, 48khz, dialnorm: -27dB)
8: Subtitle (PGS), English
9: Subtitle (PGS), French
10: Subtitle (PGS), German
11: Subtitle (PGS), Dutch
12: Subtitle (PGS), Arabic
13: Subtitle (PGS), Modern Greek
14: Subtitle (PGS), Turkish
15: Subtitle (PGS), French
16: Subtitle (PGS), German
17: Subtitle (PGS), Dutch
18: Subtitle (PGS), French
19: Subtitle (PGS), German
20: Subtitle (PGS), Dutch
[v02] Extracting video track number 2...
[a07] Extracting audio track number 7...
[a07] Removing AC3 dialog normalization...
[a07] Removing TrueHD dialog normalization...
[v02] Creating file "G:\thd\video.h264"...
[a07] Creating file "G:\thd\audio.thd+ac3"...
Video track 2 contains 149977 frames.
eac3to processing took 29 minutes, 35 seconds.
Done.

liquidskin76
1st March 2010, 22:52
I've been extracting audio via tsmuxer. The ac3 core appears to be stripped out during the mux with mkvmerge.

I'll test tomorrow using eac3to.

Cheers

rica
1st March 2010, 23:04
I always accept eac3to as precise demuxer while i get TSMuxer as a remuxer. :)

liquidskin76
2nd March 2010, 23:26
OK, tried eac3to with truehd+ac3 however it appears mkvmerge is still stripping ac3 core.

I've tried ffdshow with truehd decoding disabled however i see some strange results, like 2ch lpcm at low bitrates. I'll have to test some more.

I've tried with the original m2ts and get the ac3 core ok.

By the way, i only want to keep the ac3 as a alternative... i'll be bitstreaming truehd via ffdshow (god bless albain!).

rica
2nd March 2010, 23:37
OK, tried eac3to with truehd+ac3 however it appears mkvmerge is still stripping ac3 core.

I've tried ffdshow with truehd decoding disabled however i see some strange results, like 2ch lpcm at low bitrates. I'll have to test some more.

I've tried with the original m2ts and get the ac3 core ok.

By the way, i only want to keep the ac3 as a alternative... i'll be bitstreaming truehd via ffdshow (god bless albain!).

Weird, you must have missed something.
Last night i tried one more time before posting.
And i get blue light on my AVR and it shows THD, even i got debugview log.

TinTime
4th March 2010, 12:58
OK, tried eac3to with truehd+ac3 however it appears mkvmerge is still stripping ac3 core.
...
By the way, i only want to keep the ac3 as a alternative... i'll be bitstreaming truehd via ffdshow (god bless albain!).

If mkvmerge strips the ac3 then you'll need to mux it separately. In other words demux with eac3to like this (modifying rica's example):

eac3to\eac3to D:\ 1) 2: G:\thd\video.h264 7: G:\thd\audio.thd 7: G:\thd\audio.ac3

Then mux the two audio tracks with mkvmerge.

rica
5th March 2010, 23:14
Check your MkvMerge version.
Current 3.2.0 supports those:

http://img411.imageshack.us/img411/8428/0033.png (http://img411.imageshack.us/i/0033.png/)



_ _ _ __ _

setarip_old
7th March 2010, 22:51
@liquidskin76
Hi!...however it appears to strip out the AC3 core. MakeMKV i think also does the same.

No - MakeMKV allows you to either retain TrueHD OR keep only the core...

liquidskin76
8th March 2010, 14:09
I'm not sure everyone understands what i'm after!

I want to mux TrueHD and it's AC3 core to MKV as one audio track. Not one or the other, or both as separate audio tracks.

Like in a m2ts backed up via tsmuxer. You get the TrueHD soundtrack that also contains the AC3 core, all in one audio track. You can then disable TrueHD decoding within ffdshow, and bitstream the ac3 core instead. Basically 'DTS-HD/DTS Core' behaviour however with 'TrueHD/AC3 Core'.

I'm after this as an automatic fallback option, and as an alternative to TrueHD decoding, just in case you're wondering!

Can this be done with the available MKV muxers?

nurbs
8th March 2010, 14:33
Apparently not. You could extract both the TrueHD track and the AC3 core and mux them as 2 separate tracks. Not quite what you wanted, but my hardware player doesn't display tracks it can't play, so that would still work as an automatic fallback.

rica
8th March 2010, 21:42
I'm not sure everyone understands what i'm after!

I want to mux TrueHD and it's AC3 core to MKV as one audio track. Not one or the other, or both as separate audio tracks.

Like in a m2ts backed up via tsmuxer. You get the TrueHD soundtrack that also contains the AC3 core, all in one audio track. You can then disable TrueHD decoding within ffdshow, and bitstream the ac3 core instead. Basically 'DTS-HD/DTS Core' behaviour however with 'TrueHD/AC3 Core'.

I'm after this as an automatic fallback option, and as an alternative to TrueHD decoding, just in case you're wondering!

Can this be done with the available MKV muxers?

The command line which i gave before creates a thd+ac3 file.
And i can watch the mkv (created by mkvmerge gui 3.2.0) with ac3 or with thd.
Disabling thd passthrough and enabling ac3 SPDIF encode mode in ffdshow must fix your issue. (you'll get ac3 in this case)
Enabling thd passthrough will bring thd bitstreaming back.

And pls check how eac3to works: (see thd headline)

http://forum.doom9.org/showthread.php?p=1183559#post1183559

_ _ _ _

liquidskin76
9th March 2010, 14:55
I've used eac3to to create a .thd+ac3 sound track, and a .thd. I can see the difference in file size so i know the ac3 core is included in the .thd+ac3 version.

If i then create 2 mkv file using mkvmerge gui 3.2.0, the resulting mkv file sizes are identical, even though one was created using .thd+ac3 and the other only .thd. The .thd+ac3 mkv file should be bigger!

So, i can only presume that mkvmerge is removing the ac3 core from the .thd+ac3 soundtrack.

A further test i did to confirm this was to...

Open the mkv file that contains the .thd+ac3 file in tsmuxer. The audio track loads ok in tsmuxer, showing the usual TrueHD/AC3 mixture.

Open the mkv file that contains the .thd file in tsmuxer. The audio track doesn't load.

If i then try to just manually add the .thd audio file to a new tsmuxer session, the audio track doesn't load.

@rica,

Just to make sure we're on the same page here, are you saying that the mkv you create using a .thd+ac3 file behaves the same way as a m2ts file using .thd+ac3, in that you can either bitstream TrueHD or it's core ac3 depending on the setup (say hdmi or spdif)?

I'm thinking that maybe we have our wires cross, and that the mkv container maybe doesn't support a TrueHD/AC3 core audio track like m2ts does?!!

Thanks everyone.

dfordham
9th March 2010, 16:37
http://forum.doom9.org/showthread.php?p=1376239#post1376239

Author, Mosu, has confirmed that core track is discarded.

liquidskin76
9th March 2010, 17:36
http://forum.doom9.org/showthread.php?p=1376239#post1376239

Author, Mosu, has confirmed that core track is discarded.

Thanks for the links (i should have found that myself really but thanks again!).

Interesting stuff. Mosu is sort of right in saying that with ffdshow you can either bitstream truehd or decode it to lpcm, so why would you need the ac3 core.

How does that relate though if you're using spdif for instance? I didn't think spdif could handle the bandwidth of truehd decoded to lpcm, hence the need for hdmi?

I think i'll head over the mkvtoolnix thread to debate!!

Cheers everyone. Consider this one closed!

dfordham
9th March 2010, 17:52
How does that relate though if you're using spdif for instance? I didn't think spdif could handle the bandwidth of truehd decoded to lpcm, hence the need for hdmi?

There is also an option to have FFDSHOW decode the TrueHD and reencode it to AC3 (it's a checkbox in the output section of FFDSHOW Audio Decoder). This will at least give you multichannel DD instead of stereo PCM which is all SPDIF can give you with PCM.