Created
June 21, 2014 23:53
-
-
Save lelandbatey/ef1587051de692927f5c to your computer and use it in GitHub Desktop.
Auto-compile ffmpeg
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
#!/bin/bash | |
# Auto-compiles and installs ffmpeg, as per the official instruction: | |
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu | |
# | |
# Only up to date as of June 21st, 2014 | |
sudo apt-get update | |
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \ | |
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev \ | |
libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev | |
mkdir ~/ffmpeg_sources | |
sudo apt-get install yasm | |
cd ~ | |
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 | |
PATH="$PATH:$HOME/bin" make | |
make install | |
make distclean | |
cd ~ | |
sudo apt-get install unzip | |
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 | |
cd ~ | |
sudo apt-get install libmp3lame-dev | |
sudo apt-get install libopus-dev | |
cd ~ | |
cd ~/ffmpeg_sources | |
wget http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2 | |
tar xjvf libvpx-v1.3.0.tar.bz2 | |
cd libvpx-v1.3.0 | |
./configure --prefix="$HOME/ffmpeg_build" --disable-examples | |
make | |
make install | |
make clean | |
cd ~ | |
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" \ | |
--extra-libs="-ldl" \ | |
--enable-gpl \ | |
--enable-libass \ | |
--enable-libfdk-aac \ | |
--enable-libfreetype \ | |
--enable-libmp3lame \ | |
--enable-libopus \ | |
--enable-libtheora \ | |
--enable-libvorbis \ | |
--enable-libvpx \ | |
--enable-libx264 \ | |
--enable-nonfree \ | |
--enable-x11grab | |
PATH="$PATH:$HOME/bin" make | |
make install | |
make distclean | |
hash -r | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment