[Matroska-devel] Support for TrueHD audio

Moritz Bunkus moritz at bunkus.org
Sun Mar 29 18:23:41 CEST 2009


Hey,

I've just added support for TrueHD audio in mkvmerge, one of the more
often requested features.

Now I need support for it in Haali's splitter :)

The format is really simple: CodecID is "A_TRUEHD", no CodecPrivate,
just deliver the content as-is.

A small sample EVOB file which can be used for testing is available
here:

http://www.bunkus.org/misc/AVC.TrueHD.DDP.2xDD.evo

Here's a mkvtoolnix build with support for TrueHD:

http://www.bunkus.org/videotools/mkvtoolnix/win32/pre/mkvtoolnix-unicode-2.6.0-build20090329-99-setup.exe

A couple of notes about storage. TrueHD streams consist of two different
frame types: one with a full header and a sync word, and then several
others without the full headers. Decoding can only start at the sync
frames. Those frames all contain very few samples (as few as 40 samples)
and are very, very short (e.g. only 30 bytes). Therefore mkvmerge does
NOT put each frame into a Matroska block. Instead each Matroska block
contains one sync frame and all following non-sync frames. This is about
110 ms of data. mkvmerge disables lacing for TrueHD audio tracks so that
there won't be ~ 1 second of data with a single timecode.

I don't see any advantage in putting the non-sync frames into separate
Matroska blocks; this will only waste tons of space and not gain
anything.

Another thing is that BlueRay discs may contain AC3 frames between the
TrueHD frames so that decoders capable of decoding AC3 but which don't
know TrueHD can still decode this stream. These AC3 are dropped by
mkvtoolnix. HD DVD doesn't contain such AC3. BlueRay discs should always
contain the same audio track als Dolby Digital Plus, AC3 or something
like that in addition to the TrueHD version, so nothing is lost by
discarding the embedded AC3 frames. Another argument for discarding them
is that they have to be discarded prior to sending the stream over a
HDMI interface anyway.

Regards,
Mosu

-- 
If Darl McBride was in charge, he'd probably make marriage
unconstitutional too, since clearly it de-emphasizes the commercial
nature of normal human interaction, and probably is a major impediment
to the commercial growth of prostitution. - Linus Torvalds

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20090329/956fdfc9/attachment.pgp>


More information about the Matroska-devel mailing list