From dd670c8a0fc0065fa7678bd564306b32f7486064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Wed, 24 Oct 2012 23:04:19 +0200 Subject: [PATCH] WIP: use the lavfi -graph_file option to workaround path issues. --- tests/fate-run.sh | 19 +++++++++++++++++++ tests/fate/filter.mak | 6 ++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index ccd04a3..31ee78a 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -104,6 +104,25 @@ pcm(){ ffmpeg "$@" -vn -f s16le - } +metadata(){ + filter_type=$1 + name=$2 + src=$3 + filter=$4 + + graph_file=tests/data/$name.lavfi + if [ $filter_type = audio ]; then + printf "amovie=" > $graph_file + else + printf "sws_flags=+accurate_rnd+bitexact; movie=" > $graph_file + fi + + # two different commands to make sure the path is substitued by msys + printf $src >> $graph_file + printf ",$filter" >> $graph_file + run ffprobe -show_frames -of compact=nk=1:p=0 -bitexact -f lavfi -graph_file $graph_file $name +} + enc_dec_pcm(){ out_fmt=$1 dec_fmt=$2 diff --git a/tests/fate/filter.mak b/tests/fate/filter.mak index 66ff333..f6bcbed 100644 --- a/tests/fate/filter.mak +++ b/tests/fate/filter.mak @@ -49,18 +49,16 @@ FATE_SAMPLES_AVCONV += $(FATE_FILTER-yes) # # Metadata tests # -FILTER_METADATA_COMMAND = ffprobe$(EXESUF) -show_frames -of compact=nk=1:p=0 -bitexact -f lavfi - SCENEDETECT_DEPS = FFPROBE LAVFI_INDEV MOVIE_FILTER SELECT_FILTER SCALE_FILTER \ AVCODEC MOV_DEMUXER SVQ3_DECODER ZLIB FATE_METADATA_FILTER-$(call ALLYES, $(SCENEDETECT_DEPS)) += fate-filter-metadata-scenedetect fate-filter-metadata-scenedetect: SRC = $(SAMPLES)/svq3/Vertical400kbit.sorenson3.mov -fate-filter-metadata-scenedetect: CMD = run $(FILTER_METADATA_COMMAND) "sws_flags=+accurate_rnd+bitexact;movie='$(SRC)',select=gt(scene\,.4)" +fate-filter-metadata-scenedetect: CMD = metadata video scenedetect $(SRC) "select=gt(scene\,.4)" SILENCEDETECT_DEPS = FFPROBE LAVFI_INDEV AMOVIE_FILTER AMR_DEMUXER AMRWB_DECODER FATE_METADATA_FILTER-$(call ALLYES, $(SILENCEDETECT_DEPS)) += fate-filter-metadata-silencedetect fate-filter-metadata-silencedetect: SRC = $(SAMPLES)/amrwb/seed-12k65.awb -fate-filter-metadata-silencedetect: CMD = run $(FILTER_METADATA_COMMAND) "amovie='$(SRC)',silencedetect=d=.1" +fate-filter-metadata-silencedetect: CMD = metadata audio silencedetect $(SRC) "silencedetect=d=.1" FATE_SAMPLES_FFPROBE += $(FATE_METADATA_FILTER-yes) -- 1.8.0