[Matroska-users] Question about duration

Moritz Bunkus moritz at bunkus.org
Thu Jan 10 09:29:37 CET 2013


On Thu, Jan 10, 2013 at 1:17 AM, Dan Hinsley <danhi at cox.net> wrote:

> I have a file with one segment, and no TimecodeScale in the Info segment.
> In the info segment there is a Duration element with a value of 0x48185800.
> When I run mkvinfo on the file, I get a duration of 156 seconds (which is
> correct).  Now the way that I read the spec is that the duration (with a
> default TimecodeScale of 1,000,000) should be the duration in msecs.  So I
> can’t figure out how to get from 1,209,554,944 to 156.

The segment duration is a floating point value, not an integer. Read
it into a IEEE 8bit floating point variable ("double" in C/C++, don't
know the equivalents in other languages).

Kind regards,

More information about the Matroska-users mailing list