diff mbox series

[FFmpeg-devel] tests: add test for ffmpeg's fix_sub_duration feature

Message ID 20211220172236.9515-1-jeebjp@gmail.com
State New
Headers show
Series [FFmpeg-devel] tests: add test for ffmpeg's fix_sub_duration feature | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Jan Ekström Dec. 20, 2021, 5:22 p.m. UTC
From: Jan Ekström <jan.ekstrom@24i.com>

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
 tests/fate/ffmpeg.mak                  |  8 ++++++
 tests/ref/fate/ffmpeg-fix_sub_duration | 40 ++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 tests/ref/fate/ffmpeg-fix_sub_duration
diff mbox series


diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak
index 4ba73a8dfa..63721f2209 100644
--- a/tests/fate/ffmpeg.mak
+++ b/tests/fate/ffmpeg.mak
 fate-shortest: tests/data/vsynth_lena.yuv
 fate-shortest: CMD = framecrc -auto_conversion_filters -f lavfi -i "sine=3000:d=10" -f lavfi -i "sine=1000:d=1" -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -f rawvideo -s 352x288 -pix_fmt yuv420p -i $(TARGET_PATH)/tests/data/vsynth_lena.yuv -filter_complex "[0:a:0][1:a:0]amix=inputs=2[audio]" -map 2:v:0 -map "[audio]" -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -dct fastint -qscale 10 -threads 1 -c:v mpeg4 -c:a ac3_fixed -shortest
+# Basic test for fix_sub_duration, which calculates duration based on the
+# following subtitle's pts.
+                           SAMI_DECODER TEXT_ENCODER SRT_MUXER) \
+                           += fate-ffmpeg-fix_sub_duration
+fate-ffmpeg-fix_sub_duration: CMD = fmtstdout srt -fix_sub_duration \
+  -i "$(TARGET_SAMPLES)/sub/SAMI_capability_tester.smi"
 FATE_STREAMCOPY-$(call ALLYES, EAC3_DEMUXER MOV_MUXER) += fate-copy-trac3074
 fate-copy-trac3074: $(SAMPLES)/eac3/csi_miami_stereo_128_spx.eac3
 fate-copy-trac3074: CMD = transcode eac3 $(TARGET_SAMPLES)/eac3/csi_miami_stereo_128_spx.eac3\
diff --git a/tests/ref/fate/ffmpeg-fix_sub_duration b/tests/ref/fate/ffmpeg-fix_sub_duration
new file mode 100644
index 0000000000..238c9ab635
--- /dev/null
+++ b/tests/ref/fate/ffmpeg-fix_sub_duration
@@ -0,0 +1,40 @@ 
+00:00:00,000 --> 00:00:00,010
+<i>Pres. John F. Kennedy</i>
+00:00:00,010 --> 00:00:08,800
+<i>Pres. John F. Kennedy</i>
+Let the word go forth, from this time and place to friend and foe alike that the torch
+00:00:08,800 --> 00:00:19,500
+<i>Pres. John F. Kennedy</i>
+has been passed to a new generation of Americans, born in this century, tempered by war,
+00:00:19,500 --> 00:00:28,000
+<i>Pres. John F. Kennedy</i>
+disciplined by a hard and bitter peace, proud of our ancient heritage, and unwilling to witness
+00:00:28,000 --> 00:00:38,000
+<i>Pres. John F. Kennedy</i>
+or permit the slow undoing of those human rights to which this nation has always
+00:00:38,000 --> 00:00:46,000
+<i>Pres. John F. Kennedy</i>
+been committed and to which we are committed today at home and around the world.
+00:00:46,000 --> 00:01:01,000
+<i>Pres. John F. Kennedy</i>
+Let every nation know, whether it wishes us well or ill, that we shall pay any price, bear any burden,
+00:01:01,000 --> 00:01:13,000
+<i>Pres. John F. Kennedy</i>
+meet any hardship, support any friend, oppose any foe, to ensure the survival and success of liberty.