How To Install Ffmpeg, Mplayer, Mencoder, Flvtool2, Yamdi, X264 On Centos

前端之家收集整理的这篇文章主要介绍了How To Install Ffmpeg, Mplayer, Mencoder, Flvtool2, Yamdi, X264 On Centos前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
How To Install Ffmpeg,Mplayer,Mencoder,Flvtool2,Yamdi,X264 On Centos
Published On 02 Aug,2010 11:02 AM by jhonka in FFMpeg,
This installation are full and complete installation for latest release of ffmpeg/ mplayer /x264 and other module on 28-12-2009 and tested working on Centos 5.3 x86_64 or rhel server,below installation work for major media script.

Edit the /etc/ld.so.conf file and add the following lines
vi /etc/ld.so.conf
/usr/local/lib
/usr/lib
then run : ldconfig
Installing libraries
add rpmforge or dag repos for yum :
RHEL5 / CentOS-5
for i386:
wget http://packages.sw.be/rpmforge-r ... 1-1.el5.rf.i386.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm
for x86_64:
wget http://packages.sw.be/rpmforge-r ... 1.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
for PPC:
wget http://packages.sw.be/rpmforge-r ... .1-1.el5.rf.ppc.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.ppc.rpm
Run the below command
yum install zlib-devel automake autoconf gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran gcc-c++ mesa-libGL-devel mesa-libGLU-devel libXi-devel libXmu-devel freeglut-devel freeglut libtool ncurses-devel
install yasm 0.8.0
cd /usr/local/src
wget http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz
tar zxvf yasm-0.8.0.tar.gz
cd yasm-0.8.0
./configure
make && make install
Installing opencore-amr
cd ..
wget http://sourceforge.net/projects/ ... 1.2.tar.gz/download
tar zxvf opencore-amr-0.1.2.tar.gz
cd opencore-amr-0.1.2
./configure && make && make install
Installing libraw1394
wget http://www.kernel.org/pub/linux/ ... aw1394-1.3.0.tar.gz
tar zxfv libraw1394-1.3.0.tar.gz
cd libraw1394-1.3.0
make dev
Installing libdc1394
This project requires libraw1394,you must build it first.
wget http://sourceforge.net/projects/ ... 2.2.tar.gz/download
wget tar zxvf libdc1394-1.2.2.tar.gz
tar zxvf libdc1394-2.1.2.tar.gz
cd libdc1394-1.2.2
cd ../libdc1394-2.1.2
Installing FAAD2
wget
http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz
tar zxf faad2-2.6.1.tar.gz
cd faad2
autoreconf -vif
Installing FAAC
wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz
tar zxfv faac-1.26.tar.gz
cd faac
./bootstrap
./configure --disable-mp4v2
Installing libmp3lame
wget http://sourceforge.net/projects/ ... 8-2.tar.gz/download
tar zxvf lame-398-2.tar.gz
cd lame-398-2
Installing OpenJPEG
wget http://openjpeg.googlecode.com/files/openjpeg_v1_3.tar.gz
tar zxvf openjpeg_v1_3.tar.gz
cd OpenJPEG_v1_3
Installing libogg
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.4.tar.gz
tar zvxf libogg-1.1.4.tar.gz
cd libogg-1.1.4
Installing libvorbis
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.3.tar.gz
tar zvxf libvorbis-1.2.3.tar.gz
cd libvorbis-1.2.3
Installing vorbistool
wget http://downloads.xiph.org/releas ... -tools-1.2.0.tar.gz
tar zvxf vorbis-tools-1.2.0.tar.gz
cd vorbis-tools-1.2.0
Installing libtheora
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
tar jvxf libtheora-1.1.1.tar.bz2
cd libtheora-1.1.1
Installing libspeex
wget http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz
tar zvxf speex-1.2rc1.tar.gz
cd speex-1.2rc1
Installing Xvid
wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
tar zvxf xvidcore-1.2.2.tar.gz
cd xvidcore/build/generic
Installing gpac & MP4Box
wget http://downloads.sourceforge.net/gpac/gpac-0.4.5.tar.gz
wget http://downloads.sourceforge.net ... a_libs-0.4.5.tar.gz
tar zxvf gpac-0.4.5.tar.gz
tar zxvf gpac_extra_libs-0.4.5.tar.gz
cdgpac
cp -r ../gpac_extra_libs/* extra_lib/
chmod +x configure
make lib
make apps
make install-lib
make install
cp bin/gcc/libgpac.so /usr/lib
Installing latest x264
Make sure you installed yasm 0.7.0 or higher,and installed gi.
Well Git is getting more popular these days. If you need to build ffmpeg in a pinch you might need it.
Steps to getting GIT 1.6.4 is latest as of this writing
wget http://kernel.org/pub/software/scm/git/git-1.6.4.tar.gz
tar -xvzf git-1.6.4.tar.gz
cdgit-1.6.4
make
whereis git
git: /usr/local/bin/git
Installing x264
git clone git://git.videolan.org/x264.git
cd x264
./configure--enable-pthread --enable-mp4-output --enable-shared
Installing flvtool2 & yamdi
You need ruby to be installed before installing flvtool2,please do as following if you on cpanel server
/scripts/installruby
if on other server please use:
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.6.8.tar.gz
tar zxvf ruby-1.6.8.tar.gz
cd ruby-1.6.8
ignore above step if you have ruby install on your server.
install flvtool2:
wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
tar xvzf flvtool2-1.0.6.tgz
cd flvtool2-1.0.6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
install yamdi:
yum install yamdi
OR
wget http://downloads.sourceforge.net ... .gz?use_mirror=nchc
tar -zxvf yamdi-1.4.tar.gz
cd yamdi-1.4
gcc yamdi.c -o yamdi -O2 -Wall
mv yamdi /usr/bin/
Installing FFMPEG
after library installed please run : ldconfig -v
get and download ffmpeg using svn,make sure you install subversion first before begin,a tutorial for installing subversion is:
use yum for this for installation:
Code:
root@server [~]# yum install subversion
and then you may get this error:
Error: Missing Dependency: perl(URI) >= 1.17 is needed by package subversion
please do this if you get that error:
wget ftp://ftp.icm.edu.pl/vol/rzm1/li ... I-1.35-3.noarch.rpm
rpm -i perl-URI-1.35-3.noarch.rpm
compile from source:
wget http://subversion.tigris.org/downloa...n-1.4.6.tar.gz
wget http://subversion.tigris.org/downloa...s-1.4.6.tar.gz
tar -xzvf subversion-1.4.6.tar.gz
tar -xzvf subversion-deps-1.4.6.tar.gz
cd subversion-1.4.6
./configure --prefix=$HOME --without-berkeley-db--with- ssl --with-editor=/usr/bin/ vim --without-apxs --without-apache
Installing FFMpeg
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp
./configure --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-x11grab --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopenjpeg --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib
Installing Mplayer & Mencoder
cd /usr/local/src/
wget http://www.mplayerhq.hu/MPlayer/ ... al-20071007.tar.bz2
tar xjvf essential-20071007.tar.bz2
mv /usr/local/src/essential-20071007/ /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
wget http://www1.mplayerhq.hu/MPlayer ... ll-20071007.tar.bz2
tar jxvf all-20071007.tar.bz2
mv /usr/local/src/all-20071007/ /usr/local/lib/codecs/
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer
svn update
cd mplayer
Installing mediainfo
wget http://downloads.sourceforge.net ... x86_64.CentOS_5.rpm
rpm -ivh libzen0-0.4.9-1.x86_64.CentOS_5.rpm
wget rpm -ivh libmediainfo0-0.7.26-1.x86_64.CentOS_5.rpm
wget
rpm -ivh mediainfo-0.7.26-1.x86_64.CentOS_5.rpm
Installing neroAacEnc
wget
ftp://ftp6.nero.com/tools/NeroDigitalAudio.zip
unzip NeroDigitalAudio.zip -d nero
cd nero/linux
sudo install -D -m755 neroAacEnc /usr/local/bin
Installing ffmpeg-PHP
wget http://sourceforge.net/projects/ ... 0.6.0.tbz2/download
tar jxvf ffmpeg-PHP-0.6.0.tbz2
cd ffmpeg-PHP-0.6.0
PHPize
add below line to your PHP.ini
extension=ffmpeg.so
you can find your PHP.ini path using:
PHP -i | grep PHP.ini
save and restart your apache/httpd.
Error:
/root/ffmpeg-PHP-0.5.0/ffmpeg_frame.c:495: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1
Fix:
1. Open the file “/root/ffmpeg-PHP-0.5.0/ffmpeg_frame.c” using vi editor.
2. Go to the line you are getting this error. [In this example,line #495].
3. Execute the following command.
Press ESC and :%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
4. Save the file and recompile it once again.
to check installed module:

which PHP ffmpeg mplayer mencoder flvtool2 yamdi MP4Box neroAacEnc mediainfo


出处:http://hilinux.com/bbs/thread-2861-1-1.html

猜你在找的CentOS相关文章