W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] Exposing framerate / statistics of <video> playback and related feedback

From: Charles Pritchard <chuck@jumis.com>
Date: Tue, 01 May 2012 10:35:35 -0700
Message-ID: <4FA01EE7.6030407@jumis.com>
On 5/1/12 10:21 AM, Hugh Guiney wrote:
>> >  If you have fixed frame rates, it's trivial to do the conversion to and
>> >  from SMTPE timecode in JavaScript; you don't need any direct support from
>> >  the media element API.
> Yes, but we currently have no way of knowing what fixed frame rate we
> are working with, making this kind of conversion impossible except
> through pure guesswork. If frame rate is exposed we don't need SMPTE
> internally.

The frame rate issue seems to have come up with media capture as well.

The list looked at having a (canvas) ctx.stream = mediaElement; option 
to better copy frames from a media stream into Canvas. I don't think 
that the assignment operator will work, but it does seem like we could 
optimize our drawImage calls to only happen when needed. At present, we 
simply would run requestAnimationFrame. But, if a video stream is 
operating on a slower frame rate than rAF, then the drawImage + rAF 
method will be wasteful.

I've suggested an onframeready event; it seems as though that event 
could also carry the number of dropped frames.

All that said, I'm a little behind on the media tags, so apologies if 
I've missed some already existing mechanisms.

-Charles
Received on Tuesday, 1 May 2012 10:35:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT