Skip to content

Instantly share code, notes, and snippets.

@gautiermichelin
Last active September 10, 2016 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gautiermichelin/977f08ab7dd0277ebbf4e1e4522ff612 to your computer and use it in GitHub Desktop.
Save gautiermichelin/977f08ab7dd0277ebbf4e1e4522ff612 to your computer and use it in GitHub Desktop.
# Remove any trace of Debian Multimedia in /etc/apt/sources.list
apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \
libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev yasm libx264-dev
mkdir ~/ffmpeg_sources
mkdir /usr/local/ffmpeg_build
cd ~/ffmpeg_sources
#x265
apt-get install cmake mercurial
cd ~/ffmpeg_sources
hg clone https://bitbucket.org/multicoreware/x265
cd ~/ffmpeg_sources/x265/build/linux
PATH="/usr/local/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="/usr/local/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make
make install
make distclean
#libfdk-aac
cd ~/ffmpeg_sources
wget -O fdk-aac.tar.gz https://github.com/mstorsjo/fdk-aac/tarball/master
tar xzvf fdk-aac.tar.gz
cd mstorsjo-fdk-aac*
autoreconf -fiv
./configure --prefix="/usr/local/ffmpeg_build" --disable-shared
make
make install
make distclean
#libmp3lame
apt-get install libmp3lame-dev
#libopus
apt-get install libopus-dev
#libvpx
cd ~/ffmpeg_sources
wget http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-1.5.0.tar.bz2
tar xjvf libvpx-1.5.0.tar.bz2
cd libvpx-1.5.0
PATH="/usr/local/bin:$PATH" ./configure --prefix="/usr/local/ffmpeg_build" --disable-examples --disable-unit-tests
PATH="/usr/local/bin:$PATH" make
make install
make clean
#ffmpeg
cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="/usr/local/bin:$PATH" PKG_CONFIG_PATH="/usr/local/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/usr/local/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I/usr/local/ffmpeg_build/include" --extra-ldflags="-L/usr/local/ffmpeg_build/lib" --bindir="/usr/local/bin" --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
PATH="/usr/local/bin:$PATH" make
make install
make distclean
hash -r
@gautiermichelin
Copy link
Author

gautiermichelin commented Sep 10, 2016

To use :

cd ~
wget https://gist.githubusercontent.com/gautiermichelin/977f08ab7dd0277ebbf4e1e4522ff612/raw/e6a81afe46b18788d281bc67e19d5625dbd5e8b5/install_ffmpeg.sh
chmod +x install_ffmpeg.sh
./install_ffmpeg.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment