[whatwg] HTML5 video: frame accuracy / SMPTE

Mikko Rantalainen mikko.rantalainen at peda.net
Wed Jan 12 01:54:47 PST 2011


2011-01-12 00:40 EEST: Rob Coenen:
> Hi David- that is b/c in an ideal world I'd want to seek to a time expressed
> as a SMPTE timecode (think web apps that let users step x frames back, seek
> y frames forward etc.). In order to convert SMPTE to the floating point
> value for video.seekTime I need to know the frame rate.

It seems to me that such an application really requires a method for
querying the timestamp for previous and next frames when given a
timestamp. If such an application requires FPS value, it can then
compute it by itself it such a value is assumed meaningful. (Simply get
next frame timestamp from zero timestamp and continue for a couple of
frames to compute FPS and check if the FPS seems to be stable.)

Perhaps there should be a method

getRelativeFrameTime(timestamp, relation)

where timestamp is the "current" timestamp and relation is one of
previousFrame, nextFrame, previousKeyFrame, nextKeyFrame?

Use of this method could be allowed only for paused video if needed for
simple implementation.

-- 
Mikko





More information about the whatwg mailing list