[issue2736] datetime needs and "epoch" method

STINNER Victor report at bugs.python.org
Mon Nov 24 17:00:40 CET 2008


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Timedelta formats:

(a) Win64: 64 bits unsigned integer, number of 1/10 microsecond
 - file format: Microsoft Word document (.doc), ASF video (.asf)

(b) 64 bits float, number of seconds
 - file format: AMF metadata used in Flash video (.flv)

Other file formats use multiple numbers to store a duration:

[AVI video]
 - 3 integers (32 bits unsigned): length, rate, scale
 - seconds = length / (rate / scale) 
 - (seconds = length * scale / rate)

[WAV audio]
 - 2 integers (32 bits unsigned): us_per_frame, total_frame
 - seconds = total_frame * (1000000 / us_per_frame)

[Ogg Vorbis]
 - 2 integers: sample_rate (32 bits unsigned), position (64 bits 
unsigned)
 - seconds = position / sample_rate

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2736>
_______________________________________


More information about the Python-bugs-list mailing list