[Matroska-devel] SimpleBlock payload header size: 4 or 6 bytes?
mailinglists at energiequant.de
Mon Dec 30 21:00:46 CET 2013
Many thanks for your fast and detailed reply! :D
So it's really that the EBML header is included in that example *and*
the size calculation doesn't reflect the variable field lengths
correctly... It really puzzles me that those block specifications (same
for both SimpleBlock and Block structures) suddenly seem to be treated
separate from the rest of the specification by ignoring the fact that
SimpleBlock and Block are actually EBML tree elements as defined on the
element table, so only the payload needs to be specified in the
Block/SimpleBlock sections. It would really help the next one who reads
it if that calculation could be either corrected or removed as it is
otherwise just confusing to read.
My assumptions about fixed sizes are okay as my code doesn't go into a
separate library but is specific to one program I'm currently writing
(files always have one video + one audio track). If it would be split to
library code, then of course that would have to be corrected. Thanks for
the reminder, anyway. :)
On 12/30/2013 08:20 PM, Moritz Bunkus wrote:
>> Who misread the specification, is it me or FFMPEG?
> My guess would be: you. Otherwise FFMPEG would choke on each and every
> file that mkvmerge produces (because they all use SimpleBlock
> structures), but FFMPEG doesn't.
Just wanted to be sure. ;) For example, VLC appears to be currently
broken on most Linux distros when it comes to 8-byte long EBML data size
attributes (0x01 + 56 bit integer). I'm always using the maximum
attribute length as I'm encoding live AV streams and need to patch those
bytes that encode the segment size, cue point meta seek offset and total
segment duration when the recording ends. In that case, my use of fixed
data size attribute lengths and integer-encoded payloads appears to be
valid (and is at least understood by FFMPEG/libavformat, mkvinfo and
mkvalidator). BTW: The precompiled VLC for Windows can play my files
without problems, so it's really some issue on side of the player
(someone on the Ubuntu forums said it's some compilation issue; I'm on
Gentoo 64bit but also affected, so it clearly is some issue of VLC itself).
More information about the Matroska-devel