[Matroska-general] [Matroska-devel] Duration (EBML: 44 89) in Seg inf part

Moritz Bunkus moritz at bunkus.org
Wed Mar 6 12:55:59 CET 2013


SegmentDuration is an EBML float, not an integer. See
http://www.matroska.org/technical/specs/index.html and see

So: read it as a four-byte IEEE floating point number (C data type:
"float"), cast into an eight-byte IEEE floating point number (C data
type: "double") in order to avoid overflows, then multiply by
TimecodeScale, and you should get the duration in nanoseconds.

Kind regards,

More information about the Matroska-general mailing list