DolbyTrueHD in a mkv container?

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
unclebubbies
Posts: 12
Joined: Tue Mar 20, 2012 2:01 pm

DolbyTrueHD in a mkv container?

Post by unclebubbies »

Excuse me if I missed this somewhere but I would like to encode a movie and have the hd audio remain.
What codec do I use for DolbyTrueHD in a mkv container to have an exact passthrough?
Is there tutorial that describes the different codecs and their proper use?
I'm a newbie of course so any help would be appreciated.
Deleted User 11865

Re: DolbyTrueHD in a mkv container?

Post by Deleted User 11865 »

HandBrake doesn't do TrueHD passthrough yet. The best you can do is FLAC (lossless if your source is 16-bit).
unclebubbies
Posts: 12
Joined: Tue Mar 20, 2012 2:01 pm

Re: DolbyTrueHD in a mkv container?

Post by unclebubbies »

But is does do DTShd master audio?
Is there a link that explains what codecs like "FLAC" means?
Tree Dude
Enlightened
Posts: 128
Joined: Sun Aug 29, 2010 10:30 pm

Re: DolbyTrueHD in a mkv container?

Post by Tree Dude »

Rodeo,

The release notes for 0.9.6 state that TrueHD can be decoded or passedthrough.
Blu-ray: make TrueHD, DTS-HD and E-AC3 Secondary Audio streams available for decoding and/or passthrough
Is this incorrect? Also I would think if it could be encoded as FLAC it should be able to be passedthrough. I know we got DTS-HD passthorugh in the nightlies before encoding was an option.


unclebubbies,

FLAC is an open source lossless audio codec. It works well, but if you plan on playing your files back on anything but your PC the audio will most likely not play. I do not know of any devices that support FLAC. TrueHD can be up to 24-bit, so converting to FLAC some quality would lost on any 24-bit source (it would probably be the smallest loss of any other option though).

Keep in mind HD audio sources can be very large (Transformers 2 it was over 4GB for just the audio).
unclebubbies
Posts: 12
Joined: Tue Mar 20, 2012 2:01 pm

Re: DolbyTrueHD in a mkv container?

Post by unclebubbies »

Then Flac would not work for me. I want to play movies using my Aios media player connected to my tv.
Tree Dude
Enlightened
Posts: 128
Joined: Sun Aug 29, 2010 10:30 pm

Re: DolbyTrueHD in a mkv container?

Post by Tree Dude »

unclebubbies wrote:Then Flac would not work for me. I want to play movies using my Aios media player connected to my tv.
You may be ok. It looks like that media center does support FLAC audio. Weather it does inside of the MKV container though, I am not sure. You could always do a short encode (set the chapter marker so it only grabs 1) and do some testing.
unclebubbies
Posts: 12
Joined: Tue Mar 20, 2012 2:01 pm

Re: DolbyTrueHD in a mkv container?

Post by unclebubbies »

Good idea. I will try it later after I'm off work. Thanks.
Deleted User 11865

Re: DolbyTrueHD in a mkv container?

Post by Deleted User 11865 »

There's or in and/or. DTS-HD secondary audio streams can be passed through, TrueHD and E-AC3 secondary audio streams can be decoded.

Our MKV muxer doesn't set support TrueHD muxing, so passthrough is not an option for now.

The WD TV (as well as just about any similar device) can play FLAC (with varying degrees of success).
Some receivers also support FLAC decoding.
unclebubbies
Posts: 12
Joined: Tue Mar 20, 2012 2:01 pm

Re: DolbyTrueHD in a mkv container?

Post by unclebubbies »

There's or in and/or. DTS-HD secondary audio streams can be passed through, TrueHD and E-AC3 secondary audio streams can be decoded.
Not sure what you are saying here? The main DTS-HD audio won't passthrough?
Deleted User 11865

Re: DolbyTrueHD in a mkv container?

Post by Deleted User 11865 »

In HandBrake 0.9.5, Blu-ray secondary audio streams weren't available at all.
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: DolbyTrueHD in a mkv container?

Post by Smithcraft »

unclebubbies wrote:
There's or in and/or. DTS-HD secondary audio streams can be passed through, TrueHD and E-AC3 secondary audio streams can be decoded.
Not sure what you are saying here? The main DTS-HD audio won't passthrough?
It passes through fine.

SC
Kossy
Posts: 10
Joined: Wed Mar 21, 2012 11:42 am

Re: DolbyTrueHD in a mkv container?

Post by Kossy »

Rodeo wrote:HandBrake doesn't do TrueHD passthrough yet. The best you can do is FLAC (lossless if your source is 16-bit).
How to tell if the source is 16-bit ? Some TrueHD audio files have a bit-depth of 16-bit, after according to eac3to, a 2nd pass which strips superfluous zero bytes. So how handbrake deals with it and what about RAW/PCM and flac, is there also a limitation ?

Sorry to hijack the thread, but I also have a question about the compression level. If I understand correctly the wiki :
It is not currently possible to passthru the compression level to the ffmpeg encoder which is currently defaulted to "5"
there's no possibility to choose, let's say a compression level 8 for this encoder ?

Thanks.

PS : The DTS-HD passthrough works absolutely fine. I compared a few files with eac3to and mkvtoolnix and there's just a few bytes of difference between them, even for the 7.1 channels tracks mislabeled only as 5.1 in the gui (bug ?), the output is almost identical.
Last edited by Kossy on Thu Mar 22, 2012 8:08 am, edited 1 time in total.
unclebubbies
Posts: 12
Joined: Tue Mar 20, 2012 2:01 pm

Re: DolbyTrueHD in a mkv container?

Post by unclebubbies »

Did a test last night. DTSMAhd passed through with no problem. Great. But no subtitles? Not that I really need them but does handbrake not read the subtitle track when passing DTSMA?
Flo
Bright Spark User
Posts: 211
Joined: Thu Nov 26, 2009 5:41 pm

Re: DolbyTrueHD in a mkv container?

Post by Flo »

Handbrake doesn't support PGS subtitles. You'll have to convert them to something else (SRT or VOBSUB) or extract the PGS subtitles and mux them in after encoding.
unclebubbies
Posts: 12
Joined: Tue Mar 20, 2012 2:01 pm

Re: DolbyTrueHD in a mkv container?

Post by unclebubbies »

Flo wrote:Handbrake doesn't support PGS subtitles. You'll have to convert them to something else (SRT or VOBSUB) or extract the PGS subtitles and mux them in after encoding.
Being new to the program I surely do not know how to do this? Is there a tutorial somewhere that describes the process? Any help would be appreciated!
Kossy
Posts: 10
Joined: Wed Mar 21, 2012 11:42 am

Re: DolbyTrueHD in a mkv container?

Post by Kossy »

Like Flo said you have the choice to just mux them "as is" as sup files with mkvtoolnix. Or you can convert them in vobsub with BDSup2Sub or in srt with suprip.

Personally I use suprip which works exactly like subrip for dvd, which is an ocr program and can require some time and input, and also use gaupol (very good srt program on linux) to fix some ocr errors. You'll get srt files corresponding to the different sup files present on the disk and can mux them if you like in mkv. A good place to start is to look on doom9 forum in the subtitle section and the sticky.
GregiBoy
Veteran User
Posts: 908
Joined: Sat Feb 12, 2011 9:23 pm

Re: DolbyTrueHD in a mkv container?

Post by GregiBoy »

Or easier still, download them from one of the many subtitle sites on the internet and mux them in.
unclebubbies
Posts: 12
Joined: Tue Mar 20, 2012 2:01 pm

Re: DolbyTrueHD in a mkv container?

Post by unclebubbies »

GregiBoy wrote:Or easier still, download them from one of the many subtitle sites on the internet and mux them in.
Pardon my ignorance, but I sure don't know what "mux them in" means or how to do it?
Flo
Bright Spark User
Posts: 211
Joined: Thu Nov 26, 2009 5:41 pm

Re: DolbyTrueHD in a mkv container?

Post by Flo »

"Mux" is short for multiplex.

What I meant was that you can extract the PGS subtitles from the source (e.g. using mkvextract if you used MakeMKV to rip the BD) and then, after encoding with Handbrake, add them back into the resulting MKV with mkvmerge. Both tools are part of mkvtoolnix. A GUI for mkvextract can be found here.

Or, as GregiBoy mentioned, there are a number of sites that offer SRT (text-based) subtitles for download that you can simply import into Handbrake.
Mefyrx
Posts: 21
Joined: Thu Mar 01, 2012 2:19 am

Re: DolbyTrueHD in a mkv container?

Post by Mefyrx »

Do we know if and when TrueHD audio would be supported by handbrake?
I guess it's under development, but do we know if it's something we could hope for in 3 month, 1 year, 5 year?
Deleted User 11865

Re: DolbyTrueHD in a mkv container?

Post by Deleted User 11865 »

It's not really under development.

Once a developer takes an interest in it, it can happen pretty fast, but there are other priorities at the moment.
madburg
Posts: 37
Joined: Wed Jan 05, 2011 12:10 am

Re: DolbyTrueHD in a mkv container?

Post by madburg »

Question why would they not just read the sup's that are on the BD and then "pass-thru" the one selected by the user to the mkv during the mux as they would do with a passthru DTS-HDMA track?

I ask because clearly one can extract the sup's and mux them into a MKV, this would remove these manual steps.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: DolbyTrueHD in a mkv container?

Post by TedJ »

Because requests that start with "why would they not just" are rarely as simple as the person asking would suspect. We're able to pass through a DTS-HDMA track because the upstream ffmpeg libraries can identify and handle them. This is not the case (as yet) with PGS streams.

As for TrueHD support, that may take much longer... It's considered by many as the "also ran" format for HD audio compared to DTS-HDMA and it's almost never seen on newer releases.
Deleted User 11865

Re: DolbyTrueHD in a mkv container?

Post by Deleted User 11865 »

TedJ wrote:Because requests that start with "why would they not just" are rarely as simple as the person asking would suspect. We're able to pass through a DTS-HDMA track because the upstream ffmpeg libraries can identify and handle them. This is not the case (as yet) with PGS streams.
Actually, libavcodec has had PGS subtitles support for a while now.

What needs to be done:

1) demuxer support: we need to be able to extract PGS subtitles from MPEG Program and Transport streams (libavformat would handle other sources, such as MKV)

2) decoding support: leverage or copy the libavcodec PGS decoder to parse the subtitles in order to get timestamps and flags (e.g. forced flags)

3) muxer support: the MKV muxer needs to know how to mux the subtitles properly - you can't just dump the raw data to the file

And probably some modifications to make burn-in work.

Regarding TrueHD, we are also missing (3).
madburg
Posts: 37
Joined: Wed Jan 05, 2011 12:10 am

Re: DolbyTrueHD in a mkv container?

Post by madburg »

Thanks for the info Rodeo! Hope both of these make their way in. Very talented people behind HB.

Question, on #3 with sup's. When I extract the sup's and later when HB finishes an encode. I just use mkvnixtools to mux the sup's into the mkv and they show up just fine when selected, would this not be considered raw? I do notice that whatever is forced (not a separate sup just for forced subs) is not display, if you enable the sup subs you get all, so I extract just the forced stuff and merge in as a separate sub.

I am guessing the thing here is we are not using BD player, etc... to play mkv's clearly (I am using plex as an example) so there is nothing (in the code) to pickup something is forced or not, only what sub track is selected to be displayed...
Post Reply