[Matroska-devel] Duration (EBML: 44 89) in Seg inf part
Peter Ivanov
qwerty123_1996 at abv.bg
Wed Mar 6 13:33:31 CET 2013
How I could find what is the value of the TimecodeScale?
I am working on test1.mkv file from download section on matroska.org
With mkvinfo.exe the Duration in Segment Information part is:
Duration: 87.336s(00:01:27.336), but my hex value is 0x47AA9400
In float this is 1202361344.00000
1202361344.00000 *1000000 = doesn't equal to 87.336
Where is my mistake?
-------- Оригинално писмо --------
От: Moritz Bunkus moritz at bunkus.org
Относно: Re: [Matroska-devel] Duration (EBML: 44 89) in Seg inf part
До: Discussion about the current and future development of Matroska
Изпратено на: Сряда, 2013, Март 6 13:55:59 EET
Hey,
SegmentDuration is an EBML float, not an integer. See
http://www.matroska.org/technical/specs/index.html and see
http://www.matroska.org/technical/specs/rfc/index.html
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,
mosu
_______________________________________________
Matroska-devel mailing list
Matroska-devel at lists.matroska.org
http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20130306/72df5024/attachment-0001.html>
More information about the Matroska-devel
mailing list