Install ffmpeg on CentOS (RHEL/Fedora)
1 | mkdir ffmpeg_sources |
yasm
1
2
3
4
5
6wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar zxvf yasm-1.2.0.tar.gz
# ./configure
./configure --prefix=/opt/software/ffmpeg_sources/ffmpeg_build
#make && sudo make install
make && make installx264
1
2
3
4
5
6
7
8
9sudo echo "/opt/software/ffmpeg_sources/ffmpeg_build/lib" > /etc/ld.so.conf.d/ffmpeg.conf
sudo ldconfig
export PATH=$PATH:/opt/software/ffmpeg_sources/ffmpeg_build/bin
#git clone git://git.videolan.org/x264.git (old)
git clone https://git.videolan.org/git/x264.git
cd x264
./configure --prefix=/opt/software/ffmpeg_sources/ffmpeg_build --enable-static
make && make installlame
1
2
3
4curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar zxf lame-3.99.5.tar.gz
./configure --prefix=/opt/software/ffmpeg_sources/ffmpeg_build --enable-nasm
make && sudo make installogg
1
2
3
4
5wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
tar zxvf libogg-1.3.0.tar.gz
cd libogg-1.3.0
./configure --prefix=/opt/software/ffmpeg_sources/ffmpeg_build
make && make installlibvorbis
1
2
3
4
5curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
tar zxvf libvorbis-1.3.4.tar.gz
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/software/ffmpeg_sources/ffmpeg_build/lib/pkgconfig
./configure --prefix=/opt/software/ffmpeg_sources/ffmpeg_build --with-ogg
make && make installlibvpx
1
2
3
4
5
6
7git clone https://github.com/webmproject/libvpx.git #(need to set core.gitProxy)
cd libvpx/
./configure --prefix=/opt/software/ffmpeg_sources/ffmpeg_build
make && sudo make install
#sudo echo /usr/local/lib > /etc/ld.so.conf.d/local-libs.conf
sudo ldconfigxvidcore
1
2
3
4
5wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
tar zxf xvidcore-1.3.2.tar.gz
cd xvidcore/build/generic
./configure --prefix=/opt/software/ffmpeg_sources/ffmpeg_build
make && make installffmpeg
1
2
3
4
5
6
7#git clone git://git.videolan.org/ffmpeg.git (old)
git clone https://git.videolan.org/git/ffmpeg.git
cd ffmpeg
./configure --prefix=/opt/software/ffmpeg_sources/ffmpeg_build --enable-libmp3lame --enable-gpl --enable-libx264 --enable-libxvid --enable-postproc --enable-nonfree --enable-libvpx --enable-libvorbis --extra-cflags=-I/opt/software/ffmpeg_sources/ffmpeg_build/include --extra-ldflags=-L/opt/software/ffmpeg_sources/ffmpeg_build/lib ## no faac --enable-libfaac
make && make install
ffmpeg -headers "X-Forwarded-For: 160.53.186.194" -i http://stmw.rthk.hk/aod/_definst_/radio/archive/radio1/City_Snapshot/mp3/mp3:20150824.mp3/playlist.m3u8 -c copy City_Snapshot-20150824-.mp3the option “headers” must be put here for download this m3u8
Reference
https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
http://injustfiveminutes.com/2013/07/17/how-to-compile-latest-version-of-ffmpeg-on-centos-5/