Page 1 of 2

DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 2:09 pm
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.

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 2:56 pm
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).

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 3:51 pm
by unclebubbies
But is does do DTShd master audio?
Is there a link that explains what codecs like "FLAC" means?

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 4:12 pm
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).

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 4:25 pm
by unclebubbies
Then Flac would not work for me. I want to play movies using my Aios media player connected to my tv.

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 4:31 pm
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.

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 5:06 pm
by unclebubbies
Good idea. I will try it later after I'm off work. Thanks.

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 5:19 pm
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.

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 7:46 pm
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?

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 20, 2012 8:44 pm
by Deleted User 11865
In HandBrake 0.9.5, Blu-ray secondary audio streams weren't available at all.

Re: DolbyTrueHD in a mkv container?

Posted: Wed Mar 21, 2012 6:08 am
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

Re: DolbyTrueHD in a mkv container?

Posted: Wed Mar 21, 2012 12:08 pm
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.

Re: DolbyTrueHD in a mkv container?

Posted: Wed Mar 21, 2012 12:10 pm
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?

Re: DolbyTrueHD in a mkv container?

Posted: Wed Mar 21, 2012 12:17 pm
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.

Re: DolbyTrueHD in a mkv container?

Posted: Wed Mar 21, 2012 12:28 pm
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!

Re: DolbyTrueHD in a mkv container?

Posted: Thu Mar 22, 2012 8:27 am
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.

Re: DolbyTrueHD in a mkv container?

Posted: Thu Mar 22, 2012 8:16 pm
by GregiBoy
Or easier still, download them from one of the many subtitle sites on the internet and mux them in.

Re: DolbyTrueHD in a mkv container?

Posted: Mon Mar 26, 2012 3:49 pm
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?

Re: DolbyTrueHD in a mkv container?

Posted: Mon Mar 26, 2012 5:38 pm
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.

Re: DolbyTrueHD in a mkv container?

Posted: Mon Mar 26, 2012 11:15 pm
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?

Re: DolbyTrueHD in a mkv container?

Posted: Mon Mar 26, 2012 11:22 pm
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.

Re: DolbyTrueHD in a mkv container?

Posted: Tue Mar 27, 2012 9:27 pm
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.

Re: DolbyTrueHD in a mkv container?

Posted: Sun Apr 01, 2012 8:30 am
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.

Re: DolbyTrueHD in a mkv container?

Posted: Sun Apr 01, 2012 1:18 pm
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).

Re: DolbyTrueHD in a mkv container?

Posted: Mon Apr 09, 2012 8:40 pm
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...