-
Notifications
You must be signed in to change notification settings - Fork 2
/
full-ffmpeg.sh
81 lines (70 loc) · 2.24 KB
/
full-ffmpeg.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
# Add multimedia source
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
# Become root
su -
# Install all dependencies we'll need
aptitude install \
-y \
libfaad-dev \
faad \
faac \
libfaac0 \
libfaac-dev \
libmp3lame-dev \
x264 \
libx264-dev \
libxvidcore-dev \
build-essential \
checkinstall
# Install all build dependencies for ffmpeg
apt-get build-dep ffmpeg
# Get the actual ffmpeg source code
apt-get source ffmpeg
# Go into the ffmpeg source directory
cd ffmpeg-*
# Configure it
./configure \
--enable-gpl \
--enable-nonfree \
--enable-libfaac \
--enable-libgsm \
--enable-libmp3lame \
--enable-libtheora \
--enable-libvorbis \
--enable-libx264 \
--enable-libxvid \
--enable-zlib \
--enable-postproc \
--enable-swscale \
--enable-pthreads \
--enable-x11grab \
--enable-libdc1394 \
--enable-version3 \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb
# a fix
mkdir -p /usr/local/share/ffmpeg
# Generate the debian package (*.deb)
checkinstall -D --install=no --pkgname=ffmpeg-full --autodoinst=yes -y
# if after this step you'll probably will get an error
# libavcodec/libx264.c:492: undefined reference to `x264_encoder_open_125'
# here's a solution:
cd ..
apt-get remove x264
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static --enable-shared
make && make install
ldconfig
cd .. && cd ffmpeg*
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/src/x264/libx264.a ./configure --enable-gpl --enable-nonfree --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb
make clean
checkinstall -D --install=no --pkgname=ffmpeg-full --autodoinst=yes -y
# install the package :)
dpkg -i ffmpeg-full_*-1_amd64.deb