How to install latest ffmpeg mplayer mencoder flvtool2 x264 yamdi on centos
How to install ffmpeg mplayer(updated on 11-14-2011)
This installation are full and complete installation for latest release of ffmpeg/mplayer/x264 and other module and tested working on Centos 5 or rhel server, you can use this on Fedora or other linux version that have yum supported, you might need to change the yum to apt-get if you on debian or ubuntu server. Below installation work for major media script like ( adultvideoscript, phpmotion, clipshare, phpfox, adultwatch, etc... )
Edit the /etc/ld.so.conf file and add the following lines
/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-release/rpmforge-release-0.5.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-release/rpmforge-release-0.5.1-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-release/rpmforge-release-0.5.1-1.el5.rf.ppc.rpm rpm -ivh rpmforge-release-0.5.1-1.el5.rf.ppc.rpm
RHEL4 / CentOS-4
for i386: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el4.rf.i386.rpm rpm -ivh rpmforge-release-0.5.1-1.el4.rf.i386.rpm for x86_64: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el4.rf.x86_64.rpm rpm -ivh rpmforge-release-0.5.1-1.el4.rf.x86_64.rpm for PPC : wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el4.rf.ppc.rpm rpm -ivh rpmforge-release-0.5.1-1.el4.rf.ppc.rpm
Install required libraries using yum
yum install 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 libgccgd gd-devel gettext freetypereetype-devel ImageMagick ImageMagick-devel libjpeg* libjpeg-devel* libpng* libpng-devel* libstdc++* libstdc++-devel* libtiff* libtiff-devel* libtool* libungif* libungif-deve* libxml* libxml2* ibxml2-devel* zlib* zlib-devel* automake* autoconf* ncurses patch apr-util -y
install yasm 0.8.0
cd /usr/local/src wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz tar zxvf yasm-1.2.0.tar.gz cd yasm-1.2.0 ./configure && make && make install
Installing opencore-amr
wget http://sourceforge.net/projects/opencore-amr/files/opencore-amr/0.1.2/opencore-amr-0.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://mirror.anl.gov/pub/linux/libs/ieee1394/libraw1394-2.0.7.tar.gz tar zxfv libraw1394-2.0.7.tar.gz cd libraw1394-2.0.7 ./configure make && make install
Installing libdc1394
This project requires libraw1394, you must build it first.
wget http://sourceforge.net/projects/libdc1394/files/libdc1394/1.2.2/libdc1394-1.2.2.tar.gz/download wget http://sourceforge.net/projects/libdc1394/files/libdc1394-2/2.1.2/libdc1394-2.1.2.tar.gz/download tar zxvf libdc1394-1.2.2.tar.gz tar zxvf libdc1394-2.1.2.tar.gz cd libdc1394-1.2.2 ./configure make && make install cd ../libdc1394-2.1.2 ./configure make && make install
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 ./configure make && make install
Installing FAAC
wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz tar zxfv faac-1.26.tar.gz cd faac ./bootstrap ./configure make && make install
Installing libmp3lame
wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz/download tar zxvf lame-3.98.4.tar.gz cd lame-3.98.4 ./configure make && make install
Installing OpenJPEG
wget http://openjpeg.googlecode.com/files/openjpeg_v1_3.tar.gz tar zxvf openjpeg_v1_3.tar.gz cd OpenJPEG_v1_3 make && make install
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 ./configure make && make install
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 ./configure make && make install
Installing vorbistool
wget http://downloads.xiph.org/releases/vorbis/vorbis-tools-1.2.0.tar.gz tar zvxf vorbis-tools-1.2.0.tar.gz cd vorbis-tools-1.2.0 ./configure make && make install
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 ./configure make && make install
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 ./configure make && make install
Installing gpac and MP4Box
wget http://downloads.sourceforge.net/gpac/gpac-0.4.5.tar.gz wget http://downloads.sourceforge.net/gpac/gpac_extra_libs-0.4.5.tar.gz tar zxvf gpac-0.4.5.tar.gz tar zxvf gpac_extra_libs-0.4.5.tar.gz cd gpac cp -r ../gpac_extra_libs/* extra_lib/ chmod +x configure ./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 git, you can find git installation here
git clone git://git.videolan.org/x264.git cd x264 ./configure --enable-pthread --enable-mp4-output --enable-shared make make install
Installing flvtool2 and 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/1.9/ruby-1.9.0-5.tar.gz tar zxvf ruby-1.9.0-5.tar.gz cd ruby-1.9.0-5 ./configure make && make install
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
or
gem install flvtool2
install yamdi:
yum install yamdi
or
cd /usr/local/src wget http://sourceforge.net/projects/yamdi/files/yamdi/1.5/yamdi-1.5.tar.gz/download tar -zxvf yamdi-1.5.tar.gz cd yamdi-1.5 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 can be found here.
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-libmp3lame --enable-libopenjpeg --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib make && make install ldconfig -v
Installing Mplayer and Mencoder
cd /usr/local/src/ wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2 tar xjvf all-20110131.tar.bz2 mv /usr/local/src/all-20110131/ /usr/local/lib/codecs/ chmod -R 755 /usr/local/lib/codecs/ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer cd /usr/local/src/mplayer svn update cd mplayer ./configure make && make install
Installing mediainfo
wget http://downloads.sourceforge.net/zenlib/libzen0-0.4.9-1.x86_64.CentOS_5.rpm rpm -ivh libzen0-0.4.9-1.x86_64.CentOS_5.rpm wget http://downloads.sourceforge.net/mediainfo/libmediainfo0-0.7.26-1.x86_64.CentOS_5.rpm rpm -ivh libmediainfo0-0.7.26-1.x86_64.CentOS_5.rpm wget http://downloads.sourceforge.net/mediainfo/mediainfo-0.7.26-1.x86_64.CentOS_5.rpm 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/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download tar jxvf ffmpeg-php-0.6.0.tbz2 cd ffmpeg-php-0.6.0 phpize ./configure make make install
add
extension=ffmpeg.so
to your php.ini
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
To 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
Hope above tutorial help you. You can also drop me a message here for installation just for $50 usd and done in few hour.
2. Right-Click then Copy
3. Paste the HTML code into your webpage
Incoming search terms:
Search and Replace Text String in MySQL Database with phpMyAdmin
Sometime you might facing problem to replace the string or data in mysql and you have many row inside your table. Here is the solution you can put in to SQL command line in phpmyadmin, this solution is work for mysql too. Before begin please back all your sql 1st, in case you make any mistake.
Open phpmyadmin -> click on database -> click on table name -> click on SQL tab on top then enter the command below:
UPDATE tablename SET field = replace(field, "SearchString", "ReplaceString");
please change:
tablename
field
SearchString
ReplaceString
according your table name and field.
you can also add where Clause ( add condition for this sql statemen )
UPDATE tablename SET field = replace(field, "SearchString", "ReplaceString") WHERE field2='SomeValue';
Hope this help..
2. Right-Click then Copy
3. Paste the HTML code into your webpage
Incoming search terms:
- phpmyadmin search and replace string (6)
- phpmyadmin replace text (5)
- phpmyadmin replace string (5)
- search and replace in mysql database with phpmyadmin (3)
- phpmyadmin replace (2)
- search and replace text in phpmyadmin (2)
- replace text in phpmyadmin (2)
- phpmyadmin string find replace (1)
- phpmyadmin text replace (1)
- phpmyadmin search text in database mysql (1)
Disable open_basedir in Plesk
Disable open_basedir in Plesk
This explanation tells you how to disable open_basedir in plesk without breaking/commenting your current httpd.conf basedir lines.
Create a new file, called vhost.conf
This file will include anything you want to disable from httpd.conf main config from your virtual host.
touch /var/www/vhosts/yourdomain.com/conf/vhost.conf
Now we edit the file and we add the following,
/var/www/vhosts/yourdomain.com/conf/vhost.conf
<directory /var/www/vhosts/yourdomain.extn/httpdocs> php_admin_flag engine on php_admin_flag safe_mode off php_admin_value open_basedir none </directory>
Once you finish adding the mentioned lines, its time to reconfigure and restart the webserver config.
/usr/local/psa/admin/sbin/websrvmng -v -a
You should be done by now.
2. Right-Click then Copy
3. Paste the HTML code into your webpage
Incoming search terms:
- centos open_basedir (5)
- disable open_basedir on centos (4)
- open_basedir centos (2)
- disable plesk open_basedir (2)
- disable open_basedir plesk 10 (2)
- plesk 10 disable open_basedir (2)
- centos how to disable open_basedir (2)
- remove open_basedir plesk 10 (2)
- disable open_basedir in plesk (2)
- plesk disable open_basedir (1)


