[Matroska-devel] Dirac mapping for Matroska

Moritz Bunkus m.bunkus at linet-services.de
Fri Feb 29 09:42:54 CET 2008


Hey,

On Friday 29 February 2008 04:40:35 David Schleef wrote:

> Now that Schroedinger-1.0.0 is out, I'm working on integrating Dirac
> support into other projects.  I'd like to get a specification nailed
> down (and a link on the Dirac website) on how to embed a Dirac stream
> into Matroska.

Sounds good :)

> I implemented the obvious "V_DIRAC" mapping in GStreamer's matroskamux
> and matroskademux elements using V_MPEG2 as an example.  It appears to
> work fine, but, uh, that means very little.
>
> Example of Dirac in Matroska at:
> http://www.schleef.org/~ds/dirac_example.mkv

Here are a couple of thoughts and questions that occured to me when I
took a look at that file.

1. Sequence headers. In Matroska each block should contain actual image
data, not just sequence headers. At the moment you write two blocks with
the same timestamp, one for the sequence header, one for the actual
frame:

I frame, track 1, timecode 9600 (00:00:09.600), size 25, adler 0x473d071c
I frame, track 1, timecode 9600 (00:00:09.600), size 8582, adler 0xf754c179

This should be handled like it is for other video codecs: the sequence
headers and the actual video frame in a single Matroska block.

2. Frame types. At the moment you don't write any backward/forward
reference and therefore all frames are considered to be "I" frames ("I"
in the loosest sense of the word, meaning that you don't need any other
frame before you can decode this one).

So what kind of frame types does Dirac know? Can you ONLY start decoding
at a frame right after a sequence header? Or are there frames for which
there are no sequence headers directly in front of them? Is something
like this possible (I = I frame, s = sequence header, n = non-I-frame):

sInnInnnnnInnsI...

or is there always a sequence header for an I frame (like
sInnsInnnnnsInnsI...)?

3. The very start of the stream actually contains three Matroska blocks
for the same timestamp:

I frame, track 1, timecode 0 (00:00:00.000), size 34, adler 0x75650798
I frame, track 1, timecode 0 (00:00:00.000), size 25, adler 0x3bf5063f
I frame, track 1, timecode 0 (00:00:00.000), size 8549, adler 0x55699322

I guess that one's a sequence header, the last one is the actual video
frame, but what's the other? Is that some kind of data that would better
be located in the CodecPrivate element (at the moment there isn't one)?

4. CodecID. V_DIRAC is fine with me; I don't think we need to change it.

5. Hmmm... I forgot 5. ;)

More questions might come later.

Regards,
Mosu

-- 
** Besuchen Sie uns auf der CeBIT vom 04. - 09. März 2008 in Hannover **
** Sie finden uns auf dem Univention Partnerstand (Halle 5/C45)       **

Dipl.-Inform. Moritz Bunkus
Geschäftsführung

LINET Services GbR  |  Gotenweg 15  |  38106 Braunschweig
Tel. 0531-180508-0  |  Fax 0531-180508-29

http://www.linet-services.de

Vertretungsberechtigte Gesellschafter:
Moritz Bunkus, Philip Reetz und Timo Springmann

USt-IdNr. DE 206946144

-------------- 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/20080229/6b4212ef/attachment.pgp>


More information about the Matroska-devel mailing list