[FFmpeg-devel] [PATCH v3] tests/fate/hlsenc: add test case for var stream map of hlsenc

Steven Liu lq at chinaffmpeg.org
Thu Sep 5 07:21:41 EEST 2024


Output var stream map m3u8 list file,
and check the list file correct.

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
 tests/fate-run.sh     |  4 ++++
 tests/fate/hlsenc.mak | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 6ae0320c60..12d8faa65b 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -173,6 +173,10 @@ md5pipe(){
     ffmpeg "$@" md5:
 }
 
+md5file(){
+    do_md5sum "$@" | awk '{print $1}'
+}
+
 md5(){
     encfile="${outdir}/${test}.out"
     cleanfiles="$cleanfiles $encfile"
diff --git a/tests/fate/hlsenc.mak b/tests/fate/hlsenc.mak
index 98341b2b81..98b8c3b61a 100644
--- a/tests/fate/hlsenc.mak
+++ b/tests/fate/hlsenc.mak
@@ -85,6 +85,23 @@ FATE_HLSENC-$(call ALLYES, HLS_DEMUXER MPEGTS_MUXER MPEGTS_DEMUXER AEVALSRC_FILT
 fate-hls-list-size: tests/data/hls_list_size.m3u8
 fate-hls-list-size: CMD = framecrc -auto_conversion_filters -flags +bitexact -i $(TARGET_PATH)/tests/data/hls_list_size.m3u8 -vf setpts=N*23
 
+tests/data/with_vtt_var_stream_map.m3u8: TAG = GEN
+tests/data/with_vtt_var_stream_map.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+	$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin \
+	 -stream_loop 9 -i $(TARGET_SAMPLES)/mov/buck480p30_na.mp4 \
+	 -stream_loop 120 -i $(TARGET_SAMPLES)/audiomatch/tones_dolby_44100_stereo_aac_lc.mp4 \
+	 -i $(TARGET_SAMPLES)/sub/WebVTT_capability_tester.vtt \
+	 -c copy -map 0:v:0 -map 0:v:0 -map 0:v:0 -map 1:a:0 -map 1:a:0 -map 2:s:0 -map 2:s:0 \
+	 -f hls -master_pl_name "with_vtt_var_stream_map.m3u8" \
+	 -var_stream_map "a:0,name:en_audio,agroup:audio,language:en,default:YES a:1,name:nl_audio,agroup:audio,language:nl,default:NO v:0,name:en,s:0,sgroup:subtitle,language:en,default:NO v:1,name:nl,s:1,sgroup:subtitle,language:nl,default:NO v:2,name:high,agroup:audio" \
+	 "$(TARGET_PATH)/tests/data/%v.m3u8" 2>/dev/null
+
+FATE_HLSENC-$(call ALLYES, MOV_DEMUXER WEBVTT_DEMUXER MPEGTS_MUXER WEBVTT_MUXER HLS_MUXER) += fate-hls-with-vtt-var-stream_map
+fate-hls-with-vtt-var-stream_map: tests/data/with_vtt_var_stream_map.m3u8
+fate-hls-with-vtt-var-stream_map: CMD = md5file $(TARGET_PATH)/tests/data/with_vtt_var_stream_map.m3u8
+fate-hls-with-vtt-var-stream_map: CMP = oneline
+fate-hls-with-vtt-var-stream_map: REF = d52c10274103e68e8818654e2c2c6545
+
 tests/data/hls_fmp4.m3u8: TAG = GEN
 tests/data/hls_fmp4.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
 	$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin \
-- 
2.45.2



More information about the ffmpeg-devel mailing list