[FFmpeg-devel] [PATCH] Add muxer test based on stream-copy from FATE sample.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Feb 12 11:53:29 CET 2012


This should test muxing theora into Ogg.
However the test does not work yet since for some reason
-flags +bitexact is ignored with -vcodec copy and I am
not able to figure out why.
Hints/fixes welcome.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 configure                 |    6 ++++--
 tests/Makefile            |    4 ++++
 tests/fate-run.sh         |    6 +++++-
 tests/lavf-regression.sh  |   12 ++++++++++++
 tests/regression-funcs.sh |    1 +
 5 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index bb11b69..f818110 100755
--- a/configure
+++ b/configure
@@ -1772,7 +1772,7 @@ test_deps _muxer _demuxer                                               \
     pcm_mulaw=mulaw                                                     \
     mxf="mxf mxf_d10"                                                   \
     nut                                                                 \
-    ogg                                                                 \
+    ogg="ogg ogg_vp3"                                                   \
     rawvideo=pixfmt                                                     \
     rm                                                                  \
     swf                                                                 \
@@ -1940,11 +1940,12 @@ find_tests(){
 
 ACODEC_TESTS=$(find_tests acodec)
 VCODEC_TESTS=$(find_tests vsynth1)
+LAVF_FATE_TESTS=$(find_tests lavf-fate)
 LAVF_TESTS=$(find_tests lavf)
 LAVFI_TESTS=$(find_tests lavfi)
 SEEK_TESTS=$(find_tests seek seek_)
 
-ALL_TESTS="$ACODEC_TESTS $VCODEC_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS"
+ALL_TESTS="$ACODEC_TESTS $VCODEC_TESTS $LAVF_FATE_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS"
 
 pcm_test_deps=$(map 'echo ${v%_*}_decoder $v' $(filter pcm_* $ENCODER_LIST))
 
@@ -3693,6 +3694,7 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST       \
 cat >>config.mak <<EOF
 ACODEC_TESTS=$(print_enabled -n _test $ACODEC_TESTS)
 VCODEC_TESTS=$(print_enabled -n _test $VCODEC_TESTS)
+LAVF_FATE_TESTS=$(print_enabled -n _test $LAVF_FATE_TESTS)
 LAVF_TESTS=$(print_enabled   -n _test $LAVF_TESTS)
 LAVFI_TESTS=$(print_enabled  -n _test $LAVFI_TESTS)
 SEEK_TESTS=$(print_enabled   -n _test $SEEK_TESTS)
diff --git a/tests/Makefile b/tests/Makefile
index 0722906..97f595b 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -81,6 +81,7 @@ FATE_ACODEC  = $(ACODEC_TESTS:%=fate-acodec-%)
 FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
 FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
 FATE_VCODEC  = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
+FATE_LAVF_FATE = $(LAVF_FATE_TESTS:%=fate-lavf-fate-%)
 FATE_LAVF    = $(LAVF_TESTS:%=fate-lavf-%)
 FATE_LAVFI   = $(LAVFI_TESTS:%=fate-lavfi-%)
 FATE_SEEK    = $(SEEK_TESTS:seek_%=fate-seek-%)
@@ -104,6 +105,7 @@ $(FATE_SEEK):   fate-codec fate-lavf libavformat/seek-test$(EXESUF)
 $(FATE_ACODEC):  CMD = codectest acodec
 $(FATE_VSYNTH1): CMD = codectest vsynth1
 $(FATE_VSYNTH2): CMD = codectest vsynth2
+$(FATE_LAVF_FATE): CMD = lavffatetest
 $(FATE_LAVF):    CMD = lavftest
 $(FATE_LAVFI):   CMD = lavfitest
 $(FATE_SEEK):    CMD = seektest
@@ -111,11 +113,13 @@ $(FATE_SEEK):    CMD = seektest
 fate-codec:  fate-acodec fate-vcodec
 fate-acodec: $(FATE_ACODEC)
 fate-vcodec: $(FATE_VCODEC)
+fate-lavf-fate: $(FATE_LAVF_FATE)
 fate-lavf:   $(FATE_LAVF)
 fate-lavfi:  $(FATE_LAVFI)
 fate-seek:   $(FATE_SEEK)
 
 ifdef SAMPLES
+FATE += $(FATE_LAVF_FATE)
 FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
 fate-rsync:
 	rsync -vaLW --timeout=60 --contimeout=60 rsync://fate.ffmpeg.org/fate-suite/ $(SAMPLES)
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 2f92a7d..d7b5e7e 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -77,13 +77,17 @@ pcm(){
 regtest(){
     t="${test#$2-}"
     ref=${base}/ref/$2/$t
-    ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type" "$tool"
+    ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type" "$tool" "$samples"
 }
 
 codectest(){
     regtest codec $1 tests/$1
 }
 
+lavffatetest(){
+    regtest lavf lavf-fate tests/vsynth1
+}
+
 lavftest(){
     regtest lavf lavf tests/vsynth1
 }
diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index 286d94f..13182c6 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -13,6 +13,14 @@ eval do_$test=y
 
 ENC_OPTS="$ENC_OPTS -metadata title=lavftest"
 
+do_lavf_fate()
+{
+    file=${outfile}lavf.$1
+    input="${samples}/$2"
+    do_avconv $file $DEC_OPTS -i "$input" $ENC_OPTS -vcodec copy -acodec copy
+    do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
+}
+
 do_lavf()
 {
     file=${outfile}lavf.$1
@@ -122,6 +130,10 @@ if [ -n "$do_mkv" ] ; then
 do_lavf mkv "-acodec mp2 -ab 64k -vcodec mpeg4"
 fi
 
+if [ -n "$do_ogg_vp3" ] ; then
+do_lavf_fate ogg "vp3/coeff_level64.mkv"
+fi
+
 if [ -n "$do_wtv" ] ; then
 do_lavf wtv "-acodec mp2"
 fi
diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh
index b0a9b85..1cafb3f 100755
--- a/tests/regression-funcs.sh
+++ b/tests/regression-funcs.sh
@@ -11,6 +11,7 @@ target_exec=$4
 target_path=$5
 threads=${6:-1}
 tool=$8
+samples=$9
 
 datadir="./tests/data"
 target_datadir="${target_path}/${datadir}"
-- 
1.7.9



More information about the ffmpeg-devel mailing list