-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathffmpeg-ubuntu-compile.sh
59 lines (53 loc) · 1.55 KB
/
ffmpeg-ubuntu-compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# FFmpeg compilation instructions from:
# http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
# Prepare to compile FFmpeg
mkdir -p ~/ffmpeg_sources
mkdir -p ~/ffmpeg_build
mkdir -p ~/bin
# libx264
cd ~/ffmpeg_sources
wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar xjvf last_x264.tar.bz2
cd x264-snapshot*
PATH="$PATH:$HOME/bin" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static --disable-opencl
PATH="$PATH:$HOME/bin" make
make install
make distclean
# libfdk-aac
cd ~/ffmpeg_sources
wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master
unzip fdk-aac.zip
cd mstorsjo-fdk-aac*
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
make distclean
# Compile FFmpeg
cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$PATH:$HOME/bin" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libmp3lame \
--enable-libx264 \
--enable-nonfree
PATH="$PATH:$HOME/bin" make
make install
make distclean
hash -r
# ffmpeg-light
cd
cabal get ffmpeg-light
cd ffmpeg-light*
cabal install --dependencies-only
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" cabal configure --disable-shared -fBuildDemo
cabal build demo
echo 'Now you should be able to "cabal run demo"'