Poor reliability with input.time?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
samdutton
New Cone
New Cone
Posts: 1
Joined: 01 Apr 2009 08:39

Poor reliability with input.time?

Postby samdutton » 01 Apr 2009 08:48

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
--------------------------------------------------------------------------------

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Poor reliability with input.time?

Postby revolunet » 01 Apr 2009 21:12

i think input.position and input.length are more reliable
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

bfcapell
New Cone
New Cone
Posts: 3
Joined: 07 Apr 2009 15:29

Re: Poor reliability with input.time?

Postby bfcapell » 07 Apr 2009 16:35

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.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 11 guests