• Status Yahoo
  • Status Yahoo
  • LiveZilla Live Help

Cara Install FFMPEG, FFMPEG-PHP

Ada pertanyaan super menarik tadi di Kaskus. Tjintjah oppymeidy bertanya dengan penu rasa kasih, bagemana kah cara install FFMPEG, FFMPEG-PHP , FLVTool2 dan sebagaenya.

Dengan asyumsyen pake Centos dan make cPanel (persi dari source code)

1. Masuk ke root (cd ~)

2. export TMPDIR=$HOME/tmp (Kalau indak ada folder /tmp nya di mkdir dulu)

3. nano /etc/ld.so.conf masukkan :
/usr/local/lib
/usr/lib

4. Save, lalu ketik ldconfig di terminal

5. yum install gcc-c++

6. yum install libogg zlib-devel libtool

7a. FAAC (http://sourceforge.net/projects/faac/files/)

wget http://superb-west.dl.sourceforge.net/sourceforge/faac/faac-1.28.tar.gz
tar xvfz faac-1.28.tar.gz
cd faac-1.28/
./bootstrap
./configure --enable-shared
make
make install
ldconfig

Jika ada error pas compiling :
Buka mpeg4ip.h
Hapus Line 126
Save

7b. FAAD (http://www.audiocoding.com/downloads.html)

wget http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz?use_mirror=nchc
tar xvfz faad2-2.7.tar.gz
cd faad2-2.7/
./bootstrap
./configure --enable-shared
make
make install
ldconfig

8. x264 (ftp://ftp.videolan.org/pub/videolan/x264/snapshots/)

yum install yasm
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20110927-2245-stable.tar.bz2
tar xjvf x264-snapshot-20110927-2245-stable.tar.bz2
cd x264-snapshot-20110927-2245-stable
./configure --enable-shared --disable-asm
make
make install
ldconfig

9. OpenJPEG (http://code.google.com/p/openjpeg/downloads/list)

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
ldconfig

10. LibTheora (http://downloads.xiph.org/releases/theora/)

yum install libogg libogg-devel libvorbis libvorbis-devel
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.0.tar.gz
tar zxvf libtheora-1.1.0.tar.gz
cd libtheora-1.1.0
./configure --enable-shared
make
make install

11. XviD (http://www.xvid.org/Downloads.43.0.html)

wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
tar zxvf xvidcore-1.2.2.tar.gz
cd xvidcore
cd build/generic
./configure --enable-shared
make
make install

12. Yamdi (http://downloads.sourceforge.net/project/yamdi/yamdi/)

wget "http://downloads.sourceforge.net/project/yamdi/yamdi/1.4/yamdi-1.4.tar.gz?use_mirror=garr"
tar zxvf yamdi-1.4.tar.gz
cd yamdi-1.4
gcc yamdi.c -o yamdi -O2 -Wall -D_FILE_OFFSET_BITS=647
cp yamdi /usr/bin/

13. Lame MP3 Encoder (http://nchc.dl.sourceforge.net/sourceforge/lame/)

wget "http://downloads.sourceforge.net/project/lame/lame/3.98.2/lame-398-2.tar.gz?use_mirror=garr"
tar xvzf lame-398-2.tar.gz
cd lame-398-2
./configure
make
make install

14. FLVTool2 (http://rubyforge.org/frs/?group_id=1096&release_id=9694)

/scripts/installruby
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

15. FFMPEG (http://ffmpeg.org/download.html)

yum install subversion
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-libfaac --enable-libfaad --enable-shared --enable-memalign-hack --enable-gpl --enable-libtheora --enable-libmp3lame --enable-libopenjpeg --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-swscale
make
make install

Kemudian Symlink :

ln -s /usr/local/lib/libavformat.so.xx /usr/lib/libavformat.so.xx
ln -s /usr/local/lib/libavcodec.so.xx /usr/lib/libavcodec.so.xx
ln -s /usr/local/lib/libavutil.so.xx /usr/lib/libavutil.so.xx
ln -s /usr/local/lib/libmp3lame.so.xx /usr/lib/libmp3lame.so.xx
ln -s /usr/local/lib/libavformat.so.xx /usr/lib/libavformat.so.xx
ln -s /usr/local/lib/libfaad.so.xx /usr/lib/libfaad.so.xx

Tukar XX dengan angka yang tertulis di server (/usr/local/lib/)

16. FFMPEG-PHP (http://downloads.sourceforge.net/project/ffmpeg-php/)

wget "http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=garr"
tar xjvf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
phpize
./configure
make
make install

Jika ada error saat compiling ffmpeg-php :

vim ffmpeg_frame.c
:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32/g
:wq

17. Langkah Selanjutnya.

cp /usr/local/lib/php/extensions/no-debug-non-zts-????????????/ffmpeg.so /usr/local/lib/php/extensions/

Ganti ???? dengan folder yang ada di path diatas di server.

18. Integrasi PHP dan FFMPEG
Masukkan ffmpeg.so ke extension di php.ini (Via WHM juga indak masalah)

19. Mplayer dan Codecs (http://www1.mplayerhq.hu/MPlayer/releases/)

wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
tar xjvf essential-20071007.tar.bz2
mkdir /usr/local/lib/codecs/
mv essential-20071007/ /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
wget http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc3.tar.bz2
tar xjvf MPlayer-1.0rc3.tar.bz2
cd MPlayer-1.0rc3/
./configure
make
make install

Sekiyan :D

This entry was posted in Tutorial. Bookmark the permalink.

2 Responses to Cara Install FFMPEG, FFMPEG-PHP

  1. kougas says:

    endak mudeng cin )) meskipun udah dibaca dengan penuh penghayatan dan kasih sayang

Leave a Reply

Your email address will not be published.

*



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>