mirror of https://git.ffmpeg.org/ffmpeg.git
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@gmail.com>
This commit is contained in:
parent
e1d9bfc3ee
commit
277306f54b
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue