简体   繁体   中英

how to measure the realtime FPS in html5 video while playback

I'm working on measuring the real-time frame rate of html5 video, does anyone has some ideas? Since I have not find the properties info about frame in html5 video, I have no idea about how to do that.

Another alternative, how to access each frame that html5-video displayed(maybe there are drop frame while playing). I have tried to use canvas to get image from video by drawImage, and get the frame data by getImageData, but it seems that the frame data obtained is not the same as the frame by frame played in video, maybe there are 100 frames played, but we can get 120 0r 70 etc frames by getImageData method.

So in summary, how to get the real time fps or each frame displayed while playing for html5 video?

HTML5 video tag does not support dropped frames or real fps metric yet. However there is a proposal to add such metrics in future. More details at http://wiki.whatwg.org/wiki/Video_Metrics . The page also has video metrics for other players like flash.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM