[FLVTool2-users] Precision Timestamps in Cuepoints

Thomas Schwaier tschwaier at gmx.de
Tue May 5 04:15:33 EDT 2009


Hi there!

First the good:

Thank y'all for such a useful tool!

Now the bad:

As I've seen from the archives, a few others did have the same problem
as I had with the "Integer rounded" timestamps, but no one has received
an answer of fix.

The Problem:

When one wants to add a cuePoint with a time stamp value, which is not
divisble by 1000 without a rest (e.g. 2525), the timestamp values are
generally floored to multiples of 1000.

Example:

Timestamp value 333 gets floored to 0  and Timestamp value 2100 to 2000,
etc..

This looked an awful lot like an Integer Division by 1000 somewhere in
the code instead of a Float or Double Division - and thats exactly what
it turned out to be!

Pieter Thysebaert, who had send a request about this problem in
September last year - but never got an answer, pointed me in the right
direction.

In a later post in some other forum I found on Google he posted that he
had created a patch. I contacted him and he was kind enough to share his
findings with me.

In the file *"lib/flvtool2/base.rb"* on *line 75* it says

*data['time'] = tag.timestamp / 1000
*
which shows an Integer division. By adding a (presumably forgotten)
*".0"* ruby does a Float/Double division

data['time'] = tag.timestamp / 1000*.0*

Now I have checked out the latest build from SVN , changed the above
line and recompiled it under Windows (which is a pain btw, if you don't
know squat about ruby) and now it works just fine!

The questions I'm asking myself now are:

Does anybody care?

Was this a bug or a feature?

Since more the one person asked for it on this mailing list, I was
wondering if it will be updated in the future or not?

Judging by the "final" keyword in the 1.0.6 Release and the
little-to-zero recent activity on this list, my educated guess is no.
But it'd be a shame if such a tiny bug would persist and stop a good
tool from being great.

So please, could someone(Norman?!) commit this tiny change or tell me at
least why not?

Well thanks for reading and maybe this helps somebody, sometime.

Greetings,

Thomas




More information about the Flvtool2-users mailing list