Skip to content

Commit 208a5d1

Browse files
committed
fate/ffprobe: add some stream metadata.
1 parent f7c46d2 commit 208a5d1

File tree

9 files changed

+269
-240
lines changed

9 files changed

+269
-240
lines changed

tests/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ tests/data/ffprobe-test.nut: ffmpeg$(EXESUF) | tests/data
3535
-f lavfi -i "aevalsrc=sin(400*PI*2*t)::d=0.125[out0]; testsrc=d=0.125[out1]; testsrc=s=100x100:d=0.125[out2]" \
3636
-f ffmetadata -i $(SRC_PATH)/tests/test.ffmeta \
3737
-flags +bitexact -map 0:0 -map 0:1 -map 0:2 -map_metadata 1 \
38+
-map_metadata:s:0 1:s:0 -map_metadata:s:1 1:s:1 \
3839
-vcodec rawvideo -acodec pcm_s16le \
3940
-y $@ 2>/dev/null
4041

tests/ref/fate/ffprobe_compact

Lines changed: 32 additions & 32 deletions
Large diffs are not rendered by default.

tests/ref/fate/ffprobe_csv

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
packet,audio,0,0,0.000000,0,0.000000,1024,0.023220,N/A,N/A,2048,487,K
2-
frame,audio,1,0,0.000000,0,0.000000,1024,0.023220,487,s16,1024,1,unknown
3-
packet,video,1,0,0.000000,0,0.000000,2048,0.040000,N/A,N/A,230400,2562,K
4-
frame,video,1,0,0.000000,0,0.000000,2048,0.040000,2562,320,240,rgb24,1:1,I,0,0,0,0,0,0
5-
packet,video,2,0,0.000000,0,0.000000,2048,0.040000,N/A,N/A,30000,232983,K
6-
frame,video,1,0,0.000000,0,0.000000,2048,0.040000,232983,100,100,rgb24,1:1,I,0,0,0,0,0,0
7-
packet,audio,0,1024,0.023220,1024,0.023220,1024,0.023220,N/A,N/A,2048,262988,K
8-
frame,audio,1,1024,0.023220,1024,0.023220,1024,0.023220,262988,s16,1024,1,unknown
9-
packet,video,1,2048,0.040000,2048,0.040000,2048,0.040000,N/A,N/A,230400,265066,K
10-
frame,video,1,2048,0.040000,2048,0.040000,2048,0.040000,265066,320,240,rgb24,1:1,I,0,0,0,0,0,0
11-
packet,video,2,2048,0.040000,2048,0.040000,2048,0.040000,N/A,N/A,30000,495490,K
12-
frame,video,1,2048,0.040000,2048,0.040000,2048,0.040000,495490,100,100,rgb24,1:1,I,0,0,0,0,0,0
13-
packet,audio,0,2048,0.046440,2048,0.046440,1024,0.023220,N/A,N/A,2048,525495,K
14-
frame,audio,1,2048,0.046440,2048,0.046440,1024,0.023220,525495,s16,1024,1,unknown
15-
packet,audio,0,3072,0.069660,3072,0.069660,1024,0.023220,N/A,N/A,2048,527566,K
16-
frame,audio,1,3072,0.069660,3072,0.069660,1024,0.023220,527566,s16,1024,1,unknown
17-
packet,video,1,4096,0.080000,4096,0.080000,2048,0.040000,N/A,N/A,230400,529644,K
18-
frame,video,1,4096,0.080000,4096,0.080000,2048,0.040000,529644,320,240,rgb24,1:1,I,0,0,0,0,0,0
19-
packet,video,2,4096,0.080000,4096,0.080000,2048,0.040000,N/A,N/A,30000,760068,K
20-
frame,video,1,4096,0.080000,4096,0.080000,2048,0.040000,760068,100,100,rgb24,1:1,I,0,0,0,0,0,0
21-
packet,audio,0,4096,0.092880,4096,0.092880,1024,0.023220,N/A,N/A,2048,790073,K
22-
frame,audio,1,4096,0.092880,4096,0.092880,1024,0.023220,790073,s16,1024,1,unknown
23-
packet,audio,0,5120,0.116100,5120,0.116100,1024,0.023220,N/A,N/A,2048,792144,K
24-
frame,audio,1,5120,0.116100,5120,0.116100,1024,0.023220,792144,s16,1024,1,unknown
25-
packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,N/A,N/A,230400,794222,K
26-
frame,video,1,6144,0.120000,6144,0.120000,2048,0.040000,794222,320,240,rgb24,1:1,I,0,0,0,0,0,0
27-
packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,N/A,N/A,30000,1024646,K
28-
frame,video,1,6144,0.120000,6144,0.120000,2048,0.040000,1024646,100,100,rgb24,1:1,I,0,0,0,0,0,0
29-
stream,0,pcm_s16le,unknown,audio,1/44100,[1][0][0][0],0x0001,s16,44100,1,16,N/A,0/0,0/0,1/44100,0,0.000000,527364,11.958367,705600,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0
30-
stream,1,rawvideo,unknown,video,1/51200,RGB[24],0x18424752,320,240,0,1:1,4:3,rgb24,-99,N/A,N/A,25/1,25/1,1/51200,0,0.000000,612268,11.958359,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0
31-
stream,2,rawvideo,unknown,video,1/51200,RGB[24],0x18424752,100,100,0,1:1,1:1,rgb24,-99,N/A,N/A,25/1,25/1,1/51200,0,0.000000,612268,11.958359,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0
32-
format,tests/data/ffprobe-test.nut,3,nut,0.000000,11.958367,1054727,705599,ffprobe test file,"'A comment with CSV, XML & JSON special chars': <tag value=""x"">",I ♥ Üñîçød€
1+
packet,audio,0,0,0.000000,0,0.000000,1024,0.023220,N/A,N/A,2048,572,K
2+
frame,audio,1,0,0.000000,0,0.000000,1024,0.023220,572,s16,1024,1,unknown
3+
packet,video,1,0,0.000000,0,0.000000,2048,0.040000,N/A,N/A,230400,2647,K
4+
frame,video,1,0,0.000000,0,0.000000,2048,0.040000,2647,320,240,rgb24,1:1,I,0,0,0,0,0,0
5+
packet,video,2,0,0.000000,0,0.000000,2048,0.040000,N/A,N/A,30000,233068,K
6+
frame,video,1,0,0.000000,0,0.000000,2048,0.040000,233068,100,100,rgb24,1:1,I,0,0,0,0,0,0
7+
packet,audio,0,1024,0.023220,1024,0.023220,1024,0.023220,N/A,N/A,2048,263073,K
8+
frame,audio,1,1024,0.023220,1024,0.023220,1024,0.023220,263073,s16,1024,1,unknown
9+
packet,video,1,2048,0.040000,2048,0.040000,2048,0.040000,N/A,N/A,230400,265151,K
10+
frame,video,1,2048,0.040000,2048,0.040000,2048,0.040000,265151,320,240,rgb24,1:1,I,0,0,0,0,0,0
11+
packet,video,2,2048,0.040000,2048,0.040000,2048,0.040000,N/A,N/A,30000,495575,K
12+
frame,video,1,2048,0.040000,2048,0.040000,2048,0.040000,495575,100,100,rgb24,1:1,I,0,0,0,0,0,0
13+
packet,audio,0,2048,0.046440,2048,0.046440,1024,0.023220,N/A,N/A,2048,525580,K
14+
frame,audio,1,2048,0.046440,2048,0.046440,1024,0.023220,525580,s16,1024,1,unknown
15+
packet,audio,0,3072,0.069660,3072,0.069660,1024,0.023220,N/A,N/A,2048,527651,K
16+
frame,audio,1,3072,0.069660,3072,0.069660,1024,0.023220,527651,s16,1024,1,unknown
17+
packet,video,1,4096,0.080000,4096,0.080000,2048,0.040000,N/A,N/A,230400,529729,K
18+
frame,video,1,4096,0.080000,4096,0.080000,2048,0.040000,529729,320,240,rgb24,1:1,I,0,0,0,0,0,0
19+
packet,video,2,4096,0.080000,4096,0.080000,2048,0.040000,N/A,N/A,30000,760153,K
20+
frame,video,1,4096,0.080000,4096,0.080000,2048,0.040000,760153,100,100,rgb24,1:1,I,0,0,0,0,0,0
21+
packet,audio,0,4096,0.092880,4096,0.092880,1024,0.023220,N/A,N/A,2048,790158,K
22+
frame,audio,1,4096,0.092880,4096,0.092880,1024,0.023220,790158,s16,1024,1,unknown
23+
packet,audio,0,5120,0.116100,5120,0.116100,1024,0.023220,N/A,N/A,2048,792229,K
24+
frame,audio,1,5120,0.116100,5120,0.116100,1024,0.023220,792229,s16,1024,1,unknown
25+
packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,N/A,N/A,230400,794307,K
26+
frame,video,1,6144,0.120000,6144,0.120000,2048,0.040000,794307,320,240,rgb24,1:1,I,0,0,0,0,0,0
27+
packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,N/A,N/A,30000,1024731,K
28+
frame,video,1,6144,0.120000,6144,0.120000,2048,0.040000,1024731,100,100,rgb24,1:1,I,0,0,0,0,0,0
29+
stream,0,pcm_s16le,unknown,audio,1/44100,[1][0][0][0],0x0001,s16,44100,1,16,N/A,0/0,0/0,1/44100,0,0.000000,527406,11.959320,705600,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0,mc²
30+
stream,1,rawvideo,unknown,video,1/51200,RGB[24],0x18424752,320,240,0,1:1,4:3,rgb24,-99,N/A,N/A,25/1,25/1,1/51200,0,0.000000,612317,11.959316,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0,foobar,field-and-tags-conflict-attempt
31+
stream,2,rawvideo,unknown,video,1/51200,RGB[24],0x18424752,100,100,0,1:1,1:1,rgb24,-99,N/A,N/A,25/1,25/1,1/51200,0,0.000000,612317,11.959316,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0
32+
format,tests/data/ffprobe-test.nut,3,nut,0.000000,11.959320,1054812,705599,ffprobe test file,"'A comment with CSV, XML & JSON special chars': <tag value=""x"">",I ♥ Üñîçød€

tests/ref/fate/ffprobe_default

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ duration_time=0.023220
1010
convergence_duration=N/A
1111
convergence_duration_time=N/A
1212
size=2048
13-
pos=487
13+
pos=572
1414
flags=K
1515
[/PACKET]
1616
[FRAME]
@@ -22,7 +22,7 @@ pkt_dts=0
2222
pkt_dts_time=0.000000
2323
pkt_duration=1024
2424
pkt_duration_time=0.023220
25-
pkt_pos=487
25+
pkt_pos=572
2626
sample_fmt=s16
2727
nb_samples=1024
2828
channels=1
@@ -40,7 +40,7 @@ duration_time=0.040000
4040
convergence_duration=N/A
4141
convergence_duration_time=N/A
4242
size=230400
43-
pos=2562
43+
pos=2647
4444
flags=K
4545
[/PACKET]
4646
[FRAME]
@@ -52,7 +52,7 @@ pkt_dts=0
5252
pkt_dts_time=0.000000
5353
pkt_duration=2048
5454
pkt_duration_time=0.040000
55-
pkt_pos=2562
55+
pkt_pos=2647
5656
width=320
5757
height=240
5858
pix_fmt=rgb24
@@ -77,7 +77,7 @@ duration_time=0.040000
7777
convergence_duration=N/A
7878
convergence_duration_time=N/A
7979
size=30000
80-
pos=232983
80+
pos=233068
8181
flags=K
8282
[/PACKET]
8383
[FRAME]
@@ -89,7 +89,7 @@ pkt_dts=0
8989
pkt_dts_time=0.000000
9090
pkt_duration=2048
9191
pkt_duration_time=0.040000
92-
pkt_pos=232983
92+
pkt_pos=233068
9393
width=100
9494
height=100
9595
pix_fmt=rgb24
@@ -114,7 +114,7 @@ duration_time=0.023220
114114
convergence_duration=N/A
115115
convergence_duration_time=N/A
116116
size=2048
117-
pos=262988
117+
pos=263073
118118
flags=K
119119
[/PACKET]
120120
[FRAME]
@@ -126,7 +126,7 @@ pkt_dts=1024
126126
pkt_dts_time=0.023220
127127
pkt_duration=1024
128128
pkt_duration_time=0.023220
129-
pkt_pos=262988
129+
pkt_pos=263073
130130
sample_fmt=s16
131131
nb_samples=1024
132132
channels=1
@@ -144,7 +144,7 @@ duration_time=0.040000
144144
convergence_duration=N/A
145145
convergence_duration_time=N/A
146146
size=230400
147-
pos=265066
147+
pos=265151
148148
flags=K
149149
[/PACKET]
150150
[FRAME]
@@ -156,7 +156,7 @@ pkt_dts=2048
156156
pkt_dts_time=0.040000
157157
pkt_duration=2048
158158
pkt_duration_time=0.040000
159-
pkt_pos=265066
159+
pkt_pos=265151
160160
width=320
161161
height=240
162162
pix_fmt=rgb24
@@ -181,7 +181,7 @@ duration_time=0.040000
181181
convergence_duration=N/A
182182
convergence_duration_time=N/A
183183
size=30000
184-
pos=495490
184+
pos=495575
185185
flags=K
186186
[/PACKET]
187187
[FRAME]
@@ -193,7 +193,7 @@ pkt_dts=2048
193193
pkt_dts_time=0.040000
194194
pkt_duration=2048
195195
pkt_duration_time=0.040000
196-
pkt_pos=495490
196+
pkt_pos=495575
197197
width=100
198198
height=100
199199
pix_fmt=rgb24
@@ -218,7 +218,7 @@ duration_time=0.023220
218218
convergence_duration=N/A
219219
convergence_duration_time=N/A
220220
size=2048
221-
pos=525495
221+
pos=525580
222222
flags=K
223223
[/PACKET]
224224
[FRAME]
@@ -230,7 +230,7 @@ pkt_dts=2048
230230
pkt_dts_time=0.046440
231231
pkt_duration=1024
232232
pkt_duration_time=0.023220
233-
pkt_pos=525495
233+
pkt_pos=525580
234234
sample_fmt=s16
235235
nb_samples=1024
236236
channels=1
@@ -248,7 +248,7 @@ duration_time=0.023220
248248
convergence_duration=N/A
249249
convergence_duration_time=N/A
250250
size=2048
251-
pos=527566
251+
pos=527651
252252
flags=K
253253
[/PACKET]
254254
[FRAME]
@@ -260,7 +260,7 @@ pkt_dts=3072
260260
pkt_dts_time=0.069660
261261
pkt_duration=1024
262262
pkt_duration_time=0.023220
263-
pkt_pos=527566
263+
pkt_pos=527651
264264
sample_fmt=s16
265265
nb_samples=1024
266266
channels=1
@@ -278,7 +278,7 @@ duration_time=0.040000
278278
convergence_duration=N/A
279279
convergence_duration_time=N/A
280280
size=230400
281-
pos=529644
281+
pos=529729
282282
flags=K
283283
[/PACKET]
284284
[FRAME]
@@ -290,7 +290,7 @@ pkt_dts=4096
290290
pkt_dts_time=0.080000
291291
pkt_duration=2048
292292
pkt_duration_time=0.040000
293-
pkt_pos=529644
293+
pkt_pos=529729
294294
width=320
295295
height=240
296296
pix_fmt=rgb24
@@ -315,7 +315,7 @@ duration_time=0.040000
315315
convergence_duration=N/A
316316
convergence_duration_time=N/A
317317
size=30000
318-
pos=760068
318+
pos=760153
319319
flags=K
320320
[/PACKET]
321321
[FRAME]
@@ -327,7 +327,7 @@ pkt_dts=4096
327327
pkt_dts_time=0.080000
328328
pkt_duration=2048
329329
pkt_duration_time=0.040000
330-
pkt_pos=760068
330+
pkt_pos=760153
331331
width=100
332332
height=100
333333
pix_fmt=rgb24
@@ -352,7 +352,7 @@ duration_time=0.023220
352352
convergence_duration=N/A
353353
convergence_duration_time=N/A
354354
size=2048
355-
pos=790073
355+
pos=790158
356356
flags=K
357357
[/PACKET]
358358
[FRAME]
@@ -364,7 +364,7 @@ pkt_dts=4096
364364
pkt_dts_time=0.092880
365365
pkt_duration=1024
366366
pkt_duration_time=0.023220
367-
pkt_pos=790073
367+
pkt_pos=790158
368368
sample_fmt=s16
369369
nb_samples=1024
370370
channels=1
@@ -382,7 +382,7 @@ duration_time=0.023220
382382
convergence_duration=N/A
383383
convergence_duration_time=N/A
384384
size=2048
385-
pos=792144
385+
pos=792229
386386
flags=K
387387
[/PACKET]
388388
[FRAME]
@@ -394,7 +394,7 @@ pkt_dts=5120
394394
pkt_dts_time=0.116100
395395
pkt_duration=1024
396396
pkt_duration_time=0.023220
397-
pkt_pos=792144
397+
pkt_pos=792229
398398
sample_fmt=s16
399399
nb_samples=1024
400400
channels=1
@@ -412,7 +412,7 @@ duration_time=0.040000
412412
convergence_duration=N/A
413413
convergence_duration_time=N/A
414414
size=230400
415-
pos=794222
415+
pos=794307
416416
flags=K
417417
[/PACKET]
418418
[FRAME]
@@ -424,7 +424,7 @@ pkt_dts=6144
424424
pkt_dts_time=0.120000
425425
pkt_duration=2048
426426
pkt_duration_time=0.040000
427-
pkt_pos=794222
427+
pkt_pos=794307
428428
width=320
429429
height=240
430430
pix_fmt=rgb24
@@ -449,7 +449,7 @@ duration_time=0.040000
449449
convergence_duration=N/A
450450
convergence_duration_time=N/A
451451
size=30000
452-
pos=1024646
452+
pos=1024731
453453
flags=K
454454
[/PACKET]
455455
[FRAME]
@@ -461,7 +461,7 @@ pkt_dts=6144
461461
pkt_dts_time=0.120000
462462
pkt_duration=2048
463463
pkt_duration_time=0.040000
464-
pkt_pos=1024646
464+
pkt_pos=1024731
465465
width=100
466466
height=100
467467
pix_fmt=rgb24
@@ -492,8 +492,8 @@ avg_frame_rate=0/0
492492
time_base=1/44100
493493
start_pts=0
494494
start_time=0.000000
495-
duration_ts=527364
496-
duration=11.958367
495+
duration_ts=527406
496+
duration=11.959320
497497
bit_rate=705600
498498
nb_frames=N/A
499499
nb_read_frames=6
@@ -509,6 +509,7 @@ DISPOSITION:hearing_impaired=0
509509
DISPOSITION:visual_impaired=0
510510
DISPOSITION:clean_effects=0
511511
DISPOSITION:attached_pic=0
512+
TAG:E=mc²
512513
[/STREAM]
513514
[STREAM]
514515
index=1
@@ -532,8 +533,8 @@ avg_frame_rate=25/1
532533
time_base=1/51200
533534
start_pts=0
534535
start_time=0.000000
535-
duration_ts=612268
536-
duration=11.958359
536+
duration_ts=612317
537+
duration=11.959316
537538
bit_rate=N/A
538539
nb_frames=N/A
539540
nb_read_frames=4
@@ -549,6 +550,8 @@ DISPOSITION:hearing_impaired=0
549550
DISPOSITION:visual_impaired=0
550551
DISPOSITION:clean_effects=0
551552
DISPOSITION:attached_pic=0
553+
TAG:title=foobar
554+
TAG:duration_ts=field-and-tags-conflict-attempt
552555
[/STREAM]
553556
[STREAM]
554557
index=2
@@ -572,8 +575,8 @@ avg_frame_rate=25/1
572575
time_base=1/51200
573576
start_pts=0
574577
start_time=0.000000
575-
duration_ts=612268
576-
duration=11.958359
578+
duration_ts=612317
579+
duration=11.959316
577580
bit_rate=N/A
578581
nb_frames=N/A
579582
nb_read_frames=4
@@ -595,8 +598,8 @@ filename=tests/data/ffprobe-test.nut
595598
nb_streams=3
596599
format_name=nut
597600
start_time=0.000000
598-
duration=11.958367
599-
size=1054727
601+
duration=11.959320
602+
size=1054812
600603
bit_rate=705599
601604
TAG:title=ffprobe test file
602605
TAG:comment='A comment with CSV, XML & JSON special chars': <tag value="x">

0 commit comments

Comments
 (0)