test4.mkv and EBML Elements with Unknown Size

Dave Rice <[email protected]> Wed, 30 Dec 2015 19:09:45 -0500
Newsgroups gmane.comp.multimedia.matroska.devel
Message-ID <[email protected]>
Hi Steve and Moritz,

The Matroska Test file suite is at http://matroska.org/downloads/test_w1.html. This includes test4.mkv which is an example of a live stream recording. However the file doesn’t appear to adhere to the EBML specs. It the file written wrong or are we missing something in the EBML specification?

Within this file is this extract from the beginning of the Segment element to the end of the Element ID of the Info Element.

18 53 80 67 FF 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 0A 15 49 A9 66

I understand that 0x18538067 is the Element ID of the Segment Element. 

The 0xFF represents the case where as the EBML draft spec states, "An Element Data Size with all VINT_DATA bits set to one is reserved as an indicator that the size of the Element is unknown.”

Next, between the Element Data Size of the Segment Element and the beginning of the Info Element there is 134 bytes of 0x0A! In this case 0x0A can not be a valid start of an Element ID since for this file the EBMLMaxIDLength is 4 (via the default). Thus the Segment Master-element has child data that is not an EBML Element.

Is the Segment Element here invalid since it contains immediate child data that is not a part of a child Element or should the EBML draft specification be updated to permit mystery data (sounds dangerous and complex)? Is there any documentation existing on this scenario? Should a parser keep reading from byte to byte until finding a valid Element ID again?

Dave Rice
_______________________________________________
Matroska-devel mailing list
[email protected]
http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel