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
13 --avformat-suffix=suff - Specify a custom suffix for an ffmpeg shared build
33 export shared_ffmpeg=`which ffmpeg`
36 export avformat_suffix=
38 if [ "$shared_ffmpeg" != "" ]
41 shared_ffmpeg=`dirname $shared_ffmpeg`
43 shared_ffmpeg=`dirname $shared_ffmpeg`
49 --avformat-static=* ) static_ffmpeg="${i#--avformat-static=}" ;;
50 --avformat-shared=* ) shared_ffmpeg="${i#--avformat-shared=}" ;;
51 --avformat-ldextra=* ) extra_libs="${i#--avformat-ldextra=}" ;;
52 --avformat-cvs ) cvs_ffmpeg=true ;;
53 --avformat-suffix=* ) avformat_suffix="${i#--avformat-suffix=}" ;;
57 if [ "$cvs_ffmpeg" != "" ]
59 [ ! -d "ffmpeg" ] && (
61 echo "Checking out ffmpeg/avformat - no password required"
63 cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg login
64 cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
66 [ -d "ffmpeg" ] && ( cd ffmpeg ; ./configure --enable-shared --build-suffix="$avformat_suffix" )
67 #[ ! -f "ffmpeg/ffmpeg.patch" ] && ( cd ffmpeg ; cp ../ffmpeg.patch . ; patch -p0 < ffmpeg.patch )
68 echo "CFLAGS+=-I`pwd`/ffmpeg/libavformat -I`pwd`/ffmpeg/libavcodec -I`pwd`/ffmpeg/libavutil" >> config.mak
69 echo "LOCAL_FFMPEG=1" >> config.mak
70 extra_libs="$extra_libs -lz"
71 elif [ "$static_ffmpeg" != "" ]
73 if [ -d "$static_ffmpeg" ]
75 echo "CFLAGS+=-I$static_ffmpeg/libavformat -I$static_ffmpeg/libavcodec -I$static_ffmpeg/libavutil" >> config.mak
76 echo "LDFLAGS+=-L$static_ffmpeg/libavformat -L$static_ffmpeg/libavcodec -L$static_ffmpeg/libavutil" >> config.mak
77 [ $targetos = "Darwin" ] &&
78 echo "LDFLAGS+=-single_module" >> config.mak
80 echo "avformat: Invalid path specified: $static_ffmpeg"
81 touch ../disable-avformat
85 if [ -d "$shared_ffmpeg/include/ffmpeg" -a -f "$shared_ffmpeg/lib/libavformat$LIBSUF" ]
87 echo "CFLAGS+=-I$shared_ffmpeg/include/ffmpeg " >> config.mak
88 echo "LDFLAGS+=-L$shared_ffmpeg/lib" >> config.mak
90 echo "avformat: No build environment found. "
91 echo " Try configuring mlt with --avformat-cvs."
92 touch ../disable-avformat
97 echo "EXTRA_LIBS=$extra_libs" >> config.mak
98 echo "AVFORMAT_SUFFIX=$avformat_suffix" >> config.mak
100 cat << EOF >> ../producers.dat
101 avformat libmltavformat$LIBSUF
104 cat << EOF >> ../filters.dat
105 avdeinterlace libmltavformat$LIBSUF
106 avresample libmltavformat$LIBSUF
107 avcolour_space libmltavformat$LIBSUF
110 cat << EOF >> ../consumers.dat
111 avformat libmltavformat$LIBSUF