(3) Audio and video: analyze H264 SPS to further understand H264

(1) Audio and video: Decode H264 file process rendering and get the decoded source data YUV complete demo]
(2) Audio and video: MediaCodec encoding desktop information complete demo to further understand H264
(3) Audio and video: analyze H264 SPS to further understand H264

overview

 对H264进行解析,主要是帧 SPS进行解析,通过对SPS的解析,深入理解H264。

H264 codec rules

 对一个MP4文件进行解析,得到音频和视频(H264)。

insert image description here
H264 is composed of NAL units one by one. The structure of a NAL unit is as follows:

insert image description here

Take the first NAL unit (SPS) of a video as an example:
00 00 00 01 67 64 00 15 AC D9 41 70 C6 84 00 00 03 00 04 00 00 03 00 F0 3C 58 B6 58 The first
four bytes are separated character, the fifth byte is 67

Guess you like

Origin blog.csdn.net/weixin_43911199/article/details/126330701