想要改进 HTML5 视频播放器的倒带功能
Want to Improve the rewind function on HTML5 Video player
这不是一些编程问题。我正在做一个项目,我有不同格式的视频文件,例如 mov、mp4 等。
我的应用程序是使用具有 html5 和 css3 的 knockoutjs 构建的。
我们的客户要求是当他们播放视频并使用快进、倒带等功能时。视频渲染应该没有性能问题。
现在,我能够正确渲染视频并且快进功能与 html5 完美配合,我面临的问题是倒带,当用户点击倒带时,视频开始断断续续并丢帧,而这里的倒带功能对于用户来说是非常重要的。
现在我想对所有格式的视频做出一致的表现。
为了优化网站上的视频性能,理想的前进方式是什么。
非常感谢任何建议和帮助。
我不确定您是如何对视频进行编码的,但请考虑优化您的视频关键帧,看看是否可以提高倒带性能。
以下是对这可能有何帮助的简要概述:
http://www.lighterra.com/papers/videoencodingh264/#maximumkeyframeinterval
...we still want enough keyframes that seeking and fast-forwarding
behavior is good, because players can only jump directly to keyframes
"under the hood" during playback, and will usually only display the
keyframes during fast-forwarding and rewinding at higher speeds (at
low speeds such as 2x or 3x they can often play every frame). Jumping
to an arbitrary point in the timeline therefore becomes more sluggish
the fewer keyframes there are, because more intervening delta-frames
need to be decoded just to reconstruct the final target frame, even
though those intervening frames between the previous keyframe and the
target frame won't actually be displayed.
这不是一些编程问题。我正在做一个项目,我有不同格式的视频文件,例如 mov、mp4 等。
我的应用程序是使用具有 html5 和 css3 的 knockoutjs 构建的。
我们的客户要求是当他们播放视频并使用快进、倒带等功能时。视频渲染应该没有性能问题。
现在,我能够正确渲染视频并且快进功能与 html5 完美配合,我面临的问题是倒带,当用户点击倒带时,视频开始断断续续并丢帧,而这里的倒带功能对于用户来说是非常重要的。
现在我想对所有格式的视频做出一致的表现。
为了优化网站上的视频性能,理想的前进方式是什么。
非常感谢任何建议和帮助。
我不确定您是如何对视频进行编码的,但请考虑优化您的视频关键帧,看看是否可以提高倒带性能。
以下是对这可能有何帮助的简要概述: http://www.lighterra.com/papers/videoencodingh264/#maximumkeyframeinterval
...we still want enough keyframes that seeking and fast-forwarding behavior is good, because players can only jump directly to keyframes "under the hood" during playback, and will usually only display the keyframes during fast-forwarding and rewinding at higher speeds (at low speeds such as 2x or 3x they can often play every frame). Jumping to an arbitrary point in the timeline therefore becomes more sluggish the fewer keyframes there are, because more intervening delta-frames need to be decoded just to reconstruct the final target frame, even though those intervening frames between the previous keyframe and the target frame won't actually be displayed.