[FFmpeg-cvslog] fate: Allow to test temporary files with ffprobe

Andreas Rheinhardt git at videolan.org
Sun Apr 19 01:24:55 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Mon Apr 13 04:09:21 2020 +0200| [277306f54bb6d0927a793dec5a7c09ae47648359] | committer: Andreas Rheinhardt

fate: Allow to test temporary files with ffprobe

This is primarily intended to test that muxers correctly write chapters
or metadata; but given that it does this by having our demuxers read the
generated files, it also tests demuxers. And of course it may prove
useful for encoders, too.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=277306f54bb6d0927a793dec5a7c09ae47648359
---

 tests/Makefile    |  7 +++++--
 tests/fate-run.sh | 13 +++++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 477f5bef26..bf5b658926 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -200,11 +200,14 @@ include $(SRC_PATH)/tests/fate/xvid.mak
 FATE_FFMPEG += $(FATE_FFMPEG-yes) $(FATE_AVCONV) $(FATE_AVCONV-yes)
 FATE-$(CONFIG_FFMPEG) += $(FATE_FFMPEG)
 FATE-$(CONFIG_FFPROBE) += $(FATE_FFPROBE)
+FATE-$(call ALLYES, FFMPEG FFPROBE) += $(FATE_FFMPEG_FFPROBE)
 
 FATE_SAMPLES_AVCONV           += $(FATE_SAMPLES_AVCONV-yes)
 FATE_SAMPLES_FFMPEG           += $(FATE_SAMPLES_FFMPEG-yes)
 FATE_EXTERN-$(CONFIG_FFMPEG)  += $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG)
 FATE_EXTERN-$(CONFIG_FFPROBE) += $(FATE_SAMPLES_FFPROBE)
+FATE_SAMPLES_FFMPEG_FFPROBE   += $(FATE_SAMPLES_FFMPEG_FFPROBE-yes)
+FATE_EXTERN-$(call ALLYES, FFMPEG FFPROBE) += $(FATE_SAMPLES_FFMPEG_FFPROBE)
 FATE_EXTERN                   += $(FATE_EXTERN-yes) $(FATE_SAMPLES_FASTSTART)
 
 FATE += $(FATE-yes)
@@ -212,9 +215,9 @@ FATE += $(FATE-yes)
 RSYNC_OPTIONS-$(HAVE_RSYNC_CONTIMEOUT) += --contimeout=60
 RSYNC_OPTIONS = -vrltLW --timeout=60 $(RSYNC_OPTIONS-yes)
 
-$(FATE_FFMPEG) $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG): ffmpeg$(PROGSSUF)$(EXESUF)
+$(FATE_FFMPEG) $(FATE_FFMPEG_FFPROBE) $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG) $(FATE_SAMPLES_FFMPEG_FFPROBE): ffmpeg$(PROGSSUF)$(EXESUF)
 
-$(FATE_FFPROBE) $(FATE_SAMPLES_FFPROBE): ffprobe$(PROGSSUF)$(EXESUF)
+$(FATE_FFPROBE) $(FATE_FFMPEG_FFPROBE) $(FATE_SAMPLES_FFPROBE) $(FATE_SAMPLES_FFMPEG_FFPROBE): ffprobe$(PROGSSUF)$(EXESUF)
 
 $(FATE_SAMPLES_FASTSTART): tools/qt-faststart$(EXESUF)
 
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 552b3dd9df..7c6d753261 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -192,6 +192,7 @@ enc_dec(){
     enc_opt=$4
     dec_fmt=$5
     dec_opt=$6
+    ffprobe_opts=$9
     encfile="${outdir}/${test}.${enc_fmt}"
     decfile="${outdir}/${test}.out.${dec_fmt}"
     cleanfiles="$cleanfiles $decfile"
@@ -207,6 +208,8 @@ enc_dec(){
         -f $dec_fmt -y $tdecfile || return
     do_md5sum $decfile
     tests/tiny_psnr${HOSTEXECSUF} $srcfile $decfile $cmp_unit $cmp_shift
+    test -z $ffprobe_opts || \
+        run ffprobe${PROGSUF}${EXECSUF} $ffprobe_opts -v 0 $tencfile || return
 }
 
 transcode(){
@@ -215,8 +218,9 @@ transcode(){
     enc_fmt=$3
     enc_opt=$4
     final_decode=$5
+    ffprobe_opts=$7
     encfile="${outdir}/${test}.${enc_fmt}"
-    test "$7" = -keep || cleanfiles="$cleanfiles $encfile"
+    test "$6" = -keep || cleanfiles="$cleanfiles $encfile"
     tsrcfile=$(target_path $srcfile)
     tencfile=$(target_path $encfile)
     ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \
@@ -225,6 +229,8 @@ transcode(){
     echo $(wc -c $encfile)
     ffmpeg $DEC_OPTS -i $tencfile $ENC_OPTS $FLAGS $final_decode \
         -f framecrc - || return
+    test -z $ffprobe_opts || \
+        run ffprobe${PROGSUF}${EXECSUF} $ffprobe_opts -v 0 $tencfile || return
 }
 
 stream_remux(){
@@ -233,14 +239,17 @@ stream_remux(){
     enc_fmt=$3
     stream_maps=$4
     final_decode=$5
+    ffprobe_opts=$7
     encfile="${outdir}/${test}.${enc_fmt}"
-    test "$7" = -keep || cleanfiles="$cleanfiles $encfile"
+    test "$6" = -keep || cleanfiles="$cleanfiles $encfile"
     tsrcfile=$(target_path $srcfile)
     tencfile=$(target_path $encfile)
     ffmpeg -f $src_fmt -i $tsrcfile $stream_maps -codec copy $FLAGS \
         -f $enc_fmt -y $tencfile || return
     ffmpeg $DEC_OPTS -i $tencfile $ENC_OPTS $FLAGS $final_decode \
         -f framecrc - || return
+    test -z $ffprobe_opts || \
+        run ffprobe${PROGSUF}${EXECSUF} $ffprobe_opts -v 0 $tencfile || return
 }
 
 # FIXME: There is a certain duplication between the avconv-related helper



More information about the ffmpeg-cvslog mailing list