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
43 export shared_ffmpeg=`which ffmpeg`
46 export avformat_suffix=
48 if [ "$shared_ffmpeg" != "" ]
51 shared_ffmpeg=`dirname $shared_ffmpeg`
53 shared_ffmpeg=`dirname $shared_ffmpeg`
59 --avformat-static=* ) static_ffmpeg="${i#--avformat-static=}" ;;
60 --avformat-shared=* ) shared_ffmpeg="${i#--avformat-shared=}" ;;
61 --avformat-ldextra=* ) extra_libs="${i#--avformat-ldextra=}" ;;
62 --avformat-cvs ) cvs_ffmpeg=true ;;
63 --avformat-suffix=* ) avformat_suffix="${i#--avformat-suffix=}" ;;
67 if [ "$cvs_ffmpeg" != "" ]
69 [ ! -d "ffmpeg" ] && (
71 echo "Checking out ffmpeg/avformat - no password required"
73 cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg login
74 cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
76 [ -d "ffmpeg" ] && ( cd ffmpeg ; ./configure --enable-shared --build-suffix="$avformat_suffix" )
77 #[ ! -f "ffmpeg/ffmpeg.patch" ] && ( cd ffmpeg ; cp ../ffmpeg.patch . ; patch -p0 < ffmpeg.patch )
78 echo "CFLAGS+=-I`pwd`/ffmpeg/libavformat -I`pwd`/ffmpeg/libavcodec -I`pwd`/ffmpeg/libavutil" >> config.mak
79 echo "LOCAL_FFMPEG=1" >> config.mak
80 extra_libs="$extra_libs -lz"
81 elif [ "$static_ffmpeg" != "" ]
83 if [ -d "$static_ffmpeg" ]
85 echo "CFLAGS+=-I$static_ffmpeg/libavformat -I$static_ffmpeg/libavcodec -I$static_ffmpeg/libavutil" >> config.mak
86 echo "LDFLAGS+=-L$static_ffmpeg/libavformat -L$static_ffmpeg/libavcodec -L$static_ffmpeg/libavutil" >> config.mak
87 [ $targetos = "Darwin" ] &&
88 echo "LDFLAGS+=-single_module" >> config.mak
90 echo "avformat: Invalid path specified: $static_ffmpeg"
91 touch ../disable-avformat
95 if [ -d "$shared_ffmpeg/include/ffmpeg" -a -f "$shared_ffmpeg/$LIBDIR/libavformat$LIBSUF" ]
97 echo "CFLAGS+=-I$shared_ffmpeg/include/ffmpeg " >> config.mak
98 echo "LDFLAGS+=-L$shared_ffmpeg/$LIBDIR" >> config.mak
100 echo "avformat: No build environment found. "
101 echo " Try configuring mlt with --avformat-cvs."
102 touch ../disable-avformat
107 echo "EXTRA_LIBS=$extra_libs" >> config.mak
108 echo "AVFORMAT_SUFFIX=$avformat_suffix" >> config.mak
110 cat << EOF >> ../producers.dat
111 avformat libmltavformat$LIBSUF
114 cat << EOF >> ../filters.dat
115 avdeinterlace libmltavformat$LIBSUF
116 avresample libmltavformat$LIBSUF
117 avcolour_space libmltavformat$LIBSUF
120 cat << EOF >> ../consumers.dat
121 avformat libmltavformat$LIBSUF