Created mkvalidator ERR009 read doc type version higher than doc type version (markdown)

Moritz Bunkus 2015-02-07 20:38:57 +01:00
parent 31311202dc
commit 96c35c1277

@ -0,0 +1,31 @@
# mkvalidator error ERR009 "read DocType version higher than DocType version
## The problem
When running mkvalidator on a file generated by mkvmerge 5.9.0 or later it issues the following warning:
```
ERR009: The read DocType version 2 is higher than the Doctype version 4
```
What does this mean?
## The answer
This is a bug in mkvalidator in versions prior to 0.4.2. If you're running an earlier version please [upgrade to the latest one](http://www.matroska.org/downloads/mkvalidator.html).
## The in-depth explanation
In Matroska there are [two header fields](http://www.matroska.org/technical/specs/index.html) that include information about the Matroska standards/specs version number used. One is the `DocTypeVersion` and one the `DocTypeReadVersion`.
The first one, the `DocTypeVersion`, must be set to the highest version number of the Matroska specs from which the muxer creating the file has used elements from. E.g. if the muxer used `SimpleBlock` elements then the `DocTypeVersion` must be at least 2 because the `SimpleBlock` element was added in Matroska v2.
The other element, `DocTypeReadVersion`, must be set to the minimum Matroska version that a player must support properly in order to be able to play back the file. This is meant to ensure that players that support older versions can still play files created by newer tools even if elements from newer versions of the specs are used.
Logically it is easy to see that `DocTypeVersion` must always be the same or higher than `DocTypeReadVersion`.
Starting with 5.9.0 mkvmerge writes two elements from the v4 specs, `CueDuration` and `CueRelativePosition`. Therefore mkvmerge sets `DocTypeVersion` to 4. However, those elements only provide additional information that is not strictly required for playback, not even for seeking (which they aim to improve). Therefore it leaves `DocTypeReadVersion` at 2.
And here's where the bug in mkvalidator lay: it compared `DocTypeReadVersion < DocTypeVersion` instead of the other way around. The error it therefore issued, however, is correct in its wording; only the numbers listed didn't make sense because they're taken directly from the file.
Categories: [mkvalidator](Category-mkvalidator)