1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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.
This commit is contained in:
Anton Khirnov 2011-07-27 20:56:59 +02:00
parent 791a86c37a
commit 6291d7e416
15 changed files with 5564 additions and 64 deletions

1
.gitignore vendored
View File

@ -12,6 +12,7 @@ doc/*.html
doc/*.pod
doxy
ffmpeg
avconv
avplay
avprobe
avserver

View File

@ -53,6 +53,7 @@ COMPILE_S = $(call COMPILE,AS)
%.c %.h: TAG = GEN
PROGS-$(CONFIG_FFMPEG) += ffmpeg
PROGS-$(CONFIG_AVCONV) += avconv
PROGS-$(CONFIG_AVPLAY) += avplay
PROGS-$(CONFIG_AVPROBE) += avprobe
PROGS-$(CONFIG_AVSERVER) += avserver
@ -64,7 +65,7 @@ HOSTPROGS := $(TESTTOOLS:%=tests/%)
TOOLS = qt-faststart trasher
TOOLS-$(CONFIG_ZLIB) += cws2fws
BASENAMES = ffmpeg avplay avprobe avserver
BASENAMES = ffmpeg avconv avplay avprobe avserver
ALLPROGS = $(BASENAMES:%=%$(EXESUF))
ALLMANPAGES = $(BASENAMES:%=%.1)

4428
avconv.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -754,9 +754,9 @@ FILE *get_preset_file(char *filename, size_t filename_size,
{
FILE *f = NULL;
int i;
const char *base[3]= { getenv("FFMPEG_DATADIR"),
const char *base[3]= { getenv("AVCONV_DATADIR"),
getenv("HOME"),
FFMPEG_DATADIR,
AVCONV_DATADIR,
};
if (is_path) {
@ -766,11 +766,11 @@ FILE *get_preset_file(char *filename, size_t filename_size,
for (i = 0; i < 3 && !f; i++) {
if (!base[i])
continue;
snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i], i != 1 ? "" : "/.ffmpeg", preset_name);
snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i], i != 1 ? "" : "/.avconv", preset_name);
f = fopen(filename, "r");
if (!f && codec_name) {
snprintf(filename, filename_size,
"%s%s/%s-%s.ffpreset", base[i], i != 1 ? "" : "/.ffmpeg", codec_name, preset_name);
"%s%s/%s-%s.ffpreset", base[i], i != 1 ? "" : "/.avconv", codec_name, preset_name);
f = fopen(filename, "r");
}
}

11
configure vendored
View File

@ -65,7 +65,7 @@ Standard options:
--disable-logging do not log configure debug information
--prefix=PREFIX install in PREFIX [$prefix]
--bindir=DIR install binaries in DIR [PREFIX/bin]
--datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
--datadir=DIR install data files in DIR [PREFIX/share/avconv]
--libdir=DIR install libs in DIR [PREFIX/lib]
--shlibdir=DIR install shared libs in DIR [PREFIX/lib]
--incdir=DIR install includes in DIR [PREFIX/include]
@ -81,6 +81,7 @@ Configuration options:
and binaries will be unredistributable [no]
--disable-doc do not build documentation
--disable-ffmpeg disable ffmpeg build
--disable-avconv disable avconv build
--disable-avplay disable avplay build
--disable-avprobe disable avprobe build
--disable-avserver disable avserver build
@ -913,6 +914,7 @@ CONFIG_LIST="
dxva2
fastdiv
ffmpeg
avconv
avplay
avprobe
avserver
@ -1489,6 +1491,8 @@ postproc_deps="gpl"
# programs
ffmpeg_deps="avcodec avformat swscale"
ffmpeg_select="buffer_filter"
av_deps="avcodec avformat swscale"
av_select="buffer_filter"
avplay_deps="avcodec avformat swscale sdl"
avplay_select="rdft"
avprobe_deps="avcodec avformat"
@ -1595,7 +1599,7 @@ logfile="config.log"
# installation paths
prefix_default="/usr/local"
bindir_default='${prefix}/bin'
datadir_default='${prefix}/share/ffmpeg'
datadir_default='${prefix}/share/avconv'
incdir_default='${prefix}/include'
libdir_default='${prefix}/lib'
mandir_default='${prefix}/share/man'
@ -1635,6 +1639,7 @@ enable debug
enable doc
enable fastdiv
enable ffmpeg
enable avconv
enable avplay
enable avprobe
enable avserver
@ -3284,7 +3289,7 @@ cat > $TMPH <<EOF
#define LIBAV_CONFIG_H
#define LIBAV_CONFIGURATION "$(c_escape $LIBAV_CONFIGURATION)"
#define LIBAV_LICENSE "$(c_escape $license)"
#define FFMPEG_DATADIR "$(eval c_escape $datadir)"
#define AVCONV_DATADIR "$(eval c_escape $datadir)"
#define CC_TYPE "$cc_type"
#define CC_VERSION $cc_version
#define restrict $_restrict

1065
doc/avconv.texi Normal file

File diff suppressed because it is too large Load Diff

View File

@ -170,7 +170,7 @@ Seek to percentage in file corresponding to fraction of width.
@settitle AVplay media player
@c man begin SEEALSO
ffmpeg(1), avprobe(1), avserver(1) and the Libav HTML documentation
avconv(1), avprobe(1), avserver(1) and the Libav HTML documentation
@c man end
@c man begin AUTHORS

View File

@ -122,7 +122,7 @@ with name "STREAM".
@settitle avprobe media prober
@c man begin SEEALSO
ffmpeg(1), avplay(1), avserver(1) and the Libav HTML documentation
avconv(1), avplay(1), avserver(1) and the Libav HTML documentation
@c man end
@c man begin AUTHORS

View File

@ -265,7 +265,7 @@ rather than as a daemon.
@c man begin SEEALSO
ffmpeg(1), avplay(1), avprobe(1), the @file{ffmpeg/doc/avserver.conf}
avconv(1), avplay(1), avprobe(1), the @file{ffmpeg/doc/avserver.conf}
example and the Libav HTML documentation
@c man end

View File

@ -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)'

View File

@ -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

View File

@ -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(){

View File

@ -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

View File

@ -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

View File

@ -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
}