Tuesday, May 15, 2018
Belajar Program
Program / codec yang dibutuhkan antara lain :
wget http://www3.mplayerhq.hu/MPlayer/releas ... 22.tar.bz2
wget http://rubyforge.org/frs/download.php/9 ... .5_rc6.tgz
wget http://easynews.dl.sourceforge.net/sour ... .97.tar.gz
wget http://superb-west.dl.sourceforge.net/s ... 0.5.0.tbz2
wget http://downloads.xiph.org/releases/ogg/ ... 1.3.tar.gz
wget http://downloads.xiph.org/releases/vorb ... 1.2.tar.gz
Setelah itu diekstrak.
bunzip2 essential-20061022.tar.bz2; tar xvf essential-20061022.tar
tar zxvf flvtool2_1.0.5_rc6.tgz
tar zxvf lame-3.97.tar.gz
bunzip2 ffmpeg-php-0.5.0.tbz2; tar xvf ffmpeg-php-0.5.0.tar
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz
Kemudian kita membuat beberapa direktori tambahan
mkdir /usr/local/lib/codecs/
mv essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
Kita juga membutuhkan SVN Ruby
yum install subversion
yum install ruby
yum install ncurses-devel
Dapatkan ffmpeg dan mcodec terbaru
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
Masukan baris berikut kedalam /etc/ld.so.conf
Code: Select all
/usr/local/lib
kemudian jalankan
ldconfig -v
Compile LAME
cd /usr/local/src/lame-3.97
./configure
make
make install
Compile libOGG
cd /usr/local/src/libogg-1.1.3
./configure
make
make install
Compile libVorbis
cd /usr/local/src/libvorbis-1.1.2
./configure
make
make install
Compile flvtool2
cd /usr/local/src/flvtool2_1.0.5_rc6
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
Compile MPlayer
cd /usr/local/src/mplayer
./configure
make
make install
Compile FFMPEG
cd /usr/local/src/ffmpeg
./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
echo '#define HAVE_LRINTF 1' >> config.h
make
make install
Create sh tambahan lagi
ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
Lakukan sebelum mengcompile ffmpeg php
yum install automake
yum install autoconf
yum install libtool
Lakukan Compile FFMPEG-PHP
cd /usr/local/src/ffmpeg-php-0.5.0
phpize
./configure
make
make install
Masukan FFMPEG-PHP sebagai extention PHP
masukan baris ini ke php.ini file
extension=ffmpeg.so
Restart Apache dan jalankan FFMPEG-PHP
/etc/init.d/apache2 restart
cek apakah ffmpeg-php telah aktif pada php
php -r 'phpinfo();' | grep ffmpeg
kalo ada berarti muncul.....
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment