Commit 482f9043d4 for ffmpeg
commit 482f9043d4cc6db02d6fc9cf5056fb7701fb2323
Author: Romain Beauxis <romain.beauxis@gmail.com>
Date: Wed Dec 2 23:41:25 2026 -0600
tests/fate/matroska: seek to the cues of a track with a codec delay
The first test seeks to the start, 0.5 s and 1 s of an Opus track whose
codec delay the demuxer takes off its block timestamps, and prints the
first packet read after each seek.
The second remuxes the same track to WebM for DASH and prints the
bandwidth, keyframe and cue metadata of its DASH manifest input.
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 0f50ae5e1d..3f1f4b8d89 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -50,6 +50,16 @@ fate-matroska-opus-rate44100: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_entrie
FATE_MATROSKA_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER) += fate-matroska-opus-best-fit-ts-seek
fate-matroska-opus-best-fit-ts-seek: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -best_fit_ts 1 -read_intervals 0%+\#1,1%+\#1 -show_entries packet=pts,pos -print_format compact $(TARGET_SAMPLES)/audiomatch/tones_opus_48000_stereo.mka
+# Seeks to cues of a track with a codec delay: a cue holds the timestamp of
+# its block before the delay is taken off.
+FATE_MATROSKA_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER) += fate-matroska-opus-cue-seek
+fate-matroska-opus-cue-seek: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -read_intervals 0%+\#1,0.5%+\#1,1%+\#1 -show_entries packet=pts,pos -print_format compact $(TARGET_SAMPLES)/audiomatch/tones_opus_48000_stereo.mka
+
+# The WebM DASH manifest of a track with a codec delay, from cue times on the
+# segment clock.
+FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER OPUS_PARSER WEBM_MUXER WEBM_DASH_MANIFEST_DEMUXER FRAMECRC_MUXER FILE_PROTOCOL PIPE_PROTOCOL) += fate-matroska-opus-cue-dash
+fate-matroska-opus-cue-dash: CMD = stream_remux matroska $(TARGET_SAMPLES)/audiomatch/tones_opus_48000_stereo.mka "" webm "-dash 1 -cluster_time_limit 250" "" "-c copy" "-f webm_dash_manifest -show_entries stream_tags=webm_dash_manifest_bandwidth,webm_dash_manifest_cluster_keyframe,webm_dash_manifest_cue_timestamps"
+
# This tests that the Matroska demuxer correctly demuxes WavPack
# without CodecPrivate; it also tests zlib compressed WavPack.
FATE_MATROSKA-$(call FRAMECRC, MATROSKA,, ZLIB) += fate-matroska-wavpack-missing-codecprivate
diff --git a/tests/ref/fate/matroska-opus-cue-dash b/tests/ref/fate/matroska-opus-cue-dash
new file mode 100644
index 0000000000..0b5007681a
--- /dev/null
+++ b/tests/ref/fate/matroska-opus-cue-dash
@@ -0,0 +1,114 @@
+587051f4173ff9f345f835402de16005 *tests/data/fate/matroska-opus-cue-dash.webm
+32430 tests/data/fate/matroska-opus-cue-dash.webm
+#extradata 0: 19, 0x38100445
+#tb 0: 1/1000
+#media_type 0: audio
+#codec_id 0: opus
+#sample_rate 0: 44100
+#channel_layout_name 0: stereo
+0, -7, -7, 20, 489, 0xb843f4b8, S=1, Skip Samples, 10, 0x013f0020
+0, 13, 13, 20, 354, 0xa2a7b0c8
+0, 33, 33, 20, 366, 0xf507c0ab
+0, 53, 53, 20, 359, 0x0379b6ca
+0, 73, 73, 20, 377, 0x7a62c054
+0, 93, 93, 20, 369, 0x08c1c043
+0, 113, 113, 20, 357, 0x689bab86
+0, 133, 133, 20, 366, 0x5753bac7
+0, 154, 154, 20, 342, 0xbf86a994
+0, 174, 174, 20, 343, 0x88abb39f
+0, 193, 193, 20, 468, 0x4563cf88
+0, 213, 213, 20, 189, 0xba5b5e00
+0, 233, 233, 20, 182, 0xc014562d
+0, 253, 253, 20, 169, 0x962c54e2
+0, 273, 273, 20, 163, 0x416a557f
+0, 293, 293, 20, 163, 0x6a365375
+0, 313, 313, 20, 155, 0x84165205
+0, 333, 333, 20, 200, 0x520d684e
+0, 353, 353, 20, 489, 0xe9bdf2f1
+0, 373, 373, 20, 347, 0xd81cae2f
+0, 393, 393, 20, 366, 0xf75cb3ef
+0, 413, 413, 20, 370, 0x64bab79f
+0, 433, 433, 20, 372, 0x5d68ba5f
+0, 453, 453, 20, 363, 0x3d34b48d
+0, 474, 474, 20, 363, 0xbd86b479
+0, 493, 493, 20, 368, 0x5a63b86d
+0, 513, 513, 20, 356, 0x94e4aad1
+0, 533, 533, 20, 340, 0xf405aa63
+0, 553, 553, 20, 462, 0xf449d75a
+0, 573, 573, 20, 189, 0xf91d5cd1
+0, 593, 593, 20, 176, 0xc6b95e4e
+0, 613, 613, 20, 170, 0x5325548c
+0, 633, 633, 20, 160, 0x49245032
+0, 653, 653, 20, 169, 0x055f5002
+0, 673, 673, 20, 171, 0xa4795904
+0, 693, 693, 20, 198, 0x3001631e
+0, 713, 713, 20, 488, 0x05fdf07d
+0, 733, 733, 20, 369, 0x215fafe3
+0, 754, 754, 20, 364, 0x423fba74
+0, 774, 774, 20, 475, 0x7c26f204
+0, 793, 793, 20, 376, 0x6b6dc271
+0, 813, 813, 20, 369, 0xb549b34a
+0, 833, 833, 20, 379, 0xab87bf9e
+0, 853, 853, 20, 361, 0xe0b8b5d4
+0, 873, 873, 20, 348, 0xef4daee9
+0, 893, 893, 20, 331, 0x8ff5abd4
+0, 913, 913, 20, 474, 0x770cec85
+0, 933, 933, 20, 163, 0x9f1655d7
+0, 953, 953, 20, 144, 0xd7764913
+0, 973, 973, 20, 152, 0x2c155282
+0, 993, 993, 20, 138, 0xd62641ed
+0, 1013, 1013, 20, 150, 0x070f46d0
+0, 1033, 1033, 20, 132, 0x8af94728
+0, 1053, 1053, 20, 157, 0x51bf49e7
+0, 1074, 1074, 20, 486, 0x3787f8fc
+0, 1093, 1093, 20, 362, 0xe63eb7da
+0, 1113, 1113, 20, 353, 0xd2fab5b4
+0, 1133, 1133, 20, 357, 0x4989ac82
+0, 1153, 1153, 20, 365, 0x9944ae92
+0, 1173, 1173, 20, 362, 0x065ab62a
+0, 1193, 1193, 20, 361, 0x7f30ae00
+0, 1213, 1213, 20, 360, 0x3e2fb7e9
+0, 1233, 1233, 20, 334, 0xe544ac37
+0, 1253, 1253, 20, 301, 0xa6cc9ce5
+0, 1273, 1273, 20, 478, 0xfcb8f74c
+0, 1293, 1293, 20, 138, 0x125647d5
+0, 1313, 1313, 20, 146, 0x550f4a74
+0, 1333, 1333, 20, 143, 0x90cd474a
+0, 1353, 1353, 20, 137, 0x41d142e9
+0, 1373, 1373, 20, 126, 0x71f840a8
+0, 1393, 1393, 20, 121, 0x593c3cf5
+0, 1413, 1413, 20, 180, 0x79645678
+0, 1433, 1433, 20, 487, 0xc0f1e554
+0, 1453, 1453, 20, 358, 0xd494b064
+0, 1473, 1473, 20, 371, 0x2db6bd3c
+0, 1493, 1493, 20, 358, 0x2e7ea8e9
+0, 1513, 1513, 20, 366, 0xcc95b454
+0, 1533, 1533, 20, 367, 0x7c04b93c
+0, 1553, 1553, 20, 356, 0xd2dcbc75
+0, 1573, 1573, 20, 363, 0xc175b4a0
+0, 1593, 1593, 20, 332, 0xaacdad70
+0, 1613, 1613, 20, 302, 0x50d19815
+0, 1633, 1633, 20, 481, 0x33f0e93b
+0, 1653, 1653, 20, 145, 0xc0c24787
+0, 1673, 1673, 20, 147, 0x31ad4cb2
+0, 1693, 1693, 20, 146, 0x60324c38
+0, 1713, 1713, 20, 128, 0x55443fac
+0, 1733, 1733, 20, 145, 0x43e84554
+0, 1753, 1753, 20, 137, 0x08b34591
+0, 1773, 1773, 20, 147, 0xd3bd4a34
+0, 1793, 1793, 20, 486, 0x3a9eecc1
+0, 1813, 1813, 20, 468, 0x6555e970
+0, 1833, 1833, 20, 361, 0x4552aeb0
+0, 1853, 1853, 20, 355, 0xfd2db080
+0, 1873, 1873, 20, 355, 0x6e48a4a0
+0, 1893, 1893, 20, 363, 0xdd5cb15e
+0, 1913, 1913, 20, 359, 0x7ae4b4c2
+0, 1933, 1933, 20, 354, 0x467eb6d1
+0, 1953, 1953, 20, 352, 0x1fc2a38f
+0, 1973, 1973, 20, 318, 0xbdd29c2f
+0, 1993, 1993, 7, 475, 0x5959cd23, S=1, Skip Samples, 10, 0x01fc0055
+[STREAM]
+TAG:webm_dash_manifest_bandwidth=60812
+TAG:webm_dash_manifest_cluster_keyframe=1
+TAG:webm_dash_manifest_cue_timestamps=-7,0,233,240,474,481,713,720,953,960,1193,1200,1433,1440,1673,1680,1913,1920
+[/STREAM]
diff --git a/tests/ref/fate/matroska-opus-cue-seek b/tests/ref/fate/matroska-opus-cue-seek
new file mode 100644
index 0000000000..b476227dd8
--- /dev/null
+++ b/tests/ref/fate/matroska-opus-cue-seek
@@ -0,0 +1,3 @@
+packet|pts=6770|pos=8480
+packet|pts=27939|pos=15639
+packet|pts=47345|pos=21765