get_ffmpeg.sh 1.17 KB
Newer Older
1
#!/bin/sh
2

3
common="--enable-version3 --enable-gpl --enable-postproc --disable-muxers --disable-encoders --enable-libvorbis"
Jan Gerber's avatar
Jan Gerber committed
4
common="$common --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --disable-doc"
5

6
#optional, if you have those libs installed:
Jan Gerber's avatar
Jan Gerber committed
7
#extra="$extra --enable-libopencore-amrnb --enable-libopencore-amrwb"
8

Jan Gerber's avatar
Jan Gerber committed
9
10
#apt-get install liba52-dev libgsm1-dev
#extra="$extra  --enable-libgsm"
11

Jan Gerber's avatar
Jan Gerber committed
12
#optional, if you have libvpx installed:
Jan Gerber's avatar
Jan Gerber committed
13
#extra="$extra --enable-libvpx"
Jan Gerber's avatar
Jan Gerber committed
14

15
16
17
18
19
20
#linux
options="$common --enable-pthreads $extra"

#mingw32
uname | grep MINGW && options="$common --enable-memalign-hack --enable-mingw32 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib $extra"

21
# load FFMPEG specific properties
Jan Gerber's avatar
Jan Gerber committed
22
. ./ffmpegrev
23

Jan Gerber's avatar
Jan Gerber committed
24
test -e $FFMPEG_CO_DIR || git clone $FFMPEG_URL $FFMPEG_CO_DIR
25
26
cd $FFMPEG_CO_DIR
#git pull -r $FFMPEG_REVISION
Jan Gerber's avatar
Jan Gerber committed
27
git checkout release/0.7 
28
29
git pull
cd ..
30

31
apply_patches() {
32
  cd $FFMPEG_CO_DIR
33
34
35
36
37
38
39
  for patch in ../patches/*.patch; do
    patch -p0 < $patch
  done
  touch .ffmpeg2theora_patched
  cd ..
}

40
#test -e $FFMPEG_CO_DIR/.ffmpeg2theora_patched || apply_patches
41
#configure and build ffmpeg
42
cd $FFMPEG_CO_DIR && ./configure $options && make
43