7 FFMPEG/avformat options:
9 --avformat-cvs - Obtain ffmpeg from CVS
10 --avformat-shared=path - Link against a shared installation of ffmpeg (default)
11 --avformat-static=path - Link against a static ffmpeg dev tree
12 --avformat-ldextra=libs - Provide additional libs to link with
32 export shared_ffmpeg=`whereis ffmpeg | cut -f 2 -d' '`
35 export avformat_suffix=
37 if [ "$shared_ffmpeg" != "" ]
40 shared_ffmpeg=`dirname $shared_ffmpeg`
42 shared_ffmpeg=`dirname $shared_ffmpeg`
48 --avformat-static=* ) static_ffmpeg="${i#--avformat-static=}" ;;
49 --avformat-shared=* ) shared_ffmpeg="${i#--avformat-shared=}" ;;
50 --avformat-ldextra=* ) extra_libs="${i#--avformat-ldextra=}" ;;
51 --avformat-cvs ) cvs_ffmpeg=true ;;
52 --avformat-suffix=* ) avformat_suffix="${i#--avformat-suffix=}" ;;
56 if [ "$cvs_ffmpeg" != "" ]
58 [ ! -d "ffmpeg" ] && (
60 echo "Checking out ffmpeg/avformat - no password required"
62 cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg login
63 cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
65 [ -d "ffmpeg" ] && ( cd ffmpeg ; ./configure --enable-shared --build-suffix="$avformat_suffix" )
66 #[ ! -f "ffmpeg/ffmpeg.patch" ] && ( cd ffmpeg ; cp ../ffmpeg.patch . ; patch -p0 < ffmpeg.patch )
67 echo "CFLAGS+=-I`pwd`/ffmpeg/libavformat -I`pwd`/ffmpeg/libavcodec" >> config.mak
68 echo "LOCAL_FFMPEG=1" >> config.mak
69 extra_libs="$extra_libs -lz"
70 elif [ "$static_ffmpeg" != "" ]
72 if [ -d "$static_ffmpeg" ]
74 echo "CFLAGS+=-I$static_ffmpeg/libavformat -I$static_ffmpeg/libavcodec" >> config.mak
75 echo "LDFLAGS+=-L$static_ffmpeg/libavformat -L$static_ffmpeg/libavcodec" >> config.mak
76 [ $targetos = "Darwin" ] &&
77 echo "LDFLAGS+=-single_module" >> config.mak
79 echo "avformat: Invalid path specified: $static_ffmpeg"
80 touch ../disable-avformat
84 if [ -d "$shared_ffmpeg/include/ffmpeg" -a -f "$shared_ffmpeg/lib/libavformat.so" ]
86 echo "CFLAGS+=-I$shared_ffmpeg/include/ffmpeg " >> config.mak
87 echo "LDFLAGS+=-L$shared_ffmpeg/lib" >> config.mak
89 echo "avformat: No build environment found. "
90 echo " Try configuring mlt with --avformat-cvs."
91 touch ../disable-avformat
96 echo "EXTRA_LIBS=$extra_libs" >> config.mak
97 echo "AVFORMAT_SUFFIX=$avformat_suffix" >> config.mak
99 cat << EOF >> ../producers.dat
100 avformat libmltavformat$LIBSUF
103 cat << EOF >> ../filters.dat
104 avdeinterlace libmltavformat$LIBSUF
105 avresample libmltavformat$LIBSUF
106 avcolour_space libmltavformat$LIBSUF
109 cat << EOF >> ../consumers.dat
110 avformat libmltavformat$LIBSUF