W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2011

[whatwg] HTML5 video: frame accuracy / SMPTE

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Wed, 12 Jan 2011 11:54:47 +0200
Message-ID: <4D2D7A67.7090104@peda.net>
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
Received on Wednesday, 12 January 2011 01:54:47 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:29 UTC