[Matroska-devel] DRAFT: new elements for compression/encryption

Moritz Bunkus moritz at bunkus.org
Fri Oct 17 00:02:28 CEST 2003


Regarding the VobSub issue, here's the draft for some new

KaxTracks (old)
\+ KaxTrackEntry (old)
 \+ KaxContentEncoding (master, optional, multiple)
  \+ KaxContentEncodingType (UInt, mandatory, single, default 0)
   + KaxContentEncodingMethod (UInt, mandatory, single, default 0)
   + KaxContentEncodingScope (UInt, mandatory, single, default 0)
   + KaxContentEncodingSettings (binary, optional, single)

KaxContentEncoding: A master containing the aforementioned children. Can
be used multiple times. Order is important! The order in which the
multiple KaxContentEncoding elements are stored in the file is the same
order that the data manipulation has been done during encoding/muxing,
so a decoder/demuxer would have to reverse this order.

* KaxContentEncodingType: Tells the kind of modification
done. Predefined values:
0 - compression
1 - encryption
Default value is 0.

* KaxContentEncodingMethod: Tells what exactly was done with the
data. Depends on KaxContentEncodingType.

For compression:
0 - zlib (each frame's contents were compressed with the zlib library)
1 - bzlib (each frame's contents were compressed with the zlib library)

For encryption:
0 - ... (not yet specified; possible algorithms include DES, 3DES, AES,

Default value is 0.

* KaxContentEncodingScope: Tell whether the frame contents, the track's
private data or both have been modified in this way.
0 - only the frame contents
1 - only the track's private data
2 - both
Default value is 0.

* KaxContentEncodingSettings: Additional information for the method
used. Could be the ID of the key used in an asymmetric encryption method
(aka. public key cryptography).

Example: Let's say you have a codec that needs a big XML file for
initialization (around 200kb), but the frames it outputs are already
compressed heavily and would not gain from further compression. This
would be indicated by...

\+ KaxTrackEntry
 \+ ...
  + KaxContentEncoding
  \+ (KaxContentEncodingType = 0, compression, default value)
   + (KaxContentEncodingMethod = 0, zlib compression, default value)
   + KaxContentEncodingScope = 1, only the private data

CodecIDs: I don't know how robux choses his IDs, but I propose the
following ones:

KaxContentEncoding: 0x6240, 2
KaxContentEncodingType: 0x5031, 2
KaxContentEncodingMethod: 0x5032, 2
KaxContentEncodingScope: 0x5033, 2
KaxContentEncodingSettings: 0x5034, 2

Please send comments/suggestions as soon as possible - I'd like to make
this permanent this weekend!

 ==> Ciao, Mosu (Moritz Bunkus)

More information about the Matroska-devel mailing list