视频播放控制总结

来源:互联网 发布:网络舆情管理的方法 编辑:程序博客网 时间:2024/05/16 10:40

 

一、倒放 

现在的媒体编码技术都是采用的预测编码,也就是说根据前一帧的内容,算出下一帧的内容,因此如果需要显示出下一帧,必须要有前一帧的存在,因此解码顺序必须是从前往后,但是,当你顺序的解码完毕以后,你就可以把所有的帧都当成是一幅已知的静止图片,这个时候你就可以随意的播放了,不论正放或倒放。好在这样做并不需要你一次性的将整部片子都解码过来,因为每隔一段距离就会有一个关键帧的存在,它不是通过预测编码得到的,因此你如果需要倒放,只需要解码两个关键帧中间的全部帧,然后,将解码完毕的全部的帧从后往前依次播放即可。

其实很简单,对于MPEG视频首先把一个GOP解码,然后按照反方向放入缓冲区,播放的速度可以调也可以和视频的播放速度一样,对于别的视频格式要保证解码数据段的完整性

http://blog.sina.com.cn/s/blog_46dc65a90100a9wg.html

二、快放

三、慢放

四、

 

最开始学习264的时候,只知道一个GOP的概念,后来又有了open/closed之分,感觉很神奇,不知道这些人在折腾什么事情。

B-Frames are Bidirectional frames. They can get information from the previous or following I or P-Frames. With a closed GOP, the B-Frame(s) at the end can only use data from the previous I or P-Frame, and as a result, they will be larger than they might be if the GOP is open. With an open GOP, it can "look" beyond the GOP boundary for the data. As a result, they'll be smaller usually. The upshot is that the quality will be better by a little bit for the same file size with open GOPs. And jdobbs, as always, was right.

Closed GOPs are useful only if you are planning to do some editing of the MPEG. I think ILVU or angles might also require closed GOPs. I could be wrong about that though. I could be wrong about anything I've said. But that's my story and I'm sticking to it.

还是翻译一段文章,个人感觉这个还是比较好理解的。

B帧是双向预测帧。他们可以参考前面或者后面的I帧或者P帧(按照解码顺序)。对于Closed GOP,在一个GOP最后的B帧,只能参考前向的I帧或者P帧,当然,编码效率会下降。对于Open GOP,B帧可以跨越GOP的界限,参考后续的I帧或者P帧。

原创粉丝点击