Created
November 2, 2016 14:36
-
-
Save 29821632/69ce970494d57d667e9946a0f5bce949 to your computer and use it in GitHub Desktop.
Updated ffmpeg build script for EL-based distros
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 | |
| # source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide | |
| FFBUILDROOT='/usr/local/src/ffmpeg_build' | |
| FFSOURCEROOT='/usr/local/src/ffmpeg_sources' | |
| BINDIR='/usr/local/bin' | |
| yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel | |
| mkdir "$FFSOURCEROOT" | |
| cd "$FFSOURCEROOT" | |
| curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | |
| tar xzvf yasm-1.2.0.tar.gz | |
| cd yasm-1.2.0 | |
| ./configure --prefix="$FFBUILDROOT" --bindir="$BINDIR" | |
| make | |
| make install | |
| make distclean | |
| . ~/.bash_profile | |
| cd "$FFSOURCEROOT" | |
| git clone --depth 1 git://git.videolan.org/x264 | |
| cd x264 | |
| ./configure --prefix="$FFBUILDROOT" --bindir="$BINDIR" --enable-static | |
| make | |
| make install | |
| make distclean | |
| cd "$FFSOURCEROOT" | |
| git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git | |
| cd fdk-aac | |
| autoreconf -fiv | |
| ./configure --prefix="$FFBUILDROOT" --disable-shared | |
| make | |
| make install | |
| make distclean | |
| cd "$FFSOURCEROOT" | |
| 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="$FFBUILDROOT" --bindir="$BINDIR" --disable-shared --enable-nasm | |
| make | |
| make install | |
| make distclean | |
| cd "$FFSOURCEROOT" | |
| curl -O http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz | |
| tar xzvf opus-1.0.3.tar.gz | |
| cd opus-1.0.3 | |
| ./configure --prefix="$FFBUILDROOT" --disable-shared | |
| make | |
| make install | |
| make distclean | |
| cd "$FFSOURCEROOT" | |
| curl -O http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz | |
| tar xzvf libogg-1.3.1.tar.gz | |
| cd libogg-1.3.1 | |
| ./configure --prefix="$FFBUILDROOT" --disable-shared | |
| make | |
| make install | |
| make distclean | |
| cd "$FFSOURCEROOT" | |
| curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz | |
| tar xzvf libvorbis-1.3.3.tar.gz | |
| cd libvorbis-1.3.3 | |
| ./configure --prefix="$FFBUILDROOT" --with-ogg="$FFBUILDROOT" --disable-shared | |
| make | |
| make install | |
| make distclean | |
| cd "$FFSOURCEROOT" | |
| git clone --depth 1 https://chromium.googlesource.com/webm/libvpx | |
| cd libvpx | |
| ./configure --prefix="$FFBUILDROOT" --disable-examples | |
| make | |
| make install | |
| make clean | |
| cd "$FFSOURCEROOT" | |
| curl -O http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz | |
| tar xzvf libtheora-1.1.1.tar.gz | |
| cd libtheora-1.1.1 | |
| ./configure --prefix="$FFBUILDROOT" --with-ogg="$FFBUILDROOT" --disable-examples --disable-shared --disable-sdltest --disable-vorbistest | |
| make | |
| make install | |
| make distclean | |
| yum -y install freetype-devel speex-devel | |
| cd "$FFSOURCEROOT" | |
| git clone --depth 1 git://source.ffmpeg.org/ffmpeg | |
| cd ffmpeg | |
| PKG_CONFIG_PATH="$FFBUILDROOT/lib/pkgconfig" | |
| export PKG_CONFIG_PATH | |
| ./configure --prefix="$FFBUILDROOT" --extra-cflags="-I$FFBUILDROOT/include" --extra-ldflags="-L$FFBUILDROOT/lib" --bindir="$BINDIR" --extra-libs="-ldl" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libfreetype --enable-libspeex --enable-libtheora | |
| make | |
| make install | |
| make distclean | |
| hash -r | |
| . ~/.bash_profile | |
| cd "$FFSOURCEROOT/ffmpeg/tools" | |
| make qt-faststart | |
| cp qt-faststart /usr/bin | |
| ldconfig | |
| cd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment