Skip to content

Instantly share code, notes, and snippets.

@vuhung3990
Created March 31, 2015 07:12
Show Gist options
  • Save vuhung3990/74a8ab90152c11a6333e to your computer and use it in GitHub Desktop.
Save vuhung3990/74a8ab90152c11a6333e to your computer and use it in GitHub Desktop.
Install ffmpeg ( tested on centos 7 | 2015-3-31)
# install Dependencies
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel&&mkdir ~/ffmpeg_sources
# Yasm
cd ~/ffmpeg_sources&&git clone --depth 1 git://github.com/yasm/yasm.git&&cd yasm&&autoreconf -fiv&&./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"&&make&&make install&&make distclean
# libx264
cd ~/ffmpeg_sources&&git clone --depth 1 git://git.videolan.org/x264&&cd x264&&./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static&&make&&make install&&make distclean
# libfdk_aac
cd ~/ffmpeg_sources&&git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac&&cd fdk-aac&&autoreconf -fiv&&./configure --prefix="$HOME/ffmpeg_build" --disable-shared&&make&&make install&&make distclean
# libmp3lame
cd ~/ffmpeg_sources&&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="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm&&make&&make install&&make distclean
# libopus
cd ~/ffmpeg_sources&&git clone git://git.opus-codec.org/opus.git&&cd opus&&autoreconf -fiv&&./configure --prefix="$HOME/ffmpeg_build" --disable-shared&&make&&make install&&make distclean
# libogg
cd ~/ffmpeg_sources&&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="$HOME/ffmpeg_build" --disable-shared&&make&&make install&&make distclean
# libvorbis
cd ~/ffmpeg_sources&&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&&./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared&&make&&make install&&make distclean
# libvpx
cd ~/ffmpeg_sources&&git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git&&cd libvpx&&./configure --prefix="$HOME/ffmpeg_build" --disable-examples&&make&&make install&&make clean
# FFmpeg
cd ~/ffmpeg_sources&&git clone --depth 1 git://source.ffmpeg.org/ffmpeg&&cd ffmpeg&&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" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264&&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