flv sps pps tag解析

这篇博客详细解析了一段H264编码的关键帧数据,包括frametype、CodecID、时间戳、数据包类型、SPS和PPS等关键信息,揭示了视频编码中的帧类型与AVC编解码过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

/* tag head */
type:         09
dataSize:     00
dataSize:     00
dataSize:     23
timeStamp:    9c
timeStamp:    05
timeStamp:    e8
timeStamp_ex: 2f
streamID:     00
streamID:     00
streamID:     00
/* data */
17 (frame type(前4bit)1为关键帧 + codecID(后4bit)7为AVC也就是H264)
00 (AVCPacketType: 0 AVCDecoderConfigurationRecord; 1 AVC NALU; 2 AVC end of sequence)
00 (CompositionTime: AVCPacketType!= 1时为0)
00 (CompositionTime)
00 (CompositionTime)
/* 0x01+sps[1]+sps[2]+sps[3]+0xFF+0xE1+sps size(2bytes)+sps+01+pps size(2bytes)+pps */
01
42 (sps[1])
c0 (sps[2]) 
20 (sps[3])
ff
e1
00 (sps size)
0f (sps size)
67
42
c0
20
8c
8d
40
28
02
d9
00
f0
88
46
a0
01
00 (pps size)
04 (pps size)
68
ce
3c
80
/* previous tag size */
00
00
00
2e

/***************************************/

frame type:

类型
1keyframe (for AVC, a seekable frame) 关键帧
2inter frame (for AVC, a non-seekable frame)
3disposable inter frame (H.263 only)
4generated keyframe (reserved for server use only)
5video info/command frame

CodecID:

类型
1JPEG (currently unused)
2Sorenson H.263
3Screen video
4On2 VP6
5On2 VP6 with alpha channel
6Screen video version 2
7AVC

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值