/* 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:
值 | 类型 |
1 | keyframe (for AVC, a seekable frame) 关键帧 |
2 | inter frame (for AVC, a non-seekable frame) |
3 | disposable inter frame (H.263 only) |
4 | generated keyframe (reserved for server use only) |
5 | video info/command frame |
CodecID:
值 | 类型 |
1 | JPEG (currently unused) |
2 | Sorenson H.263 |
3 | Screen video |
4 | On2 VP6 |
5 | On2 VP6 with alpha channel |
6 | Screen video version 2 |
7 | AVC |