在javascript / jquery中获取当前视频帧 [英] Get current frame of video in javascript / jquery
问题描述
我正在使用html视频标签播放视频。在播放视频时,我希望视频的当前帧不是使用jquery或javascript的currentTime。
I am playing video using the html video tag. While playing video I want the current frame of the video not "currentTime" using jquery or javascript.
我可以通过计算视频和currentTime的fps来获取当前帧,但它没有给出确切的帧编号。我有什么想法可以解决这个问题吗?
I am able to get the current frame by doing the calculation of the fps of video and currentTime, but it is not giving the exact frame number. Any ideas how I can fix this?
推荐答案
我找到了这个问题的原因。我压缩我的视频因此压缩,fps降低,这就是为什么我无法获得正确的fps。现在我能够得到1-2帧的差异,但没关系。谢谢你的帮助。
I found cause of that problem. I was compressing my video therefore while compressing, fps gets reduced that's why I was not able to get correct fps. Now I'm able to get the with difference of 1-2 frames, but that's ok. Thanks for your help guys.
这篇关于在javascript / jquery中获取当前视频帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!