Page 1 of 1

Poor reliability with input.time?

Posted: 01 Apr 2009 08:48
by samdutton
It looks from some testing I've done as if it's difficult to get input.time reliably. I'm using VLC 0.9.8a with Internet Explorer 7 and Firefox 3.0.7 on Windows.

Am I missing something, or is there a better way to do this?

Full details below.

Sam Dutton

................................

I wrote a test that uses JavaScript to check input.time every 100 milliseconds using setTimeout. (The frequency of testing can be changed, but doesn't seem to affect the result.) The times are collected, but not displayed, in case rendering the numbers affects the result.

The results are quite poor.

A sample is given below. The latency (if that's the correct word) is much worse, for example, than with a QuickTime plugin or for timeupdate events from the HTML 5 video element.

The worst aspect is probably the duplicates: these are times that were reported as being the same, even though the time is being checked no more frequently than every 0.01 second. (In other words, to accuracy of two decimal places the time should never be displayed as the same.)

Changing the displayed size of the video doesn't seem to make any difference.

--------------------------------------------------------------------------------
Tested from 0.00 to 337.52, a total of 337.52 seconds.
--------------------------------------------------------------------------------
Average interval: 0.45
--------------------------------------------------------------------------------
Median interval: 0.44
--------------------------------------------------------------------------------
Smallest interval: 0.15
--------------------------------------------------------------------------------
Largest interval: 1.84
--------------------------------------------------------------------------------
Number of duplicates: 2326
--------------------------------------------------------------------------------
Intervals: 1.84 1.84 1.44 0.26 1.06 1.24 1.84 1.68 1.60 0.26 1.30 0.56 0.44 0.48 0.44 0.40 0.48 0.48 0.44 0.40 0.56 0.36 0.40 0.56 0.44 0.44 0.48 0.48 0.44 0.44 0.44 0.40 0.48 0.52 0.48 0.48 0.44 0.36 0.44 0.16 0.40 0.48 0.40 0.52 0.40 0.52 0.36 0.40 0.48 0.48 0.52 0.40 0.52 0.44 0.40 0.52 0.44 0.36 0.52 0.32 0.15 0.45 0.48 0.40 0.44 0.52 0.44 0.48 0.44 0.52 0.40 0.52 0.44 0.44 0.52 0.48 0.36 0.44 0.48 0.44 0.32 0.16 0.41 0.36 0.48 0.40 0.40 0.44 0.48 0.44 0.32 0.48 0.52 0.36 0.40 0.56 0.48 0.52 0.36 0.56 0.32 0.48 0.40 0.48 0.40 0.52 0.36 0.44 0.40 0.16 0.36 0.40 0.44 0.32 0.40 0.44 0.40 0.40 0.48 0.48 0.40 0.40 0.44 0.44 0.40 0.40 0.56 0.36 0.44 0.36 0.52 0.40 0.52 0.48 0.36 0.52 0.36 0.44 0.48 0.32 0.40 0.56 0.48 0.44 0.32 0.52 0.40 0.56 0.44 0.48 0.40 0.48 0.44 0.48 0.48 0.40 0.36 0.44 0.40 0.44 0.48 0.40 0.44 0.40 0.40 0.44 0.44 0.48 0.44 0.36 0.48 0.44 0.48 0.40 0.48 0.48 0.40 0.44 0.44 0.36 0.40 0.44 0.44 0.44 0.44 0.52 0.40 0.52 0.44 0.40 0.40 0.48 0.48 0.40 0.44 0.48 0.44 0.36 0.52 0.40 0.52 0.44 0.40 0.36 0.44 0.44 0.48 0.36 0.48 0.40 0.36 0.44 0.40 0.44 0.52 0.48 0.44 0.52 0.44 0.48 0.44 0.40 0.48 0.36 0.48 0.40 0.44 0.44 0.40 0.52 0.44 0.40 0.40 0.40 0.44 0.36 0.44 0.40 0.44 0.48 0.48 0.44 0.48 0.48 0.44 0.44 0.44 0.40 0.44 0.40 0.48 0.36 0.40 0.40 0.36 0.44 0.48 0.44 0.40 0.32 0.44 0.48 0.44 0.48 0.40 0.56 0.40 0.48 0.44 0.40 0.40 0.44 0.40 0.40 0.48 0.44 0.40 0.44 0.44 0.44 0.44 0.48 0.52 0.44 0.44 0.40 0.40 0.48 0.40 0.48 0.44 0.52 0.48 0.44 0.52 0.48 0.40 0.52 0.44 0.48 0.32 0.48 0.44 0.48 0.44 0.44 0.44 0.44 0.44 0.44 0.40 0.44 0.48 0.40 0.36 0.48 0.48 0.44 0.40 0.48 0.40 0.48 0.44 0.48 0.48 0.44 0.44 0.48 0.44 0.40 0.44 0.44 0.48 0.52 0.40 0.44 0.40 0.44 0.48 0.44 0.44 0.44 0.48 0.52 0.48 0.48 0.48 0.44 0.44 0.28 0.19 0.33 0.44 0.48 0.32 0.48 0.44 0.44 0.44 0.52 0.44 0.44 0.40 0.48 0.48 0.48 0.48 0.44 0.40 0.48 0.36 0.40 0.44 0.44 0.44 0.44 0.48 0.44 0.44 0.44 0.44 0.44 0.48 0.44 0.40 0.44 0.48 0.48 0.40 0.48 0.44 0.44 0.48 0.48 0.48 0.44 0.44 0.48 0.44 0.48 0.44 0.48 0.44 0.36 0.44 0.40 0.52 0.44 0.44 0.44 0.48 0.40 0.56 0.44 0.48 0.40 0.44 0.44 0.48 0.48 0.40 0.44 0.36 0.48 0.40 0.44 0.48 0.44 0.48 0.44 0.44 0.40 0.48 0.36 0.48 0.44 0.40 0.44 0.40 0.44 0.44 0.44 0.44 0.36 0.44 0.52 0.48 0.44 0.52 0.44 0.48 0.40 0.44 0.40 0.44 0.40 0.44 0.48 0.44 0.40 0.40 0.40 0.40 0.44 0.40 0.48 0.48 0.44 0.40 0.48 0.28 0.48 0.48 0.44 0.40 0.44 0.36 0.44 0.52 0.32 0.48 0.48 0.36 0.44 0.40 0.36 0.52 0.36 0.52 0.32 0.52 0.44 0.44 0.44 0.44 0.36 0.44 0.40 0.40 0.44 0.40 0.44 0.44 0.44 0.44 0.48 0.40 0.48 0.44 0.48 0.36 0.44 0.36 0.52 0.40 0.44 0.44 0.48 0.40 0.48 0.40 0.44 0.40 0.40 0.40 0.48 0.48 0.44 0.44 0.40 0.48 0.40 0.48 0.44 0.36 0.52 0.48 0.40 0.48 0.32 0.16 0.28 0.52 0.44 0.52 0.40 0.52 0.40 0.44 0.44 0.48 0.48 0.44 0.44 0.44 0.48 0.40 0.48 0.40 0.44 0.48 0.44 0.44 0.52 0.28 0.16 0.40 0.36 0.44 0.44 0.44 0.44 0.32 0.48 0.52 0.40 0.40 0.44 0.44 0.48 0.48 0.44 0.48 0.52 0.44 0.44 0.36 0.40 0.48 0.44 0.40 0.36 0.48 0.40 0.48 0.40 0.40 0.44 0.48 0.44 0.48 0.44 0.44 0.44 0.48 0.48 0.44 0.44 0.40 0.40 0.44 0.44 0.44 0.40 0.32 0.44 0.58 0.34 0.52 0.44 0.48 0.44 0.40 0.44 0.44 0.44 0.44 0.48 0.36 0.48 0.44 0.48 0.40 0.48 0.44 0.52 0.44 0.40 0.44 0.48 0.40 0.48 0.40 0.56 0.44 0.48 0.44 0.48 0.36 0.48 0.40 0.40 0.44 0.44 0.40 0.40 0.44 0.40 0.44 0.52 0.48 0.44 0.48 0.40 0.48 0.40 0.40 0.48 0.44 0.48 0.44 0.40 0.48 0.44 0.40 0.40 0.36 0.48 0.44 0.48 0.48 0.36 0.44 0.44 0.52 0.40 0.52 0.44 0.40 0.40 0.44 0.44 0.48 0.44 0.40 0.40 0.44 0.48 0.40 0.56 0.48 0.40 0.44 0.36 0.44 0.48 0.40 0.40 0.36 0.48 0.48 0.40 0.44 0.44 0.44 0.40 0.48 0.40 0.44 0.48 0.44 0.40 0.40 0.48 0.36 0.44 0.44 0.48 0.44 0.44 0.44 0.48 0.40 0.52 0.36 0.52 0.44 0.48 0.36 0.52 0.48 0.48 0.40 0.36 0.44 0.48 0.48 0.48 0.48 0.52
--------------------------------------------------------------------------------

Re: Poor reliability with input.time?

Posted: 01 Apr 2009 21:12
by revolunet
i think input.position and input.length are more reliable

Re: Poor reliability with input.time?

Posted: 07 Apr 2009 16:35
by bfcapell
It would be good having input.time working properly. Do you know what can be the cause for these problems? I have looked at the code, but it's difficult to know where to start.