ts-audio-video-analysis.txt
10.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
ts-audio-video-analysis.ts is generated by nginx-rtmp.
AUDIO 0x0F ISO/IEC 13818-7 Audio with ADTS transport syntax
110x xxxx ISO/IEC 13818-3 or ISO/IEC 11172-3 or ISO/IEC 13818-7 or ISO/IEC 14496-3 audio stream number x xxxx
(gdb) p /x pkt.payload[0].pmt[0].at(1)[0]
$55 = {stream_type = 0xf, elementary_PID = 0x101}
========================================================================
(gdb) x /584xb msg->packet_data
TS(AAC-ADTS) header, 7bytes
0x60a320: 0xff 0xf1 0x5c 0x80 0x23 0xdf 0xfc
FLV(AAC) header, 2bytes
0xaf 0x01
TS(AAC-ADTS) RAW data,
0x21 0x1a 0xcb 0xfe 0xfc 0xff 0xff 0xff 0x98
0x60a330: 0xb1 0x52 0xd8 0x88 0x43 0x28 0xc4 0xcb
0x60a338: 0x95 0x2c 0x9a 0x09 0x5c 0x00 0x9c 0xfb
0x60a340: 0x50 0xb9 0x3d 0xa8 0x96 0x02 0x47 0x68
0x60a348: 0xfb 0xb3 0x1c 0x26 0x2e 0xdb 0xac 0x8a
0x60a350: 0xec 0x81 0x65 0xae 0x56 0x45 0x65 0x40
0x60a358: 0xcb 0x8f 0xa5 0x6a 0xe8 0x18 0x05 0x90
0x60a360: 0x8e 0x24 0xb7 0x55 0x72 0x0a 0x6d 0x07
0x60a368: 0x9b 0xa5 0xca 0xd2 0xc8 0x6d 0x0f 0xd2
0x60a370: 0x42 0xf0 0x83 0x1d 0x24 0x60 0xba 0x89
0x60a378: 0x57 0x3f 0x70 0x0f 0xc7 0x18 0xbc 0xc6
0x60a380: 0x0a 0xf2 0x2f 0x75 0x46 0x94 0x0b 0x81
0x60a388: 0x24 0x2e 0xfa 0x9d 0xa1 0x50 0x17 0x04
0x60a390: 0x50 0x0b 0xde 0x86 0xe5 0x80 0x0a 0x68
0x60a398: 0x56 0x30 0x1d 0xbf 0xf5 0x56 0x87 0xab
0x60a3a0: 0x0f 0x30 0x8c 0x01 0x2b 0x3d 0x56 0xa6
0x60a3a8: 0xc7 0xe5 0xe1 0x83 0x76 0x8a 0xd4 0x7e
0x60a3b0: 0xc0 0x04 0xad 0x31 0x0c 0xe1 0x3b 0x80
0x60a3b8: 0x41 0x0d 0x00 0xb6 0x88 0xb0 0xe3 0x62
0x60a3c0: 0xda 0xf3 0xb2 0x58 0x12 0x1c 0x9a 0x5e
0x60a3c8: 0x4f 0x9c 0x63 0x5c 0xc1 0x99 0xc2 0x5e
0x60a3d0: 0xc6 0x82 0x5e 0x95 0x9d 0x80 0x91 0x57
0x60a3d8: 0x66 0x22 0xaf 0x60 0x68 0xcc 0x9d 0x40
0x60a3e0: 0x16 0xc0 0x6c 0xee 0x69 0xae 0xda 0x3f
0x60a3e8: 0x1e 0xe6 0x2e 0x55 0xbc 0xf8 0x60 0xda
0x60a3f0: 0x5f 0x0a 0x08 0x6e 0xbb 0x82 0x48 0x53
0x60a3f8: 0x46 0x29 0x10 0xb2 0x99 0x50 0x69 0xe2
0x60a400: 0x74 0xa9 0xf1 0x2e 0xce 0x40 0x0c 0x70
0x60a408: 0xce 0x92 0x17 0x5c 0x02 0xc0 0x6d 0x19
0x60a410: 0xc0 0x17 0x58 0xb2 0x16 0xb9 0x2c 0x55
0x60a418: 0xc0 0xe2 0xbe 0x75 0xe4 0x8e 0xb9 0xd5
0x60a420: 0x24 0x12 0x5c 0x53 0x1c 0xa5 0xb5 0x78
0x60a428: 0x05 0x1a 0x74 0x85 0xd5 0x00 0x6d 0x00
0x60a430: 0x20 0xc0 0x00 0x34 0x80 0x00 0x00 0x00
0x60a438: 0x00 0x00 0x00 0x00 0x00 0x70
========================================================================
TS(AAC-ADTS) header, 7bytes
0xff 0xf1 0x5c 0x80 0x25 0x5f 0xfc
FLV(AAC) header, 2bytes
0xaf 0x01
TS(AAC-ADTS) RAW data,
0x21 0x1a 0xcf
0x60a448: 0x77 0xff 0xff 0x7f 0xff 0x98 0xa6 0xb1
0x60a450: 0x85 0x0a 0x11 0x70 0x05 0xbd 0x0b 0xbb
0x60a458: 0x88 0x80 0x59 0x19 0xa4 0x89 0x0d 0x68
0x60a460: 0xb9 0x01 0xb2 0x4d 0x7d 0xd7 0x18 0xe5
0x60a468: 0x77 0x1e 0x4b 0x5b 0xa1 0xa9 0xd5 0x2a
0x60a470: 0x12 0x76 0xcb 0x35 0xb8 0x27 0xf1 0xab
0x60a478: 0xf0 0xf8 0xb7 0xe5 0xcf 0x49 0xaa 0x15
0x60a480: 0x53 0x9a 0xdf 0x6d 0x9c 0x76 0xe4 0xcb
0x60a488: 0x2d 0x83 0x88 0x31 0x8d 0x06 0x03 0xb4
0x60a490: 0xc5 0x68 0xf3 0xa9 0x70 0x8d 0x63 0x96
0x60a498: 0x02 0xa3 0xf5 0xf6 0x69 0x44 0xa4 0x3e
0x60a4a0: 0x1d 0x27 0x68 0x6c 0x37 0x58 0x46 0xe5
0x60a4a8: 0xc5 0x26 0x21 0x1a 0x2f 0xee 0xa4 0x71
0x60a4b0: 0x02 0x29 0x44 0x16 0x96 0x7e 0x4b 0x16
0x60a4b8: 0x76 0x47 0x55 0x8c 0x44 0x28 0xbc 0x42
0x60a4c0: 0x1f 0xab 0x54 0x5d 0xf6 0xba 0xc3 0x73
0x60a4c8: 0x69 0x99 0xa5 0x72 0x12 0xce 0x8c 0xd7
0x60a4d0: 0xdf 0xae 0x3e 0xfa 0x13 0x14 0x96 0x31
0x60a4d8: 0x20 0xca 0x2e 0x00 0x95 0x5c 0x44 0x84
0x60a4e0: 0x89 0x05 0xaf 0x4a 0xcb 0xab 0x40 0xd7
0x60a4e8: 0x9a 0x25 0x80 0xc7 0x67 0x6e 0x87 0x9e
0x60a4f0: 0xe5 0x74 0xb7 0xc3 0x40 0xc3 0x27 0x83
0x60a4f8: 0x3a 0x1d 0xc4 0x6c 0xef 0xa2 0x2f 0xd0
0x60a500: 0xc4 0xf0 0x2e 0xaa 0x85 0xb0 0x82 0xc3
0x60a508: 0x48 0x64 0x39 0x32 0x57 0x7a 0x45 0x6a
0x60a510: 0x58 0xc6 0x82 0x40 0xaa 0x02 0xa3 0xea
0x60a518: 0xdd 0xbb 0x58 0x3d 0x54 0x8d 0x2a 0xd5
0x60a520: 0x66 0xc8 0xc1 0x7b 0x89 0x83 0x06 0xe0
0x60a528: 0xaf 0x3d 0x56 0x00 0x4b 0x40 0x06 0x4c
0x60a530: 0xb1 0x25 0x74 0xcb 0x0e 0x5a 0x9b 0x70
0x60a538: 0xaa 0x9d 0x68 0x8d 0xaf 0x0e 0xf1 0xe7
0x60a540: 0x6e 0x6b 0x4f 0xc4 0x60 0x48 0x88 0x97
0x60a548: 0x3f 0xc6 0x47 0xe7 0xf3 0xdb 0xb3 0x8e
0x60a550: 0x36 0xad 0x21 0x55 0x40 0x49 0x40 0x08
0x60a558: 0x0c 0x00 0x00 0x0d 0x60 0x00 0x00 0x00
0x60a560: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x1c
VIDEO 0x15-0x7F ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Reserved
1110 xxxx ITU-T Rec. H.262 | ISO/IEC 13818-2 or ISO/IEC 11172-2 or ISO/IEC 14496-2 video stream number xxxx
(gdb) p /x pkt.payload[0].pmt[0].at(0)[0]
$54 = {stream_type = 0x1b, elementary_PID = 0x100}
========================================================================
(gdb) p msg[0]
$6 = {_vptr.TSMessage = 0x407b70, pid = 256, type = TSPidTypeVideo, stream_type = TSStreamTypeVideoH264,
PES_packet_length = 35808, stream_id = 224 '\340', packet_start_code_prefix = 1, packet_header_size = 13,
parsed_packet_size = 35795, packet_data_size = 35795, packet_data = 0x60b300 ""}
(gdb) x /356xb msg->packet_data
========================================================================
TS(H264) header
0x00 0x00 0x00 0x01
0x09 0xf0
0x00 0x00 0x00 0x01
========================================================================
FLV(H264) header
0x00 0x00 0x00 0x00 0x01 0x64 0x00 0x28
0xff 0xe1 0x00 0x1e
========================================================================
H264 Sequence header [section 0]
0x67 0x64 0x00 0x28 0xac 0xd1
0x60b310: 0xc0 0x50 0x05 0xbb 0xff 0x00 0x2d 0x00
0x60b318: 0x22 0x10 0x00 0x00 0x03 0x00 0x10 0x00
0x60b320: 0x00 0x03 0x03 0x08 0xf1 0x83 0x11 0xe0
========================================================================
TS(H264) header
0x00 0x00 0x00 0x01
========================================================================
H264 Sequence header [section 1]
0x68 0xe9 0xab 0x2c 0x8b
========================================================================
TS(H264) header, xbytes
0x00 0x00 0x01
========================================================================
FLV(H264) header, xbytes
0x01 0x00 0x00 0x2a 0x00 0x00 0x00 0x02
0x09 0xf0 0x00 0x00 0x00 0x1e
H264 Sequence header [section 0]
0x67 0x64 0x00 0x28 0xac 0xd1
0xc0 0x50 0x05 0xbb 0xff 0x00 0x2d 0x00
0x22 0x10 0x00 0x00 0x03 0x00 0x10 0x00
0x00 0x03 0x03 0x08 0xf1 0x83 0x11 0xe0
FLV header?
0x00 0x00 0x00 0x05
H264 Sequence header [section 1]
0x68 0xe9 0xab 0x2c 0x8b
FLV header?
0x00 0x00 0x8b 0x9f
========================================================================
0x65 0x88 0x84 0x00
0x60b338: 0x42 0xbf 0x4e 0x19 0x2a 0x00 0x0b 0xa7
0x60b340: 0xeb 0x07 0xb7 0xfc 0xc2 0x24 0x8d 0xfa
0x60b348: 0xc0 0xaf 0x2a 0x76 0x53 0xc4 0x2d 0x80
0x60b350: 0x8f 0xc8 0xba 0x2e 0x2b 0xb7 0x18 0x9f
TS的数据如下:
(gdb) x /35795xb msg->packet_data
0x00 0x00 0x00 0x01
0x09 0xf0
0x00 0x00 0x00 0x01
0x67 0x64 0x00 0x28 0xac 0xd1
0x60b310: 0xc0 0x50 0x05 0xbb 0xff 0x00 0x2d 0x00
0x60b318: 0x22 0x10 0x00 0x00 0x03 0x00 0x10 0x00
0x60b320: 0x00 0x03 0x03 0x08 0xf1 0x83 0x11 0xe0
0x00 0x00 0x00 0x01
0x68 0xe9 0xab 0x2c 0x8b
0x00 0x00 0x01
0x65 0x88 0x84 0x00
0x60b338: 0x42 0xbf 0x4e 0x19 0x2a 0x00 0x0b 0xa7
0x60b340: 0xeb 0x07 0xb7 0xfc 0xc2 0x24 0x8d 0xfa
0x60b348: 0xc0 0xaf 0x2a 0x76 0x53 0xc4 0x2d 0x80
0x60b350: 0x8f 0xc8 0xba 0x2e 0x2b 0xb7 0x18 0x9f
0x60b358: 0xba 0x47 0x10 0x8b 0xc7 0x93 0x92 0x89
0x60b360: 0x00 0x2d 0xdf 0x3b 0xcb 0x51 0xfe 0x27
0x60b368: 0x13 0xe3 0x29 0x48 0x71 0xf7 0x70 0x07
0x60b370: 0xf4 0x5c 0xb4 0xf0 0xbd 0x65 0x76 0xa1
0x60b378: 0x4e 0x96 0xd7 0x2c 0x66 0xdf 0xc3 0x9e
0x60b380: 0xad 0x23 0x4b 0xc3 0xe1 0xf8 0xb4 0x59
0x60b388: 0x24 0x59 0xf3 0x7b 0x8e 0xb0 0xa6 0x95
0x60b390: 0xdf 0x4b 0x05 0x90 0xbd 0x87 0x87 0x99
0x60b398: 0xd5 0xc1 0xb6 0x9f 0x89 0xff 0x2f 0x7d
0x60b3a0: 0xc6 0xac 0x0c 0x8f 0x00 0x07 0x28 0xac
0x60b3a8: 0x09 0xf7 0x87 0xc7 0xc8 0xb6 0x19 0xc3
0x60b3b0: 0xda 0x3b 0x3d 0x9d 0x00 0x5f 0xc7 0xe6
0x60b3b8: 0x39 0xc5 0xc4 0x58 0x76 0xac 0xaa 0x16
0x60b3c0: 0xb7 0x05 0x5d 0xe4 0xe7 0x9d 0xda 0x97
0x60b3c8: 0x1c 0x3c 0xeb 0x66 0xf1 0xd9 0xa8 0x6e
0x60b3d0: 0xae 0xdf 0xbd 0xa9 0x36 0xc9 0x86 0x88
0x60b3d8: 0x54 0x4b 0xb8 0xcc 0xe7 0xa6 0x60 0x40
0x60b3e0: 0x52 0xd9 0x32 0xf4 0xf0 0x2c 0x4f 0xf5
0x60b3e8: 0xc0 0xce 0x74 0x61 0x4a 0xc8 0x65 0x6e
0x60b3f0: 0x92 0x8f 0xc8 0x63 0xd2 0xca 0xcc 0xe1
0x60b3f8: 0x65 0xa6 0x3b 0x6b 0xfd 0x7b 0x66 0x2a
0x60b400: 0x0a 0xea 0x86 0x93 0xce 0x90 0xe7 0x9b
0x60b408: 0x75 0x92 0x0d 0x6f 0xfa 0xa2 0xac 0x26
0x60b410: 0xae 0xb1 0xc3 0x4c 0xab 0x92 0xc6 0xae
TS的第二个视频包数据如下:
(gdb) x /4108xb 0x60b300
0x00 0x00 0x00 0x01
0x09 0xf0
0x00 0x00 0x01
0x41 0x9a 0x28 0xc8 0x4a 0xbf 0xe8
0x60b310: 0x06 0x44 0x30 0x05 0xea 0xd8 0x86 0xa5
0x60b318: 0xee 0x75 0xab 0x30 0xc8 0x7a 0x5c 0xe3
0x60b320: 0xc7 0x4a 0xdb 0xf6 0xe0 0x08 0xbe 0xc4
0x60b328: 0xb0 0xe4 0x5d 0xe7 0x95 0xf3 0x65 0x4e
0x60b330: 0x00 0xed 0xdb 0xd1 0x5e 0xc3 0xb8 0x34
0x60b338: 0x3d 0xd3 0xfe 0x46 0x5b 0xfd 0xd9 0xf0
0x60b340: 0xa0 0x5d 0xa4 0xa8 0x3d 0x44 0x97 0x58
0x60b348: 0x20 0xd5 0x41 0xb2 0x49 0x72 0xd0 0x9b
0x60b350: 0xa2 0xa7 0xbf 0xba 0x9c 0xa8 0x10 0x58
0x60b358: 0x07 0x47 0xf4 0xe5 0xe8 0x5d 0xf2 0x0d
0x60b360: 0xfe 0x51 0x26 0x8a 0x6a 0x76 0xb8 0x35
0x60b368: 0x04 0xfe 0x01 0xb4 0xec 0x67 0xd5 0x1f
0x60b370: 0xb0 0x66 0x0b 0x7e 0x52 0x58 0x38 0x1c
0x60b378: 0xf3 0x4c 0x92 0xe8 0x38 0xc3 0x7e 0x5b
0x60b380: 0xd6 0x17 0x47 0x49 0xba 0xae 0x6e 0xa0
0x60b388: 0xd8 0xfd 0x16 0xdb 0x85 0xd1 0x81 0x6e
0x60b390: 0x43 0x17 0x82 0xb9 0x39 0xb0 0xa8 0xe8
0x60b398: 0x00 0x56 0x52 0x5e 0xfd 0xad 0x5a 0x43
0x60b3a0: 0x32 0x7a 0x4e 0xed 0xd7 0xb2 0x1b 0x4d
0x60b3a8: 0x78 0x9e 0xad 0x4e 0x97 0x37 0x2c 0xbb
0x60b3b0: 0xf3 0x99 0x45 0xee 0xce 0xc7 0x1f 0xeb
0x60b3b8: 0x43 0x37 0xfd 0x67 0x34 0x97 0xcc 0x8c
0x60b3c0: 0xc5 0xec 0x86 0xb0 0x57 0xb4 0x83 0xa9
3031个ts包是空包,解析有问题:
47 41 00 38 07 50 05 09 5A A6 7E 00 00 00 01 E0
00 00 80 C0 0A 31 28 53 60 81 11 28 53 42 F9 00
00 00 01 09 F0 00 00 00 01 67 64 00 28 AC D1 C0
50 05 BB FF 00 2D 00 22 10 00 00 03 00 10 00 00
03 03 08 F1 83 11 E0 00 00 00 01 68 E9 AB 2C 8B
00 00 01 65 88 84 00 42 BF 08 EE 00 02 B2 75 8D
9F C4 24 E5 BD 27 87 F1 E4 09 A0 51 2D 12 FC F5
6E 31 3D C4 0E 3F 51 47 07 BD D2 8C AB 72 1C 2D
D0 FA 2F 7D EF AA FB 17 C1 08 AD 36 8D F1 41 35
E0 20 AE E8 75 66 39 15 78 88 01 E8 2E 4E 8A 8B
F8 04 68 BF EC 82 59 86 DE E1 66 32 37 FA 78 6D
01 EF C0 2C 6B A6 E9 36 44 4B C8 37
Adaptation fields
Adaptation_field_length: 7
discontinuity_indicator: False
random_access_indicator: True
ES_priority_indicator: False
PCR_flag: True
OPCR_flag: False
splicing_point_flag: False
transport_private_data_flag: False
adaptation_field_extension_flag: False
PCR: 50699466000
PES header
stream_id: E0 (video stream 224)
PES_packet_length: 0 (undefined)
PES_scrambling: 0
PES_priority: False
data_alignment: False
copyright: False
original_or_copy: False
PTS_flag: True
DTS_flag: True
ESCR_flag: False
ES_rate_flag: False
DSM_trick_mode_flag: False
additional_copy_info_flag: False
PES_CRC_flag: False
PES_extension_flag: False
PES_header_data_length: 10
PTS: 169128000
DTS: 169124220
Video sequence
Sequence header code not found in this packet
AFD not found in this packet