[Matroska-devel] Re: MPEG2 in MKV!

Pamel paul at msn.com
Thu Oct 30 17:32:36 CET 2003


So far we have two options for the Sequence Headers:

1. Store the sequence header inside the Block with every I frame.  If the
sequence header changes before a P frame, then store it with the P frame, and
every following I frame.

2. Use the CodecState element in Matroska which is what it is for.  The sequence
header will likely be repeated before every I frame anyway so this would take
two or three additional bytes as you have to store the EBML element and size.

Honestly the CodecState is more finesse, but I hate it.  There is no way to know
where a codec state is in a stream.  If you seek, then you are going to miss the
codec state and your decode will be screwed.  But if you put the codec state in
the track information, would it be any good for streaming?

The biggest problem is that the existing MPEG-2 decoders expect so much stuff
that it makes it hard to do things well.  If we tweaked existing MPEG-2
decoders, this would be a lot easier.  For instance, MPEG-2 decoders expect the
Sequence Headers as part of the stream, so even if it was in a seperate element
it would need to be just put into the stream for the MPEG-2 decoders.

I vote for option 1.  It may take an additional 150bytes per I frame in MPEG-2,
but in theory all of that is already in the stream so there shouldn't be any
additional bloat.


Pamel






More information about the Matroska-devel mailing list