7 FFMPEG/avformat options:
9 --avformat-svn - Obtain ffmpeg from Subversion
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
14 --avformat-swscale - Use ffmpeg libswcale instead of img_convert
44 export shared_ffmpeg=`which ffmpeg`
47 export avformat_suffix=
50 if [ "$shared_ffmpeg" != "" -a -f "$shared_ffmpeg" ]
53 shared_ffmpeg=`dirname $shared_ffmpeg`
55 shared_ffmpeg=`dirname $shared_ffmpeg`
61 --avformat-static=* ) static_ffmpeg="${i#--avformat-static=}" ;;
62 --avformat-shared=* ) shared_ffmpeg="${i#--avformat-shared=}" ;;
63 --avformat-ldextra=* ) extra_libs="${i#--avformat-ldextra=}" ;;
64 --avformat-svn ) svn_ffmpeg=true ;;
65 --avformat-cvs ) svn_ffmpeg=true ;;
66 --avformat-suffix=* ) avformat_suffix="${i#--avformat-suffix=}" ;;
67 --avformat-swscale ) swscale=true ;;
71 if [ "$svn_ffmpeg" != "" ]
73 [ ! -d "ffmpeg" ] && (
75 echo "Checking out ffmpeg/avformat - no password required"
77 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
79 enable_gpl=`[ "$gpl" = "true" ] && echo "--enable-gpl"`
80 if [ "$swscale" != "" ]
82 enable_swscale="--enable-swscaler"
83 echo "SWSCALE=1" >> config.mak
85 [ -d "ffmpeg" ] && ( cd ffmpeg ; ./configure $enable_gpl $enable_swscale )
86 #[ ! -f "ffmpeg/ffmpeg.patch" ] && ( cd ffmpeg ; cp ../ffmpeg.patch . ; patch -p0 < ffmpeg.patch )
87 echo "CFLAGS+=-I`pwd`/ffmpeg/libavformat -I`pwd`/ffmpeg/libavcodec -I`pwd`/ffmpeg/libavutil -I`pwd`/ffmpeg/libswscale" >> config.mak
88 echo "LDFLAGS+=-L`pwd`/ffmpeg/libavformat -L`pwd`/ffmpeg/libavcodec -L`pwd`/ffmpeg/libavutil -L`pwd`/ffmpeg/libswscale" >> config.mak
89 [ $targetos = "Darwin" ] &&
90 echo "LDFLAGS+=-single_module" >> config.mak
91 echo "LOCAL_FFMPEG=1" >> config.mak
92 extra_libs="$extra_libs -lz"
93 elif [ "$static_ffmpeg" != "" ]
95 if [ -d "$static_ffmpeg" ]
97 echo "CFLAGS+=-I$static_ffmpeg/libavformat -I$static_ffmpeg/libavcodec -I$static_ffmpeg/libavutil" >> config.mak
98 echo "LDFLAGS+=-L$static_ffmpeg/libavformat -L$static_ffmpeg/libavcodec -L$static_ffmpeg/libavutil" >> config.mak
99 [ $targetos = "Darwin" ] &&
100 echo "LDFLAGS+=-single_module" >> config.mak
101 if [ "$swscale" != "" ]
103 echo "CFLAGS+=-I$static_ffmpeg/libswscale" >> config.mak
104 echo "LDFLAGS+=-L$static_ffmpeg/libswscale" >> config.mak
105 echo "SWSCALE=1" >> config.mak
108 echo "avformat: Invalid path specified: $static_ffmpeg"
109 touch ../disable-avformat
113 if [ -d "$shared_ffmpeg/include/ffmpeg" -a -f "$shared_ffmpeg/$LIBDIR/libavformat$avformat_suffix$LIBSUF" ]
115 echo "CFLAGS+=-I$shared_ffmpeg/include/ffmpeg " >> config.mak
116 echo "LDFLAGS+=-L$shared_ffmpeg/$LIBDIR" >> config.mak
117 [ "$swscale" != "" ] && echo "SWSCALE=1" >> config.mak
119 echo "avformat: No build environment found. "
120 echo " Try configuring mlt with --avformat-svn."
121 touch ../disable-avformat
126 echo "EXTRA_LIBS=$extra_libs" >> config.mak
127 echo "AVFORMAT_SUFFIX=$avformat_suffix" >> config.mak
129 cat << EOF >> ../producers.dat
130 avformat libmltavformat$LIBSUF
133 cat << EOF >> ../filters.dat
134 avdeinterlace libmltavformat$LIBSUF
135 avresample libmltavformat$LIBSUF
136 avcolour_space libmltavformat$LIBSUF
139 cat << EOF >> ../consumers.dat
140 avformat libmltavformat$LIBSUF