[Matroska-general] Representation of a Matroksa file [building the right structure for the file in mkv format]

netmonitoring netmonitoring at mail.ru
Fri May 21 09:36:15 CEST 2010


Hello, МАТРЁШКА developers team.

I have a question about representation of a Matroksa file. 
In http://matroska.org/technical/diagram/index.html Matroska diagram shown, that sequency of structures must be: Header, Meta Seek Information, Segment Information, Track, Chapters, Clusters, Cueing, Data, Attachment, Tagging. 
As shown, the "Meta Seek Information" must going after "Header" and before "Segment Information". Like this sample:

movie.mkv {
 EBML {
  DocType
  DocTypeVersion
  DocTypeReadVersion
 }
 Segment {
  SeekHead
  Void
  Info
  Tracks
  Cluster
  Cues
 }
}

To make it, i must reserve some space for "Meta Seek Information" before i create "Segment Information" structure, and replace reserved space with "Meta Seek Information" at the end of file. It is not convinient and perspective, because "you do not know how much space you need". Reminds the story about AVI OpenDML container memory reserving for the file size.

The question is: is it neccessarily to reserve space and replace it with "Meta Seek Information" structure later or it's possible to put "Meta Seek Information" at the end of "Segment Information" without reserving space? The Matroska file structure will not be distorted? If my file structure is like this:

movie.mkv {
 EBML {
  DocType
  DocTypeVersion
  DocTypeReadVersion
 }
 Segment {
  Info
  Tracks
  Cluster
  Cues
  SeekHead
 }
}



More information about the Matroska-general mailing list