OSDN Git Service

fate/subtitles: Add a new test for WebVTT
authorRicardo Constantino <wiiaboo@gmail.com>
Sun, 11 Oct 2015 16:11:03 +0000 (17:11 +0100)
committerClément Bœsch <u@pkh.me>
Mon, 12 Oct 2015 20:14:44 +0000 (22:14 +0200)
Includes escapes that should now be supported and a few features not yet
fully supported, like comments, regions, classes, ruby, and lang.

All were tested with https://quuz.org/webvtt/ for validation, except
regions because the validator doesn't support them yet, and I couldn't
find any other way to validate WebVTT.

Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
tests/fate/subtitles.mak
tests/ref/fate/sub-webvtt2 [new file with mode: 0644]

index 81ad4d7..2d9eb50 100644 (file)
@@ -70,6 +70,9 @@ fate-sub-vplayer: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/VPlayer_capabilit
 FATE_SUBTITLES_ASS-$(call DEMDEC, WEBVTT, WEBVTT) += fate-sub-webvtt
 fate-sub-webvtt: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/WebVTT_capability_tester.vtt
 
+FATE_SUBTITLES_ASS-$(call DEMDEC, WEBVTT, WEBVTT) += fate-sub-webvtt2
+fate-sub-webvtt2: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/WebVTT_extended_tester.vtt
+
 FATE_SUBTITLES-$(call ALLYES, SRT_DEMUXER SUBRIP_DECODER WEBVTT_ENCODER WEBVTT_MUXER) += fate-sub-webvttenc
 fate-sub-webvttenc: CMD = fmtstdout webvtt -i $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt
 
diff --git a/tests/ref/fate/sub-webvtt2 b/tests/ref/fate/sub-webvtt2
new file mode 100644 (file)
index 0000000..7f23bde
--- /dev/null
@@ -0,0 +1,23 @@
+[Script Info]\r
+; Script generated by FFmpeg/Lavc\r
+ScriptType: v4.00+\r
+PlayResX: 384\r
+PlayResY: 288\r
+\r
+[V4+ Styles]\r
+Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\r
+Style: Default,Arial,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0\r
+\r
+[Events]\r
+Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r
+Dialogue: 0,0:00:00.00,0:00:20.00,Default,,0,0,0,,Hi, my name is Fred\r
+Dialogue: 0,0:00:02.50,0:00:22.50,Default,,0,0,0,,Hi, I’m Bill\r
+Dialogue: 0,0:00:05.00,0:00:25.00,Default,,0,0,0,,Would you like to get a coffee?\r
+Dialogue: 0,0:00:07.50,0:00:27.50,Default,,0,0,0,,Sure! I’ve only had one today.\r
+Dialogue: 0,0:00:10.00,0:00:30.00,Default,,0,0,0,,This is my fourth!\r
+Dialogue: 0,0:00:12.50,0:00:32.50,Default,,0,0,0,,OK, let’s go.\r
+Dialogue: 0,0:00:38.00,0:00:43.00,Default,,0,0,0,,I want to 愛あい love you\NThat's not proper English!\r
+Dialogue: 0,0:00:43.00,0:00:46.00,Default,,0,0,0,,{\i1}キツネ{\i0}じゃない キツネじゃない\N乙女おとめは\r
+Dialogue: 0,0:00:50.00,0:00:55.00,Default,,0,0,0,,Some time ago in a rather distant place....\r
+Dialogue: 0,0:00:55.00,0:01:00.00,Default,,0,0,0,,Descending: 123456\NAscending: 123456\r
+Dialogue: 0,0:01:00.00,0:01:05.00,Default,,0,0,0,,>> Never gonna give you up Never gonna let you down\NNever\hgonna\hrun\haround & desert\hyou\r