-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·143 lines (115 loc) · 3.03 KB
/
build.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/bin/bash
# https://github.com/ampervue/docker-aws-eb-ffmpeg
# Fetch Sources
cd /usr/local/src
echo ""
echo ""
echo "====> PYTHON27-FFMPEG: Downloading source"
git clone --depth 1 https://github.com/l-smash/l-smash
git clone --depth 1 git://git.videolan.org/x264.git
hg clone https://bitbucket.org/multicoreware/x265
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
git clone --depth 1 git://git.opus-codec.org/opus.git
git clone --depth 1 https://github.com/mulx/aacgain.git
curl -Os http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz
tar xzvf yasm-${YASM_VERSION}.tar.gz
echo ""
echo ""
echo "====> PYTHON27-FFMPEG: Done downloading source"
ls -la /usr/local/src/
# Build YASM
echo ""
echo ""
echo "====> PYTHON27-FFMPEG: Compiling YASM"
cd /usr/local/src/yasm-${YASM_VERSION}
./configure
make -j 8
make install
# Build L-SMASH
echo ""
echo ""
echo "====> PYTHON27-FFMPEG: Compiling L-SMASH"
cd /usr/local/src/l-smash
./configure
make -j 8
make install
# Build libx264
echo ""
echo ""
echo "====> PYTHON27-FFMPEG: Compiling LIBX264"
cd /usr/local/src/x264
./configure --enable-static
make -j 8
make install
# Build libx265
echo ""
echo ""
echo "====> PYTHON27-FFMPEG: Compiling LIBX265"
cd /usr/local/src/x265/build/linux
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../../source
make -j 8
make install
# Build libfdk-aac
echo ""
echo ""
echo "====> PYTHON27-FFMPEG: Compiling LIBFDK-ACC"
cd /usr/local/src/fdk-aac
autoreconf -fiv
./configure --disable-shared
make -j 8
make install
# Build libvpx
echo ""
echo ""
echo "====> PYTHON27-FFMPEG: Compiling LIBVPX"
cd /usr/local/src/libvpx
./configure --disable-examples
make -j 8
make install
# Build libopus
echo ""
echo ""
echo "====> PYTHON27-FFMPEG: Compiling LIBOPUS"
cd /usr/local/src/opus
./autogen.sh
./configure --disable-shared
make -j 8
make install
# Build ffmpeg.
echo ""
echo ""
echo "======================================="
echo "====> PYTHON27-FFMPEG: Compiling FFMPEG"
echo "======================================="
cd /usr/local/src/ffmpeg
./configure --extra-libs="-ldl" \
--enable-gpl \
--enable-libass \
--enable-libfaac \
--enable-libfdk-aac \
--enable-libfontconfig \
--enable-libfreetype \
--enable-libfribidi \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-nonfree
make -j 8
make install
echo ""
echo "======================================="
# Build aacgain
cd /usr/local/src/aacgain/mp4v2
./configure && make -k -j 8 # some commands fail but build succeeds
cd /usr/local/src/aacgain/faad2
./configure && make -k -j 8 # some commands fail but build succeeds
cd /usr/local/src/aacgain
./configure && make -j 8 && make install
# Remove all tmpfile
rm -rf /usr/local/src