7 FFMPEG/avformat options:
9 --avformat-svn - Obtain ffmpeg from Subversion
10 --avformat-svn-extra - Add extra configure options for --avformat-svn
11 --avformat-shared=path - Link against a shared installation of ffmpeg (default)
12 --avformat-static=path - Link against a static ffmpeg dev tree
13 --avformat-ldextra=libs - Provide additional libs to link with
14 --avformat-suffix=suff - Specify a custom suffix for an ffmpeg shared build
15 --avformat-swscale - Use ffmpeg libswcale instead of img_convert
35 [ -d /usr/lib/lib64 ] && export LIBDIR=lib64 || export LIBDIR=lib
45 export shared_ffmpeg=$(pkg-config --variable=prefix libavformat)
48 export svn_ffmpeg_extra=
49 export avformat_suffix=
55 --avformat-static=* ) static_ffmpeg="${i#--avformat-static=}" ;;
56 --avformat-shared=* ) shared_ffmpeg="${i#--avformat-shared=}" ;;
57 --avformat-ldextra=* ) extra_libs="${i#--avformat-ldextra=}" ;;
58 --avformat-svn ) svn_ffmpeg=true ;;
59 --avformat-svn-extra=* ) svn_ffmpeg_extra="${i#--avformat-svn-extra=}" ;;
60 --avformat-cvs ) svn_ffmpeg=true ;;
61 --avformat-suffix=* ) avformat_suffix="${i#--avformat-suffix=}" ;;
62 --avformat-swscale ) swscale=true ;;
63 --avformat-swscaler ) swscale=true ;;
67 if [ "$svn_ffmpeg" != "" ]
69 if [ "$gpl" = "true" ]
71 enable_gpl="--enable-gpl"
72 if [ "$swscale" != "" ]
74 enable_swscale="--enable-swscaler"
75 echo "SWSCALE=1" >> config.mak
77 elif [ "$swscale" != "" ]
80 echo "ERROR ERROR ERROR ERROR ERROR ERROR"
81 echo "--enable-gpl is required to use --avformat-swscale with --avformat-svn!"
88 echo "Checking out ffmpeg/avformat - no password required"
90 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
92 [ -d "ffmpeg" ] && ( cd ffmpeg ; ./configure $enable_gpl $enable_swscale $svn_ffmpeg_extra )
93 #[ ! -f "ffmpeg/ffmpeg.patch" ] && ( cd ffmpeg ; cp ../ffmpeg.patch . ; patch -p0 < ffmpeg.patch )
94 echo "CFLAGS+=-I`pwd`/ffmpeg/libavformat -I`pwd`/ffmpeg/libavcodec -I`pwd`/ffmpeg/libavutil -I`pwd`/ffmpeg/libavdevice -I`pwd`/ffmpeg/libswscale" >> config.mak
95 echo "LDFLAGS+=-L`pwd`/ffmpeg/libavformat -L`pwd`/ffmpeg/libavcodec -L`pwd`/ffmpeg/libavutil -L`pwd`/ffmpeg/libavdevice -L`pwd`/ffmpeg/libswscale" >> config.mak
96 [ $targetos = "Darwin" ] &&
97 echo "LDFLAGS+=-single_module" >> config.mak
98 echo "LOCAL_FFMPEG=1" >> config.mak
99 extra_libs="$extra_libs -lz"
100 elif [ "$static_ffmpeg" != "" ]
102 if [ -d "$static_ffmpeg" ]
104 echo "CFLAGS+=-I$static_ffmpeg/libavformat -I$static_ffmpeg/libavcodec -I$static_ffmpeg/libavutil -I$static_ffmpeg/libavdevice" >> config.mak
105 echo "LDFLAGS+=-L$static_ffmpeg/libavformat -L$static_ffmpeg/libavcodec -L$static_ffmpeg/libavutil -L$static_ffmpeg/libavdevice" >> config.mak
106 [ $targetos = "Darwin" ] &&
107 echo "LDFLAGS+=-single_module" >> config.mak
108 if [ "$swscale" != "" ]
110 echo "CFLAGS+=-I$static_ffmpeg/libswscale" >> config.mak
111 echo "LDFLAGS+=-L$static_ffmpeg/libswscale" >> config.mak
112 echo "SWSCALE=1" >> config.mak
115 echo "avformat: Invalid path specified: $static_ffmpeg"
116 touch ../disable-avformat
119 elif [ "$shared_ffmpeg" != "" ]
121 echo "CFLAGS+=$(pkg-config --cflags libavformat)" >> config.mak
122 echo "LDFLAGS+=$(pkg-config --libs libavformat)" >> config.mak
123 [ "$swscale" != "" ] && echo "SWSCALE=1" >> config.mak
125 echo "avformat: No build environment found. "
126 echo " Try configuring mlt with --avformat-svn."
127 touch ../disable-avformat
131 echo "EXTRA_LIBS=$extra_libs" >> config.mak
132 echo "AVFORMAT_SUFFIX=$avformat_suffix" >> config.mak