From 6291d7e41605c0b1e9debfae8a2b1d4cf7b0e0b3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 27 Jul 2011 20:56:59 +0200 Subject: Make a copy of ffmpeg under a new name -- avconv. It will be further developed with a few incompatible changes. ffmpeg.c will stay as is for some time, so any scripts using it won't be broken. --- tests/Makefile | 6 +++--- tests/codec-regression.sh | 12 ++++++------ tests/fate-run.sh | 14 +++++++------- tests/lavf-regression.sh | 36 ++++++++++++++++++------------------ tests/lavfi-regression.sh | 6 +++--- tests/regression-funcs.sh | 32 ++++++++++++++++---------------- 6 files changed, 53 insertions(+), 53 deletions(-) (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index 7014bf5811..b511a9a118 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -2,8 +2,8 @@ AREF = fate-acodec-aref VREF = fate-vsynth1-vref fate-vsynth2-vref REFS = $(AREF) $(VREF) -$(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm -$(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw +$(VREF): avconv$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm +$(AREF): avconv$(EXESUF) tests/data/asynth1.sw tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF) @mkdir -p tests/vsynth1 @@ -84,7 +84,7 @@ FATE_UTILS = base64 tiny_psnr fate: $(FATE) -$(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) +$(FATE): avconv$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) @echo "TEST $(@:fate-%=%)" $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh index a420c573c9..a44f6320ea 100755 --- a/tests/codec-regression.sh +++ b/tests/codec-regression.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# automatic regression test for ffmpeg +# automatic regression test for avconv # # #set -x @@ -13,10 +13,10 @@ eval do_$test=y # generate reference for quality check if [ -n "$do_vref" ]; then -do_ffmpeg $raw_ref -f image2 -vcodec pgmyuv -i $raw_src -an -f rawvideo +do_avconv $raw_ref -f image2 -vcodec pgmyuv -i $raw_src -an -f rawvideo fi if [ -n "$do_aref" ]; then -do_ffmpeg $pcm_ref -ab 128k -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav +do_avconv $pcm_ref -ab 128k -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav fi if [ -n "$do_mpeg" ] ; then @@ -58,7 +58,7 @@ do_video_decoding # mpeg2 encoding interlaced file=${outfile}mpeg2reuse.mpg -do_ffmpeg $file $DEC_OPTS -me_threshold 256 -i ${target_path}/${outfile}mpeg2thread.mpg $ENC_OPTS -sameq -me_threshold 256 -mb_threshold 1024 -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 4 +do_avconv $file $DEC_OPTS -me_threshold 256 -i ${target_path}/${outfile}mpeg2thread.mpg $ENC_OPTS -sameq -me_threshold 256 -mb_threshold 1024 -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 4 do_video_decoding fi @@ -320,12 +320,12 @@ fi if [ -n "$do_wmav1" ] ; then do_audio_encoding wmav1.asf "-acodec wmav1" -do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav +do_avconv_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav $tiny_psnr $pcm_dst $pcm_ref 2 8192 fi if [ -n "$do_wmav2" ] ; then do_audio_encoding wmav2.asf "-acodec wmav2" -do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav +do_avconv_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav $tiny_psnr $pcm_dst $pcm_ref 2 8192 fi diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 4121035853..f623eecae6 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -49,28 +49,28 @@ run(){ $target_exec $target_path/"$@" } -ffmpeg(){ - run ffmpeg -v 0 -threads $threads -thread_type $thread_type "$@" +avconv(){ + run avconv -v 0 -threads $threads -thread_type $thread_type "$@" } framecrc(){ - ffmpeg "$@" -f framecrc - + avconv "$@" -f framecrc - } framemd5(){ - ffmpeg "$@" -f framemd5 - + avconv "$@" -f framemd5 - } crc(){ - ffmpeg "$@" -f crc - + avconv "$@" -f crc - } md5(){ - ffmpeg "$@" md5: + avconv "$@" md5: } pcm(){ - ffmpeg "$@" -vn -f s16le - + avconv "$@" -vn -f s16le - } regtest(){ diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 38a190cecf..3650ce1b95 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -14,15 +14,15 @@ eval do_$test=y do_lavf() { file=${outfile}lavf.$1 - do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -ab 64k -t 1 -qscale 10 $2 - do_ffmpeg_crc $file $DEC_OPTS -i $target_path/$file $3 + do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -ab 64k -t 1 -qscale 10 $2 + do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3 } do_streamed_images() { file=${outfile}${1}pipe.$1 - do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 - do_ffmpeg_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file + do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 + do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file } do_image_formats() @@ -30,17 +30,17 @@ do_image_formats() outfile="$datadir/images/$1/" mkdir -p "$outfile" file=${outfile}%02d.$1 - run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file + run_avconv $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file do_md5sum ${outfile}02.$1 - do_ffmpeg_crc $file $DEC_OPTS $3 -i $target_path/$file + do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file wc -c ${outfile}02.$1 } do_audio_only() { file=${outfile}lavf.$1 - do_ffmpeg $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3 - do_ffmpeg_crc $file $DEC_OPTS $4 -i $target_path/$file + do_avconv $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3 + do_avconv_crc $file $DEC_OPTS $4 -i $target_path/$file } if [ -n "$do_avi" ] ; then @@ -53,9 +53,9 @@ fi if [ -n "$do_rm" ] ; then file=${outfile}lavf.rm -do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -acodec ac3_fixed -ab 64k +do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -acodec ac3_fixed -ab 64k # broken -#do_ffmpeg_crc $file -i $target_path/$file +#do_avconv_crc $file -i $target_path/$file fi if [ -n "$do_mpg" ] ; then @@ -110,8 +110,8 @@ fi # streamed images # mjpeg #file=${outfile}lavf.mjpeg -#do_ffmpeg $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src -#do_ffmpeg_crc $file -i $target_path/$file +#do_avconv $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src +#do_avconv_crc $file -i $target_path/$file if [ -n "$do_pbmpipe" ] ; then do_streamed_images pbm @@ -127,14 +127,14 @@ fi if [ -n "$do_gif" ] ; then file=${outfile}lavf.gif -do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24 -do_ffmpeg_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24 +do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24 +do_avconv_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24 fi if [ -n "$do_yuv4mpeg" ] ; then file=${outfile}lavf.y4m -do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -#do_ffmpeg_crc $file -i $target_path/$file +do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 +#do_avconv_crc $file -i $target_path/$file fi # image formats @@ -227,9 +227,9 @@ conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \ monob yuv440p yuvj440p" for pix_fmt in $conversions ; do file=${outfile}${pix_fmt}.yuv - run_ffmpeg $DEC_OPTS -r 1 -t 1 -f image2 -vcodec pgmyuv -i $raw_src \ + run_avconv $DEC_OPTS -r 1 -t 1 -f image2 -vcodec pgmyuv -i $raw_src \ $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst - do_ffmpeg $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \ + do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \ $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p done fi diff --git a/tests/lavfi-regression.sh b/tests/lavfi-regression.sh index 8942756697..f8c0c4e75b 100755 --- a/tests/lavfi-regression.sh +++ b/tests/lavfi-regression.sh @@ -16,7 +16,7 @@ do_video_filter() { filters=$2 shift 2 printf '%-20s' $label - run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \ + run_avconv $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \ $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5: } @@ -49,7 +49,7 @@ do_lavfi_pixfmts(){ out_fmts=${outfile}${1}_out_fmts # exclude pixel formats which are not supported as input - $ffmpeg -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^\..\.' | cut -d' ' -f2 | sort >$exclude_fmts + $avconv -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^\..\.' | cut -d' ' -f2 | sort >$exclude_fmts $showfiltfmts scale | awk -F '[ \r]' '/^OUTPUT/{ print $3 }' | sort | comm -23 - $exclude_fmts >$out_fmts pix_fmts=$($showfiltfmts $filter | awk -F '[ \r]' '/^INPUT/{ print $3 }' | sort | comm -12 - $out_fmts) @@ -70,7 +70,7 @@ do_lavfi_pixfmts "scale" "200:100" do_lavfi_pixfmts "vflip" "" if [ -n "$do_pixdesc" ]; then - pix_fmts="$($ffmpeg -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^IO' | cut -d' ' -f2 | sort)" + pix_fmts="$($avconv -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^IO' | cut -d' ' -f2 | sort)" for pix_fmt in $pix_fmts; do do_video_filter $pix_fmt "slicify=random,format=$pix_fmt,pixdesctest" -pix_fmt $pix_fmt done diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh index 979157bcf9..bba189092b 100755 --- a/tests/regression-funcs.sh +++ b/tests/regression-funcs.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# common regression functions for ffmpeg +# common regression functions for avconv # # @@ -18,7 +18,7 @@ this="$test.$test_ref" outfile="$datadir/$test_ref/" # various files -ffmpeg="$target_exec ${target_path}/ffmpeg" +avconv="$target_exec ${target_path}/avconv" tiny_psnr="tests/tiny_psnr" raw_src="${target_path}/$raw_src_dir/%02d.pgm" raw_dst="$datadir/$this.out.yuv" @@ -43,23 +43,23 @@ echov(){ . $(dirname $0)/md5.sh -FFMPEG_OPTS="-v 0 -y" +AVCONV_OPTS="-v 0 -y" COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact" DEC_OPTS="$COMMON_OPTS -threads $threads" ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint" -run_ffmpeg() +run_avconv() { - $echov $ffmpeg $FFMPEG_OPTS $* - $ffmpeg $FFMPEG_OPTS $* + $echov $avconv $AVCONV_OPTS $* + $avconv $AVCONV_OPTS $* } -do_ffmpeg() +do_avconv() { f="$1" shift set -- $* ${target_path}/$f - run_ffmpeg $* + run_avconv $* do_md5sum $f if [ $f = $raw_dst ] ; then $tiny_psnr $f $raw_ref @@ -70,12 +70,12 @@ do_ffmpeg() fi } -do_ffmpeg_nomd5() +do_avconv_nomd5() { f="$1" shift set -- $* ${target_path}/$f - run_ffmpeg $* + run_avconv $* if [ $f = $raw_dst ] ; then $tiny_psnr $f $raw_ref elif [ $f = $pcm_dst ] ; then @@ -85,32 +85,32 @@ do_ffmpeg_nomd5() fi } -do_ffmpeg_crc() +do_avconv_crc() { f="$1" shift - run_ffmpeg $* -f crc "$target_crcfile" + run_avconv $* -f crc "$target_crcfile" echo "$f $(cat $crcfile)" } do_video_decoding() { - do_ffmpeg $raw_dst $DEC_OPTS $1 -i $target_path/$file -f rawvideo $ENC_OPTS -vsync 0 $2 + do_avconv $raw_dst $DEC_OPTS $1 -i $target_path/$file -f rawvideo $ENC_OPTS -vsync 0 $2 } do_video_encoding() { file=${outfile}$1 - do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS $2 + do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS $2 } do_audio_encoding() { file=${outfile}$1 - do_ffmpeg $file $DEC_OPTS -ac 2 -ar 44100 -f s16le -i $pcm_src -ab 128k $ENC_OPTS $2 + do_avconv $file $DEC_OPTS -ac 2 -ar 44100 -f s16le -i $pcm_src -ab 128k $ENC_OPTS $2 } do_audio_decoding() { - do_ffmpeg $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav + do_avconv $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav } -- cgit v1.2.3