Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ffmpeg_install.sh
#!/bin/sh
sudo yum -y install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
mkdir /tmp
#Yasm
cd /tmp
git clone --depth 1 git://github.com/yasm/yasm.git
cd yasm
autoreconf -fiv
./configure --prefix="/usr/local/" --bindir="$HOME/bin"
make -j8
make install
make distclean
#libx264
cd /tmp
git clone --depth 1 git://git.videolan.org/x264
cd x264
PKG_CONFIG_PATH="/usr/local//lib/pkgconfig" ./configure --prefix="/usr/local/" --bindir="$HOME/bin" --enable-static
make -j8
make install
make distclean
#libx265
cd /tmp
hg clone https://bitbucket.org/multicoreware/x265
cd /tmp/x265/build/linux
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="/usr/local/" -DENABLE_SHARED:bool=off ../../source
make -j8
make install
#libfdk_aac
cd /tmp
git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac
cd fdk-aac
autoreconf -fiv
./configure --prefix="/usr/local/" --disable-shared
make -j8
make install
make distclean
#libmp3lame
cd /tmp
curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix="/usr/local/" --bindir="$HOME/bin" --disable-shared --enable-nasm
make -j8
make install
make distclean
#libopus
cd /tmp
git clone https://github.com/xiph/opus.git
cd opus
autoreconf -fiv
./configure --prefix="/usr/local/" --disable-shared
make -j8
make install
make distclean
#libogg
cd /tmp
curl -O http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz
tar xzvf libogg-1.3.2.tar.gz
cd libogg-1.3.2
./configure --prefix="/usr/local/" --disable-shared
make -j8
make install
make distclean
#libvorbis
cd /tmp
curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
tar xzvf libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
LDFLAGS="-L$HOME/ffmeg_build/lib" CPPFLAGS="-I/usr/local//include" ./configure --prefix="/usr/local/" --with-ogg="/usr/local/" --disable-shared
make -j8
make install
make distclean
#libvpx
cd /tmp
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
./configure --prefix="/usr/local/" --disable-examples
make -j8
make install
make clean
#FFmpeg
cd /tmp
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
PKG_CONFIG_PATH="/usr/local//lib/pkgconfig" ./configure --prefix="/usr/local/" --extra-cflags="-I/usr/local//include" --extra-ldflags="-L/usr/local//lib" --bindir="$HOME/bin" --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
make -j8
make install
make distclean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.