How to measure real-time FPS in html5 video during playback

I am working on real-time frame rate measurement of html5 video, does anyone have any ideas? Since I did not find information about the properties of the frame in the html5 video, I have no idea how to do this.

Another alternative is how to access each frame displayed by the html5 video (perhaps there is a frame with a frame during playback). I tried using the canvas to get the image from the video drawImage and get the frame data by getImageData, but it seems that the received frame data does not match the frame by frame being played in the video, maybe there are 100 frames, but we can get 120 0r 70 frames with using the getImageData method.

So, in short, how to get real-time fps or every frame displayed during html5 video playback?

+4
source share
1 answer

The HTML5 video tag does not support dropped frames or real fps metrics. However, there is a proposal to add such indicators in the future. See http://wiki.whatwg.org/wiki/Video_Metrics for more details. The page also has video metrics for other players such as flash.

+6
source

All Articles