[Matroska-devel] MPEG2 in MKV!

Christian HJ Wiesner chris at matroska.org
Thu Oct 30 10:21:10 CET 2003


spyder wrote:

>Ok, new problem...Pamel and I were discussing this and removing sections of 
>an MPEG2 MKV file could produce erroneous files if you remove a sequence 
>header that changed the quantizers in mid-stream which would make the rest of 
>the file invalid.  We need a better way to store the sequence header or 
>otherwise the overhead for storing the sequence headers with every GOP would 
>be tremendous, a few hundred extra bytes per I frame.  The sequence header 
>can change properties of the video stream so it must be written in the file 
>and not just tucked away in codec private.
>  
>
John,

i was recently pointed to the 'codec state' element that is already in 
the MKV specs, could this element be used to store the sequence headers 
maybe ? With 'codec state' , IIRC, the idea behind it was to be able to 
change the picture resolution, colourspace etc. during playback and 
within one video stream, without creating several streams and appending 
them. Only thing that couldnt be changed was the codec itself AFAIK. 
Basically, if the parser finds a 'codec state' element in the stream, it 
has to reinitialize the codec completely, dont know if its ever possible 
to play such a stream on DirectShow, maybe only if we finally implement 
a resizing filter into the splitter, dont know, the DShow experts to 
clarify please.

This leads me to another problem : you are aware that we can not make 
and release a MPEG2 decoder specifically for MPEG2 coming from MKV, do 
you ? Is there any chance to reproduce at least an MPEG2 Elementary 
Stream from the MPEG2 track in MKV, such that external existing decoders 
can play the stuff, like ffdshow etc. ? Please tell me its possible and 
you didnt forget that  :-) .....

Christian






More information about the Matroska-devel mailing list