当前位置:网站首页>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.
边栏推荐
猜你喜欢
随机推荐
软件开发设计流程
如何在WordPress网站上添加导航菜单
MySQL数据库进阶篇
2D转换模块&&媒体查询
flex-direction容器属性
边缘计算与小程序也能结合!智能家居是否能借势上台阶
WEB安全基础 - - -漏洞扫描器
The difference between truncate and delete in MySQL database
数据库的严格模式
.NET 跨平台应用开发动手教程 |用 Uno Platform 构建一个 Kanban-style Todo App
45. [Application of list linked list]
How to solve the error of joiplay simulator
Word文件损坏如何修复
In-depth understanding of the auto-increment operator from two error-prone written test questions
SWM32系列教程6-Systick和PWM
registers (assembly language)
what is jira
Shell脚本 if语句
Axure Carousel
46.







