当前位置:网站首页>h264 protocol

h264 protocol

2022-08-09 13:03:00 Know 12

h264 data consists of a Nalu header and bare stream

h264 protocol frame header data is often sps and pps

A complete h264 stream (excluding B-frames) consists of the following parts:

1.sps
The common value is 00 00 00 01 67, which contains the sequence parameters of this batch of images

2.pps
The common value is 00 00 00 01 68, which contains the parameters contained in a frame highlighting

3.sei
The common name is 00 00 00 06 05, which contains some supplementary information

3.I frame
Commonly it is 00 00 00 01 65, which is the key frame. When decoding, we only need to decode this frame.

4.P frame
Commonly it is 00 00 00 01 41, the difference from the previous frame is recorded here, and the previous frame can be superimposed

Insert image description here
Only one thread is used here, ret is 1 frameThe data, x264Encoder.m_pX264Nals[i].i_payload is the payload data, Each key frame consists of 4 Nalu:
The first one is sps, which has 31 bytes
The second is pps, with 8 bytes
The third is sei, with 596 bytes
The fourth is I frame, this picture is 1085 bytes
KeyAfter the frame is the P frame: you can see that the latter P frame has 36988 bytes

Here is what the decoding tool sees:
insert image description here
insert image description here

原网站

版权声明
本文为[Know 12]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208091158060300.html