1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

fate/matroska: Add tests for muxing with initial_padding

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-09-01 16:41:58 +02:00
parent 5c16df1b92
commit c0279e67f1
4 changed files with 299 additions and 0 deletions

View File

@ -163,6 +163,25 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, MPEGTS_DEMUXER AC3_DECODER)
+= fate-matroska-mpegts-remux += fate-matroska-mpegts-remux
fate-matroska-mpegts-remux: CMD = transcode mpegts $(TARGET_SAMPLES)/mpegts/pmtchange.ts matroska "-map 0:2 -map 0:2 -c copy -disposition:a:1 -visual_impaired+hearing_impaired -default_mode infer" "-map 0 -c copy" "-show_entries stream_disposition:stream=index" fate-matroska-mpegts-remux: CMD = transcode mpegts $(TARGET_SAMPLES)/mpegts/pmtchange.ts matroska "-map 0:2 -map 0:2 -c copy -disposition:a:1 -visual_impaired+hearing_impaired -default_mode infer" "-map 0 -c copy" "-show_entries stream_disposition:stream=index"
# Tests maintaining codec delay while remuxing from Matroska.
# For some reason, ffmpeg shifts the timestamps of the input file
# to make them zero before reaching the muxer while it does not
# for the ogg-opus-remux test.
FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, OPUS_PARSER OPUS_DECODER) += fate-matroska-opus-remux
fate-matroska-opus-remux: CMD = transcode matroska $(TARGET_SAMPLES)/mkv/codec_delay_opus.mkv matroska "-avoid_negative_ts make_zero -c copy" "-copyts -c copy" "-show_packets -show_entries stream=codec_name,initial_padding -read_intervals %0.05"
# Tests maintaining codec delay while remuxing from ogg.
FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, OGG_DEMUXER OPUS_PARSER OPUS_DECODER) += fate-matroska-ogg-opus-remux
fate-matroska-ogg-opus-remux: CMD = transcode ogg $(TARGET_SAMPLES)/ogg/intro-partial.opus matroska "-c copy" "-copyts -c copy" "-show_packets -show_entries stream=codec_name,initial_padding -read_intervals %0.05"
# This tests reencoding with an audio encoder that adds initial padding.
# The initial padding is currently not maintained.
FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, MXF_DEMUXER PCM_S16LE_DECODER \
MP2FIXED_ENCODER ARESAMPLE_FILTER \
MPEG2VIDEO_DECODER MPEGVIDEO_PARSER \
EXTRACT_EXTRADATA_BSF) += fate-matroska-encoding-delay
fate-matroska-encoding-delay: CMD = transcode mxf $(TARGET_SAMPLES)/mxf/Sony-00001.mxf matroska "-c:v copy -af aresample -c:a mp2fixed" "-copyts -c copy" "-show_packets -show_entries stream=codec_name,initial_padding -read_intervals %0.05"
FATE_MATROSKA-$(call REMUX, MATROSKA, SUP_DEMUXER) += fate-matroska-pgs-remux FATE_MATROSKA-$(call REMUX, MATROSKA, SUP_DEMUXER) += fate-matroska-pgs-remux
fate-matroska-pgs-remux: CMD = transcode sup $(TARGET_SAMPLES)/sub/pgs_sub.sup matroska "-copyts -c:s copy" "-copyts -c:s copy" fate-matroska-pgs-remux: CMD = transcode sup $(TARGET_SAMPLES)/sub/pgs_sub.sup matroska "-copyts -c:s copy" "-copyts -c:s copy"

View File

@ -0,0 +1,85 @@
df0524cac5393212ee103c1d1221f4b3 *tests/data/fate/matroska-encoding-delay.matroska
961215 tests/data/fate/matroska-encoding-delay.matroska
#extradata 0: 22, 0x32ea0490
#tb 0: 1/1000
#media_type 0: video
#codec_id 0: mpeg2video
#dimensions 0: 720x608
#sar 0: 152/135
#tb 1: 1/1000
#media_type 1: audio
#codec_id 1: mp2
#sample_rate 1: 48000
#channel_layout_name 1: stereo
1, 0, 0, 24, 1152, 0x724077b8
0, 10, 10, 40, 237628, 0xeff25579, S=1, 40
1, 24, 24, 24, 1152, 0x80625572
1, 48, 48, 24, 1152, 0x7d7f4dce
0, 50, 50, 40, 238066, 0xb2265f41
1, 72, 72, 24, 1152, 0xa6725739
0, 90, 90, 40, 237723, 0x00d7cd24
1, 96, 96, 24, 1152, 0xc9e85398
1, 120, 120, 24, 1152, 0xda1287d3
0, 130, 130, 40, 238290, 0xbe18b18f
1, 144, 144, 24, 1152, 0x1c9a6102
[PACKET]
codec_type=audio
stream_index=1
pts=0
pts_time=0.000000
dts=0
dts_time=0.000000
duration=24
duration_time=0.024000
size=1152
pos=1232
flags=K_
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=10
pts_time=0.010000
dts=10
dts_time=0.010000
duration=40
duration_time=0.040000
size=237628
pos=2392
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=1
pts=24
pts_time=0.024000
dts=24
dts_time=0.024000
duration=24
duration_time=0.024000
size=1152
pos=240027
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=1
pts=48
pts_time=0.048000
dts=48
dts_time=0.048000
duration=24
duration_time=0.024000
size=1152
pos=241202
flags=K_
[/PACKET]
[STREAM]
codec_name=mpeg2video
[SIDE_DATA]
[/SIDE_DATA]
[/STREAM]
[STREAM]
codec_name=mp2
initial_padding=0
[/STREAM]

View File

@ -0,0 +1,92 @@
605e8e89efb3028e261dd10255c7f59a *tests/data/fate/matroska-ogg-opus-remux.matroska
10207 tests/data/fate/matroska-ogg-opus-remux.matroska
#extradata 0: 19, 0x399c0471
#tb 0: 1/1000
#media_type 0: audio
#codec_id 0: opus
#sample_rate 0: 48000
#channel_layout_name 0: stereo
0, -7, -7, 20, 402, 0x89b1c40f
0, 13, 13, 20, 216, 0x7bf97146
0, 33, 33, 20, 215, 0x6cb86d8b
0, 53, 53, 20, 218, 0x9cfd691c
0, 73, 73, 20, 218, 0xd7fe6a94
0, 93, 93, 20, 194, 0x35735de6
0, 113, 113, 20, 216, 0x3ee6705a
0, 133, 133, 20, 218, 0x67eb6cb1
0, 153, 153, 20, 218, 0x32d0700d
0, 173, 173, 20, 219, 0xcb7f6c60
0, 193, 193, 20, 218, 0x9c866b33
0, 213, 213, 20, 217, 0xfe3e6a53
0, 233, 233, 20, 218, 0x13586833
0, 253, 253, 20, 222, 0xbcb2669e
0, 273, 273, 20, 218, 0x8dfc6e33
0, 293, 293, 20, 217, 0xf5957051
0, 313, 313, 20, 210, 0xed126e6b
0, 333, 333, 20, 216, 0xbf947249
0, 353, 353, 20, 203, 0x6c7e680a
0, 373, 373, 20, 209, 0xf78f6af4
0, 393, 393, 20, 217, 0xd60c684d
0, 413, 413, 20, 218, 0x89056a7a
0, 433, 433, 20, 219, 0x0bc674ad
0, 453, 453, 20, 217, 0xb1d86d1a
0, 473, 473, 20, 220, 0x433d685a
0, 493, 493, 20, 364, 0x0c88be84
0, 513, 513, 20, 221, 0x804a733d
0, 533, 533, 20, 215, 0x6e9d6e9b
0, 553, 553, 20, 215, 0x63016a83
0, 573, 573, 20, 218, 0xf9a46fbe
0, 593, 593, 20, 216, 0xa0d66c08
0, 613, 613, 20, 216, 0xa2ca6d0a
0, 633, 633, 20, 216, 0xf50e6f1d
0, 653, 653, 20, 215, 0x6aaa70b6
0, 673, 673, 20, 219, 0x7ceb6ba0
0, 693, 693, 20, 220, 0x398d6ca9
0, 713, 713, 20, 218, 0x7bd06ed5
0, 733, 733, 20, 219, 0xe2906c62
0, 753, 753, 20, 217, 0xcf316ba1
0, 773, 773, 20, 217, 0x470b6eea
0, 793, 793, 20, 359, 0x36c2a18a, S=1, 10
[PACKET]
codec_type=audio
stream_index=0
pts=-7
pts_time=-0.007000
dts=-7
dts_time=-0.007000
duration=20
duration_time=0.020000
size=402
pos=543
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=13
pts_time=0.013000
dts=13
dts_time=0.013000
duration=20
duration_time=0.020000
size=216
pos=956
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=33
pts_time=0.033000
dts=33
dts_time=0.033000
duration=20
duration_time=0.020000
size=215
pos=1179
flags=K_
[/PACKET]
[STREAM]
codec_name=opus
initial_padding=356
[/STREAM]

View File

@ -0,0 +1,103 @@
551e45142f0989b281e837a3a86f0218 *tests/data/fate/matroska-opus-remux.matroska
9355 tests/data/fate/matroska-opus-remux.matroska
#extradata 0: 19, 0x3a04048f
#tb 0: 1/1000
#media_type 0: audio
#codec_id 0: opus
#sample_rate 0: 48000
#channel_layout_name 0: mono
0, -7, -7, 20, 320, 0x58b9a88d
0, 14, 14, 20, 159, 0x6c9c4b4c
0, 34, 34, 20, 148, 0x0caf4b5d
0, 54, 54, 20, 139, 0xc5624226
0, 74, 74, 20, 146, 0x633c4937
0, 94, 94, 20, 153, 0x3d0b4f93
0, 114, 114, 20, 158, 0xe5c55641
0, 134, 134, 20, 156, 0xf2fd50ef
0, 154, 154, 20, 158, 0x93b15410
0, 174, 174, 20, 157, 0xb6f74f5f
0, 194, 194, 20, 159, 0x9aff4957
0, 214, 214, 20, 153, 0xfc5f4aba
0, 234, 234, 20, 158, 0x01e44f70
0, 254, 254, 20, 153, 0x227149cf
0, 274, 274, 20, 155, 0x312f4cf6
0, 294, 294, 20, 155, 0xafc54bae
0, 314, 314, 20, 151, 0x7b4252b3
0, 334, 334, 20, 155, 0x29074a75
0, 354, 354, 20, 149, 0x82c44bcd
0, 374, 374, 20, 150, 0x55c24eb5
0, 394, 394, 20, 156, 0xf71d4f33
0, 414, 414, 20, 153, 0x9b6c4ae5
0, 434, 434, 20, 156, 0x75954e51
0, 454, 454, 20, 155, 0x28ff4ff3
0, 474, 474, 20, 153, 0xc4424969
0, 494, 494, 20, 154, 0xfbf94cc8
0, 514, 514, 20, 155, 0x52c549af
0, 534, 534, 20, 150, 0x6f1e4b7a
0, 554, 554, 20, 158, 0xabb45566
0, 574, 574, 20, 157, 0xe61d4a99
0, 594, 594, 20, 159, 0xf45d4fac
0, 614, 614, 20, 159, 0xcd0553a5
0, 634, 634, 20, 156, 0xdb244e63
0, 654, 654, 20, 154, 0x78654c52
0, 674, 674, 20, 154, 0x9f804cc8
0, 694, 694, 20, 150, 0x1fdf4c80
0, 714, 714, 20, 155, 0x1adc4f89
0, 734, 734, 20, 155, 0x4b53511c
0, 754, 754, 20, 151, 0x8ff2546d
0, 774, 774, 20, 158, 0xb7e34f1b
0, 794, 794, 20, 154, 0x4d98474b
0, 814, 814, 20, 154, 0x14924ea8
0, 834, 834, 20, 153, 0x8d4752bf
0, 854, 854, 20, 149, 0x74785066
0, 874, 874, 20, 151, 0x36c94a4c
0, 894, 894, 20, 155, 0x82904f3b
0, 914, 914, 20, 154, 0xd76b4a45
0, 934, 934, 20, 159, 0x9fec548d
0, 954, 954, 20, 154, 0x9a084dcd
0, 974, 974, 20, 155, 0x90a54ac8
0, 994, 994, 20, 324, 0x8e34a2f5
0, 1014, 1014, 20, 268, 0x10f37203, S=1, 10
[PACKET]
codec_type=audio
stream_index=0
pts=-7
pts_time=-0.007000
dts=-7
dts_time=-0.007000
duration=20
duration_time=0.020000
size=320
pos=496
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=14
pts_time=0.014000
dts=14
dts_time=0.014000
duration=20
duration_time=0.020000
size=159
pos=823
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=34
pts_time=0.034000
dts=34
dts_time=0.034000
duration=20
duration_time=0.020000
size=148
pos=989
flags=K_
[/PACKET]
[STREAM]
codec_name=opus
initial_padding=312
[/STREAM]