admin 发表于 2023-2-19 17:50:27

【原理介绍】视频编码之I帧 、P帧、B帧


                                                                        <section style="box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin-top: 10px; margin-bottom: 10px;box-sizing: border-box; "><section class="" style="padding-top: 10px; padding-bottom: 10px; box-sizing: border-box;"><section class="" style="display: inline-block; width: 100%; box-sizing: border-box;"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="   box-sizing: border-box; "><section class="" style="box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="line-height: 1.45; color: rgb(249, 110, 87); font-size: 22px; box-sizing: border-box;">视频传输原理</span><span style="line-height: 1.45; box-sizing: border-box;"> </span></section><section style="box-sizing: border-box;"><span style="line-height: 1.45; box-sizing: border-box;">         视频是利用人眼视觉暂留的原理,通过播放一系列的图片,使人眼产生运动的感觉。单纯传输视频画面,视频量非常大,对现有的网络和存储来说是不可接受的。为了能够使视频便于传输和存储,人们发现视频有大量重复的信息,如果将重复信息在发送端去掉,在接收端恢复出来,这样就大大减少了视频数据的文件,因此有了H.264视频压缩标准。</span></section><section style="box-sizing: border-box;">在H.264压缩标准中I帧、P帧、B帧用于表示传输的视频画面。</section><section style="box-sizing: border-box;"><span style="line-height: 1.45; box-sizing: border-box;"></span><br style="box-sizing: border-box;"></section><section style="box-sizing: border-box;"><br style="box-sizing: border-box;"></section></section></section></section></section> <section style="clear: both; box-sizing: border-box;"></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin: 0.5em auto; text-align: center; transform: translate3d(0px, 0px, 0px); -webkit-transform: translate3d(0px, 0px, 0px); -moz-transform: translate3d(0px, 0px, 0px); -o-transform: translate3d(0px, 0px, 0px);box-sizing: border-box; "></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin-top: 10px; margin-bottom: 10px;box-sizing: border-box; "><section class="" style="width: 2.6em; display: inline-block; vertical-align: middle; box-sizing: border-box;"><section style="width: 2.6em; height: 2.6em; display: inline-block; vertical-align: middle; line-height: 2.6em; text-align: center; border-radius: 50%; box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="width: 1.8em; height: 1.8em; line-height: 1.8em; border-radius: 50%; margin-top: 0.36em; margin-bottom: 0.35em; margin-left: 0.44em; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="" style="width: 100%; height: 100%; box-sizing: border-box;"><section style="box-sizing: border-box;">1</section></section></section></section><section style="margin: -0.5em auto 0.3em; width: 0px; border-top-width: 1.1em; border-top-style: solid; border-top-color: rgb(249, 110, 87); border-left-width: 1em !important; border-left-style: solid !important; border-left-color: transparent !important; border-right-width: 1.12em !important; border-right-style: solid !important; border-right-color: transparent !important; box-sizing: border-box;"></section></section><section class="" style="display: inline-block; vertical-align: middle; margin-bottom: -0.5em; margin-left: -1.5em; padding-right: 10px; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: rgb(249, 110, 87); box-sizing: border-box;"><section class="" style="display: inline-block; margin-left: 1.3em; padding-left: 5px; line-height: 1.5; font-size: 24px; box-sizing: border-box;"><section style="box-sizing: border-box;">I帧</section></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="   box-sizing: border-box; "><section class="" style="box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="line-height: 1.45; box-sizing: border-box;">    I帧又称帧内编码帧,是一种自带全部信息的独立帧,无需参考其它图像便可独立进行解码,可以简单理解为一张静态的画面。视频序列中的第一个帧始终都是 I帧,因为它是关键帧。</span><br style="box-sizing: border-box;"></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin-top: 10px; margin-bottom: 10px;box-sizing: border-box; "><section class="" style="width: 2.6em; display: inline-block; vertical-align: middle; box-sizing: border-box;"><section style="width: 2.6em; height: 2.6em; display: inline-block; vertical-align: middle; line-height: 2.6em; text-align: center; border-radius: 50%; box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="width: 1.8em; height: 1.8em; line-height: 1.8em; border-radius: 50%; margin-top: 0.36em; margin-bottom: 0.35em; margin-left: 0.44em; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="" style="width: 100%; height: 100%; box-sizing: border-box;"><section style="box-sizing: border-box;">2</section></section></section></section><section style="margin: -0.5em auto 0.3em; width: 0px; border-top-width: 1.1em; border-top-style: solid; border-top-color: rgb(249, 110, 87); border-left-width: 1em !important; border-left-style: solid !important; border-left-color: transparent !important; border-right-width: 1.12em !important; border-right-style: solid !important; border-right-color: transparent !important; box-sizing: border-box;"></section></section><section class="" style="display: inline-block; vertical-align: middle; margin-bottom: -0.5em; margin-left: -1.5em; padding-right: 10px; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: rgb(249, 110, 87); box-sizing: border-box;"><section class="" style="display: inline-block; margin-left: 1.3em; padding-left: 5px; line-height: 1.5; font-size: 24px; box-sizing: border-box;"><section style="box-sizing: border-box;">P帧</section></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="   box-sizing: border-box; "><section class="" style="box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="line-height: 1.45; box-sizing: border-box;">   P帧又称帧间预测编码帧,需要参考前面的I帧才能进行编码。表示的是当前帧画面与前一帧(前一帧可能是I帧也可能是P帧)的差别。解码时需要用之前缓存的画面叠加上本帧定义的差别,生成最终画面。与I帧相比,P帧通常占用更少的数据位,但不足是,由于P帧对前面的P和I参考帧有着复杂的依赖性,因此对传输错误非常敏感 。</span></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin: 0.5em auto; text-align: center;box-sizing: border-box; "></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="   box-sizing: border-box; "><section class="" style="box-sizing: border-box;"><section style="box-sizing: border-box;"><br style="box-sizing: border-box;"></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin-top: 10px; margin-bottom: 10px;box-sizing: border-box; "><section class="" style="width: 2.6em; display: inline-block; vertical-align: middle; box-sizing: border-box;"><section style="width: 2.6em; height: 2.6em; display: inline-block; vertical-align: middle; line-height: 2.6em; text-align: center; border-radius: 50%; box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="width: 1.8em; height: 1.8em; line-height: 1.8em; border-radius: 50%; margin-top: 0.36em; margin-bottom: 0.35em; margin-left: 0.44em; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="" style="width: 100%; height: 100%; box-sizing: border-box;"><section style="box-sizing: border-box;">3</section></section></section></section><section style="margin: -0.5em auto 0.3em; width: 0px; border-top-width: 1.1em; border-top-style: solid; border-top-color: rgb(249, 110, 87); border-left-width: 1em !important; border-left-style: solid !important; border-left-color: transparent !important; border-right-width: 1.12em !important; border-right-style: solid !important; border-right-color: transparent !important; box-sizing: border-box;"></section></section><section class="" style="display: inline-block; vertical-align: middle; margin-bottom: -0.5em; margin-left: -1.5em; padding-right: 10px; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: rgb(249, 110, 87); box-sizing: border-box;"><section class="" style="display: inline-block; margin-left: 1.3em; padding-left: 5px; line-height: 1.5; font-size: 24px; box-sizing: border-box;"><section style="box-sizing: border-box;">B帧</section></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="   box-sizing: border-box; "><section class="" style="box-sizing: border-box;"><section style="box-sizing: border-box;">    B帧又称双向预测编码帧,也就是B帧记录的是本帧与前后帧的差别。也就是说要解码B帧,不仅要取得之前的缓存画面,还要解码之后的画面,通过前后画面的与本帧数据的叠加取得最终的画面。B帧压缩率高,但是对解码性能要求较高。</section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin: 0.5em auto; text-align: center;box-sizing: border-box; "></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin-top: 10px; margin-bottom: 10px;box-sizing: border-box; "><section class="" style="width: 100%; text-align: center; box-sizing: border-box;"> </section><section class="" style="padding: 0.3em 0.5em; border-radius: 0.5em 0.5em 0px 0px; margin-top: -0.8em; text-align: center; width: 100%; color: white; box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;">综合来说</section></section><section class="" style="border: 1px solid rgb(249, 110, 87); border-radius: 0px 0px 0.5em 0.5em; padding: 10px; box-sizing: border-box;"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="   box-sizing: border-box; "><section class="" style="text-align: center; box-sizing: border-box;"><section style="text-align: left; box-sizing: border-box;">   I帧只需考虑本帧;<span style="line-height: 1.45; box-sizing: border-box;">P帧记录的是与前一帧的差别;</span><span style="line-height: 1.45; box-sizing: border-box;">B帧记录的是前一帧及后一帧的差别</span><span style="line-height: 1.45; box-sizing: border-box;">,能节约更多的空间,视频文件小了,但相对来说解码的时候就比较麻烦。因为在解码时,不仅要用之前缓存的画面,而且要知道下一个I或者P的画面,对于不支持B帧解码的播放器容易卡顿。</span></section></section></section></section><section class="Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" text-align: center; margin-top: 10px; margin-bottom: 10px;box-sizing: border-box; "></section></section><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="   box-sizing: border-box; "><section class="" style="text-align: center; box-sizing: border-box;"><section style="text-align: left; box-sizing: border-box;"><span style="line-height: 1.45; box-sizing: border-box;">   视频监控系统中预览的视频画面是实时的,对画面的流畅性要求较高。采用I帧、P帧进行视频传输可以提高网络的适应能力,且能降低解码成本所以现阶段的视频编码都只采用I帧和P帧进行传输。海康摄像机编码,I帧间隔是50,含49个P帧。</span></section><p style="text-align: left; box-sizing: border-box;"><br></p></section></section></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="   box-sizing: border-box; "><section class="" style="box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="background-color: rgb(255, 255, 255);">好了,小编的文章写完了,又要开始做宣传了,哇哈哈~售前选型,售后服务,请下载海康经销APP。 </span></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin-top: 10px; margin-bottom: 10px; padding-right: 3px; padding-left: 3px; text-align: center; overflow: hidden;box-sizing: border-box; "><section class="" style="height: 2.6em; box-sizing: border-box;"><section style="-webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -o-transform: rotate(-45deg); margin-top: -1em; box-sizing: border-box;"><section style="width: 2em; height: 2em; margin: auto; display: inline-block; box-sizing: border-box;"><section style="height: 100%; border-left-width: 0.2em; border-left-style: solid; border-left-color: rgb(249, 110, 87); border-bottom-width: 0.2em; border-bottom-style: solid; border-bottom-color: rgb(249, 110, 87); box-sizing: border-box; background-color: transparent !important;"></section></section></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" margin-top: 10px; margin-bottom: 10px; padding-right: 3px; padding-left: 3px; text-align: center; overflow: hidden;box-sizing: border-box; "><section class="" style="height: 2.6em; box-sizing: border-box;"><section style="-webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -o-transform: rotate(-45deg); margin-top: -1em; box-sizing: border-box;"><section style="width: 2em; height: 2em; margin: auto; display: inline-block; box-sizing: border-box;"><section style="height: 100%; border-left-width: 0.2em; border-left-style: solid; border-left-color: rgb(249, 110, 87); border-bottom-width: 0.2em; border-bottom-style: solid; border-bottom-color: rgb(249, 110, 87); box-sizing: border-box; background-color: transparent !important;"></section></section></section></section></section></section><section class="ui-sortable-handle Powered-by-XIUMI V5" style="   box-sizing: border-box; "><section class="" style=" text-align: center; margin-top: 10px; margin-bottom: 10px;box-sizing: border-box; "></section></section></section><p><br></p>
页: [1]
查看完整版本: 【原理介绍】视频编码之I帧 、P帧、B帧