HTML5 Player : Wrong frame shown for fixed length GOP video

橙三吉。 提交于 2019-12-24 13:15:09

问题


I’m trying to create a frame accurate player for mp4.

When I play on frame by frame mode something wrong happens: there is jump then a freeze of a frame. For example, I’m at the frame 11, then 12, then 15, the 15th frame shows tree times. So at the end of the jump the playing become again correct. (I checked the frames 13 and 14 exists, I could see when with VLC and ffmpeg)

I analyzed my video and noticed that the freeze-frame is always a I-frame (frame 15 in my example). It happens at every new I-frame. This problem occurs with video of a GOP of 20 but also with a 200-GOP video. As if, whatever the GOP is, the player can’t compute the last 2 frames before an I-frame.

I use chrome and my next-frame function is nothing but “video.currentTime += frameRate”, but the “jump and freeze” also happens if I increase my currentTime by less than frameRate.

I kind of feel like, the issue come from the tag, do you agree with it? Do you have any idea to solve this problem? I really need to have 100% frame accurate player.

Thank you in advance

Here is the link to dowload a sample video (this a variable GOP video, the GOP is close to 20) : https://mega.co.nz/#!24ciyIBQ!v5rU3Vd5cWXMyv13xz0uqed_mOYFziwzbfL-nK_k5hI

You can try it here : http://thotcanalplus.uphero.com/player.html

来源:https://stackoverflow.com/questions/30574808/html5-player-wrong-frame-shown-for-fixed-length-gop-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!