- From: Jeroen Wijering <jeroen@longtailvideo.com>
- Date: Wed, 12 Jan 2011 11:15:30 +0100
On Jan 12, 2011, at 11:04 AM, whatwg-request at lists.whatwg.org wrote: > Date: Wed, 12 Jan 2011 11:54:47 +0200 > From: Mikko Rantalainen <mikko.rantalainen at peda.net> > To: whatwg at lists.whatwg.org > Subject: Re: [whatwg] HTML5 video: frame accuracy / SMPTE > Message-ID: <4D2D7A67.7090104 at peda.net> > Content-Type: text/plain; charset=ISO-8859-1 > > 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. Alternatively, one could look at a step() function instead of a seek(pos,exact) function. The step function can be used for frame-accurate controls. e.g. step(2) or step(-1). The advantage over a seek(pos,exact) function (and the playback rate controls) is that the viewer really knows the video is X frames offset. This is very useful for both artistic/editing applications and for video analysis applications (think sports, medical or experiments). The downside of a step() to either always accurate seeking or a seek(pos,exact) is that it requires two steps in situations like bookmarking or chaptering. It seems like the framerate / SMPTE proposals done here are all a means to end up with frame-accurate seeking. With a step() function in place, there's no need for such things. In fact, one could do a step(10) or so and then use the difference in position to calculate framerate. - Jeroen
Received on Wednesday, 12 January 2011 02:15:30 UTC