Created
August 4, 2016 14:11
-
-
Save sserbest/f4fb5ead4897631f2338e7cd5b5b1cec to your computer and use it in GitHub Desktop.
How To Install FFmpeg on CentOS 6 in cPanel share env.
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
DOWNLOAD MODULES | |
cd /root | |
wget http://dl.fedoraproject.org/pub/epel...1.el6.i686.rpm | |
rpm -Uvh yasm-1.2.0-1.el6.i686.rpm | |
cd /usr/local/src | |
wget http://easynews.dl.sourceforge.net/s...-3.99.5.tar.gz | |
wget http://downloads.xiph.org/releases/o...g-1.3.1.tar.gz | |
wget http://downloads.xiph.org/releases/v...s-1.3.3.tar.gz | |
wget http://rubyforge.org/frs/download.ph...ool2-1.0.6.tgz | |
wget http://www.mplayerhq.hu/MPlayer/rele...071007.tar.bz2 | |
wget http://sourceforge.net/projects/ffmp....tbz2/download | |
EXTRACT MODULES | |
tar -zxvf lame-3.99.5.tar.gz | |
tar -zxvf libogg-1.3.1.tar.gz | |
tar -zxvf libvorbis-1.3.3.tar.gz | |
tar -zxvf flvtool2-1.0.6.tgz | |
tar -jxvf essential-20071007.tar.bz2 | |
tar -jxvf ffmpeg-php-0.6.0.tbz2 | |
mkdir /usr/local/lib/codecs/ | |
yum -y install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran subversion ncurses-devel -y | |
/scripts/installruby | |
DOWNLOAD FFMPEG and MPLAYER | |
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg | |
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer | |
cd /usr/local/src/mplayer | |
svn update | |
cd /usr/local/src/ | |
mv /usr/local/src/essential-20071007/* /usr/local/lib/codecs/ | |
chmod -R 755 /usr/local/lib/codecs/ | |
LAME | |
cd /usr/local/src/lame-3.99.5 | |
./configure | |
make && make install | |
LIBOGG | |
cd /usr/local/src/libogg-1.3.1 | |
./configure --enable-shared && make && make install | |
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig | |
export PKG_CONFIG_PATH | |
LIBVORBIS | |
cd /usr/local/src/libvorbis-1.3.3 | |
./configure && make && make install | |
FLVTOOL2 | |
cd /usr/local/src/flvtool2-1.0.6 | |
ruby setup.rb config | |
ruby setup.rb setup | |
ruby setup.rb install | |
MPLAYER | |
cd /usr/local/src/mplayer | |
./configure && make && make install | |
FFMPEG | |
cd /usr/local/src/ffmpeg/ | |
export TMPDIR=~/tmp-ffmpeg | |
mkdir $TMPDIR | |
./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared | |
make | |
make install | |
rm -rf $TMPDIR | |
export TMPDIR= | |
export LD_LIBRARY_PATH=/usr/local/lib/ | |
ln -s /usr/local/lib/libavformat.so.52.93.0 /usr/lib/libavformat.so.52 | |
ln -s /usr/local/lib/libavcodec.so.52.108.0 /usr/lib/libavcodec.so.52 | |
ln -s /usr/local/lib/libavutil.so.50.36.0 /usr/lib/libavutil.so.50 | |
ln -s /usr/local/lib/libmp3lame.so.0.0.0 /usr/lib/libmp3lame.so.0 | |
ln -s /usr/local/lib/libavformat.so.52.93.0.51 /usr/lib/libavformat.so.52 | |
FFMPEG-PHP | |
cd /usr/local/src/ffmpeg-php-0.6.0 | |
vi ffmpeg_frame.c | |
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32 | |
:wq | |
phpize | |
./configure | |
make | |
make install | |
Add this line to your php.ini (usually in /usr/local/lib/php.ini) if it is not already there: | |
extension="/usr/local/lib/php/extensions/no-debug-non-zts-20090626/ffmpeg.so" | |
RESTART APACHE | |
/scripts/restartsrv_httpd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment