Last active
May 25, 2016 01:02
-
-
Save StayerX/19d2f78712c4abeaebb9896319cf19bc to your computer and use it in GitHub Desktop.
Install full ffmpeg in debian wheezy (with aac(m4a) and x264 support)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add multimedia source | |
apt-get install software-properties-common | |
add-apt-repository "deb http://www.deb-multimedia.org `lsb_release --codename|cut -f2` main non-free" | |
grep -q -F 'deb-src http://www.deb-multimedia.org' /etc/apt/sources.list|| echo 'deb-src http://www.deb-multimedia.org sid main' >> foo.bar | |
apt-get update | |
apt-get install deb-multimedia-keyring # if this aborts, try again | |
apt-get update | |
apt-get upgrade | |
sudo apt-get install build-essential subversion git-core checkinstall automake | |
# Go to local source directory | |
cd /usr/local/src | |
# 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 \ | |
libgsm-tools \ | |
checkinstall | |
# Install all build dependencies for ffmpeg | |
apt-get build-dep ffmpeg-dmo | |
# Get the actual ffmpeg source code | |
apt-get source ffmpeg | |
# Go into the ffmpeg source directory | |
cd ffmpeg-* | |
sudo apt-get install libgsm1-dev | |
sudo apt-get install libdc1394-22-dev | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment