当前位置:网站首页>The difference between h264 and h265 decoding
The difference between h264 and h265 decoding
2022-07-31 00:16:00 【MisterZhang666】
Simply explain the difference between h264 and h265 decoding
h264
I used the analysis tool to parse the h264 file and found:

In fact, it is SPS+PPS+SEI+IDR+P+B+P+B+P+B...SPS+PPS+I+P+B+P+B... This cycle, in which SEI only needs to be sent once, that is, at the time of the first frame, IDR and I frame are both so-called I frames. In order to distinguish the first I frame, it is called IDR frame. SEI only needs to be brought before the IDR frame, followed by every other period.There will be an I frame in time, and the rest are P frame + B frame cycles.
h265


h265 is actually a sequence with an additional vps, video parameter set, which is mainly used to transmit video rating information, which is conducive to the expansion of compatible standards in scalable video coding or multi-view video.It becomes VPS+SPS+PPS+SEI+IDR+P+B+P+B...VPS+SPS+PPS+SEI+CAR+P+B+P+B..., CAR is similar to I frame, type=19, 20, are all I frames, and 21 is CAR.
At this point, we found that h265 sends VPS and SEI every time, and it is not necessarily I frames that are sent in a loop.
NALU
Each SPS, PPS, IDR is a NALU, and the normal format of NALU is: start code+NALU header+NALU data.So to get the stream, you only need to parse out the NALU and get the header information normally, which is very simple.
The start code is usually 00 00 01 or 00 00 00 01, and the NALU header data can be used to determine whether it is VPS, SPS, or PPS.But it should be noted that the h264 header length is different from the h265 header length.
How to judge whether the video stream is H264 or H265
Usually it is to judge whether the type decimal in the NALU header is 32 (VPS) and it is h265, or whether the SEI decimal is 6 or 39, 6 is h264, etc.
边栏推荐
猜你喜欢
随机推荐
MySQL数据库约束,表的设计
数据库的严格模式
WebServer process explanation (registration module)
registers (assembly language)
Shell编程条件语句 test命令 整数值,字符串比较 逻辑测试 文件测试
360核心安全大脑3.0正式发布,构建政企用户的“能力中枢平台”
Learn Scope from a Compilation Perspective!
image里的mode属性
Linux 部署mysql 5.7全程跟踪 完整步骤 django部署
align-content、justify-content、align-items三个属性的作用和效果
(五)fastai应用
ctfshow 文件包含
Homework: iptables prevent nmap scan and binlog
ABC 261 F - Sorting Color Balls(逆序对)
Error ER_NOT_SUPPORTED_AUTH_MODE Client does not support authentication protocol requested by serv
An easy-to-use interface testing tools - the Postman
@requestmapping注解的作用及用法
Mysql体系化之JOIN运算实例分析
flex布局父项常见属性flex-wrap
47. 【Pointers and Arrays】




![DNS resolution process [visit website]](/img/58/ae9464dc714c4fcb958424ac134c99.png)




