Created
August 24, 2015 19:26
-
-
Save ohanetz/73b38b87201ef06fb14d to your computer and use it in GitHub Desktop.
This script will install ffmpeg with all its dependencies on Ubuntu 14.04 server machine
This file contains hidden or 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 | |
## Preparing Environment - this can be altered to match your installation ## | |
# Folder to store ffmpeg and dependency libraries sources in the process: | |
FFMPEG_SRC=~/ffmpeg | |
# Folder to install ffmpeg binary into: | |
FFMPEG_BIN=$HOME/bin | |
## Install dependencies and packages that can be installed by apt-get ## | |
sudo apt-get update | |
sudo apt-get -y --force-yes 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 texi2html zlib1g-dev \ | |
yasm libx264-dev libmp3lame-dev libopus-dev | |
## Install libx265-dev ## | |
sudo apt-get install cmake mercurial | |
cd $FFMPEG_SRC | |
hg clone https://bitbucket.org/multicoreware/x265 | |
cd $FFMPEG_SRC/x265/build/linux | |
PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source | |
make | |
make install | |
make distclean | |
## Install libfdk-aac ## | |
cd $FFMPEG_SRC | |
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="$HOME/ffmpeg_build" --disable-shared | |
make | |
make install | |
make distclean | |
## Install libvpx ## | |
cd $FFMPEG_SRC | |
wget http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-1.4.0.tar.bz2 | |
tar xjvf libvpx-1.4.0.tar.bz2 | |
cd libvpx-1.4.0 | |
PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests | |
PATH="$HOME/bin:$PATH" make | |
make install | |
make clean | |
## Install ffmpeg ## | |
cd $FFMPEG_SRC | |
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 | |
tar xjvf ffmpeg-snapshot.tar.bz2 | |
cd ffmpeg | |
PATH="$FFMPEG_BIN:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \ | |
--prefix="$HOME/ffmpeg_build" \ | |
--pkg-config-flags="--static" \ | |
--extra-cflags="-I$HOME/ffmpeg_build/include" \ | |
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \ | |
--bindir="$FFMPEG_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="$FFMPEG_BIN:$PATH" 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