Created
April 16, 2016 04:50
-
-
Save razzbee/fef9248ae8a7c5b7de466adeccefadd2 to your computer and use it in GitHub Desktop.
Compiling ffmpeg on centos the easy way
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
This gist gives an easy way to install ffmpeg the easy way, just copy and paste the commands below one by one , | |
we used this on http://playslack.com server for conversion .. hope it helps :D | |
#Create a dir to hold the sources ######## | |
mkdir /home/ffmpeg_sources | |
#########INSTALL REQUIRED TOOLS ########### | |
yum install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel | |
#################INSTALLING YASM ################### | |
git clone --depth 1 git://github.com/yasm/yasm.git | |
cd yasm | |
autoreconf -fiv | |
./configure --prefix="/ffmpeg_build" --bindir="$HOME/bin" | |
make | |
make install | |
make distclean | |
##################INSTALLING LIBX264 for H264 Mp4 Codec Support ########################## | |
cd /home/ffmpeg_sources | |
git clone --depth 1 git://git.videolan.org/x264 | |
cd x264 | |
PKG_CONFIG_PATH="/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/ffmpeg_build" --bindir="/usr/bin" --enable-static | |
make | |
make install | |
make distclean | |
##################INSTALLING LIBX265 for H265 Mp4 Codec Support ########################## | |
cd /home/ffmpeg_sources | |
hg clone https://bitbucket.org/multicoreware/x265 | |
cd /home/ffmpeg_sources/x265/build/linux | |
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source | |
make | |
make install | |
#############INSTALLING FDK AAC for AAC Support ################# | |
cd /home/ffmpeg_sources | |
git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac | |
cd fdk-aac | |
autoreconf -fiv | |
./configure --prefix="/ffmpeg_build" --disable-shared | |
make | |
make install | |
make distclean | |
###################INSTALLING LAME for mp3 Support ############# | |
cd /home/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="/ffmpeg_build" --bindir="/usr/bin" --disable-shared --enable-nasm | |
make | |
make install | |
make distclean | |
#################INSTALLING LIBOPUS################### | |
cd /home/ffmpeg_sources | |
git clone git://git.opus-codec.org/opus.git | |
cd opus | |
autoreconf -fiv | |
./configure --prefix="/ffmpeg_build" --disable-shared | |
make | |
make install | |
make distclean | |
####################INSTALLING LIBOGG################## | |
cd /home/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="/ffmpeg_build" --disable-shared | |
make | |
make install | |
make distclean | |
###############INSTALLING LIBVORBIS############### | |
cd /home/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 | |
LDFLAGS="-L/ffmeg_build/lib" CPPFLAGS="-I/ffmpeg_build/include" ./configure --prefix="/ffmpeg_build" --with-ogg="/ffmpeg_build" --disable-shared | |
make | |
make install | |
make distclean | |
###########INSTALLING WEBM LIBVPX########### | |
cd /home/ffmpeg_sources | |
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git | |
cd libvpx | |
./configure --prefix="/ffmpeg_build" --disable-examples | |
make | |
make install | |
make clean | |
##########INSTALLING FFMPEG ######## | |
cd /home/ffmpeg_sources | |
git clone http://source.ffmpeg.org/git/ffmpeg.git | |
cd ffmpeg | |
PKG_CONFIG_PATH="/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/ffmpeg_build" --extra-cflags="-I/ffmpeg_build/include" --extra-ldflags="-L/ffmpeg_build/lib" --bindir="/usr/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 | |
make install | |
make distclean | |
hash -r | |
#############FFMPEG INSTALLED ######### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment