[FFmpeg-devel] [PATCH 2/2] tests/matroska: Add test for WebVTT in WebM
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Mon Mar 29 16:18:57 EEST 2021
Specifically test that the WebVTT flavour is correctly mapped to
the Matroska/WebM CodecID and back; and test that dispositions
unsupported by WebM are discarded even when they would be supported
by Matroska.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
tests/fate/matroska.mak | 10 +++
tests/ref/fate/webm-webvtt-remux | 122 +++++++++++++++++++++++++++++++
2 files changed, 132 insertions(+)
create mode 100644 tests/ref/fate/webm-webvtt-remux
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 8a46b1f0cd..f6d4bd1199 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -111,6 +111,16 @@ fate-matroska-mpegts-remux: CMD = transcode mpegts $(TARGET_SAMPLES)/mpegts/pmtc
FATE_MATROSKA_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER) += fate-matroska-spherical-mono
fate-matroska-spherical-mono: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_entries stream_side_data_list -select_streams v -v 0 $(TARGET_SAMPLES)/mkv/spherical.mkv
+# The following test tests the various flavours of WebVTT in WebM.
+# It also tests that dispositions not supported by WebM are not written
+# (and therefore lost). It moreover tests that the muxer writes CuePoints
+# with multiple CueTrackPositions if the timestamps coincide.
+FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL WEBVTT_DEMUXER \
+ WEBM_MUXER MATROSKA_DEMUXER \
+ FRAMECRC_MUXER PIPE_PROTOCOL) \
+ += fate-webm-webvtt-remux
+fate-webm-webvtt-remux: CMD = transcode webvtt $(TARGET_SAMPLES)/sub/WebVTT_capability_tester.vtt webm "-map 0 -map 0 -map 0 -map 0 -c:s copy -disposition:0 original+descriptions+hearing_impaired -disposition:1 lyrics+default+metadata -disposition:2 comment+forced -disposition:3 karaoke+captions+dub" "-map 0:0 -map 0:1 -c copy" "" "-show_entries stream_disposition:stream=index,codec_name"
+
FATE_SAMPLES_AVCONV += $(FATE_MATROSKA-yes)
FATE_SAMPLES_FFPROBE += $(FATE_MATROSKA_FFPROBE-yes)
FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_MATROSKA_FFMPEG_FFPROBE-yes)
diff --git a/tests/ref/fate/webm-webvtt-remux b/tests/ref/fate/webm-webvtt-remux
new file mode 100644
index 0000000000..0737541be5
--- /dev/null
+++ b/tests/ref/fate/webm-webvtt-remux
@@ -0,0 +1,122 @@
+c5625f28e6968e12d91f125edef5f16c *tests/data/fate/webm-webvtt-remux.webm
+6560 tests/data/fate/webm-webvtt-remux.webm
+#tb 0: 1/1000
+#media_type 0: subtitle
+#codec_id 0: webvtt
+#tb 1: 1/1000
+#media_type 1: subtitle
+#codec_id 1: webvtt
+0, 11000, 11000, 2000, 58, 0x45bb13fd
+1, 11000, 11000, 2000, 58, 0x45bb13fd
+0, 13000, 13000, 3000, 73, 0xb3c21a1b
+1, 13000, 13000, 3000, 73, 0xb3c21a1b
+0, 16000, 16000, 2000, 60, 0x89f515d4
+1, 16000, 16000, 2000, 60, 0x89f515d4
+0, 18000, 18000, 2000, 51, 0xc84211f5
+1, 18000, 18000, 2000, 51, 0xc84211f5
+0, 20000, 20000, 2000, 67, 0x3e2918c7
+1, 20000, 20000, 2000, 67, 0x3e2918c7
+0, 22000, 22000, 2000, 29, 0x93f7098d, S=1, 3, 0x012a0096
+1, 22000, 22000, 2000, 29, 0x93f7098d, S=1, 3, 0x012a0096
+0, 24000, 24000, 2000, 49, 0xb2d91196
+1, 24000, 24000, 2000, 49, 0xb2d91196
+0, 27000, 27000, 3000, 99, 0xb750231a, S=1, 14, 0x292a0588
+1, 27000, 27000, 3000, 99, 0xb750231a, S=1, 14, 0x292a0588
+0, 30000, 30000, 1500, 36, 0xe7f70d87, S=1, 18, 0x3f63061b
+1, 30000, 30000, 1500, 36, 0xe7f70d87, S=1, 18, 0x3f63061b
+0, 30500, 30500, 2000, 112, 0x6961267d, S=1, 20, 0x50b70712
+1, 30500, 30500, 2000, 112, 0x6961267d, S=1, 20, 0x50b70712
+0, 32000, 32000, 3500, 58, 0x32d11382, S=1, 18, 0x3f63061b
+1, 32000, 32000, 3500, 58, 0x32d11382, S=1, 18, 0x3f63061b
+0, 32500, 32500, 1000, 36, 0xe6650c7c, S=1, 20, 0x47000712
+1, 32500, 32500, 1000, 36, 0xe6650c7c, S=1, 20, 0x47000712
+0, 35500, 35500, 2500, 73, 0xb13f19c0
+1, 35500, 35500, 2500, 73, 0xb13f19c0
+0, 50000, 50000, 1134, 43, 0x534b0ee3
+1, 50000, 50000, 1134, 43, 0x534b0ee3
+0, 3540123, 3540123, 1485555, 13, 0x216a04d8
+1, 3540123, 3540123, 1485555, 13, 0x216a04d8
+[STREAM]
+index=0
+codec_name=webvtt
+DISPOSITION:default=0
+DISPOSITION:dub=0
+DISPOSITION:original=0
+DISPOSITION:comment=0
+DISPOSITION:lyrics=0
+DISPOSITION:karaoke=0
+DISPOSITION:forced=0
+DISPOSITION:hearing_impaired=0
+DISPOSITION:visual_impaired=0
+DISPOSITION:clean_effects=0
+DISPOSITION:attached_pic=0
+DISPOSITION:timed_thumbnails=0
+DISPOSITION:captions=0
+DISPOSITION:descriptions=1
+DISPOSITION:metadata=0
+DISPOSITION:dependent=0
+DISPOSITION:still_image=0
+[/STREAM]
+[STREAM]
+index=1
+codec_name=webvtt
+DISPOSITION:default=1
+DISPOSITION:dub=0
+DISPOSITION:original=0
+DISPOSITION:comment=0
+DISPOSITION:lyrics=0
+DISPOSITION:karaoke=0
+DISPOSITION:forced=0
+DISPOSITION:hearing_impaired=0
+DISPOSITION:visual_impaired=0
+DISPOSITION:clean_effects=0
+DISPOSITION:attached_pic=0
+DISPOSITION:timed_thumbnails=0
+DISPOSITION:captions=0
+DISPOSITION:descriptions=0
+DISPOSITION:metadata=1
+DISPOSITION:dependent=0
+DISPOSITION:still_image=0
+[/STREAM]
+[STREAM]
+index=2
+codec_name=webvtt
+DISPOSITION:default=0
+DISPOSITION:dub=0
+DISPOSITION:original=0
+DISPOSITION:comment=0
+DISPOSITION:lyrics=0
+DISPOSITION:karaoke=0
+DISPOSITION:forced=1
+DISPOSITION:hearing_impaired=0
+DISPOSITION:visual_impaired=0
+DISPOSITION:clean_effects=0
+DISPOSITION:attached_pic=0
+DISPOSITION:timed_thumbnails=0
+DISPOSITION:captions=0
+DISPOSITION:descriptions=0
+DISPOSITION:metadata=0
+DISPOSITION:dependent=0
+DISPOSITION:still_image=0
+[/STREAM]
+[STREAM]
+index=3
+codec_name=webvtt
+DISPOSITION:default=0
+DISPOSITION:dub=0
+DISPOSITION:original=0
+DISPOSITION:comment=0
+DISPOSITION:lyrics=0
+DISPOSITION:karaoke=0
+DISPOSITION:forced=0
+DISPOSITION:hearing_impaired=0
+DISPOSITION:visual_impaired=0
+DISPOSITION:clean_effects=0
+DISPOSITION:attached_pic=0
+DISPOSITION:timed_thumbnails=0
+DISPOSITION:captions=1
+DISPOSITION:descriptions=0
+DISPOSITION:metadata=0
+DISPOSITION:dependent=0
+DISPOSITION:still_image=0
+[/STREAM]
--
2.27.0
More information about the ffmpeg-devel
mailing list