Asi es como instalamos el FFMPEG y FFMPEG-PHP en nuestros servidores, tambien se puede con yum o emerge en otras distros, pero de esta forma lo instalaras todos los codecs que hay. Lo primero que necesitas es subversion, en centos o fedora es tan facil como hacer:
Código:
yum install subversion
Para instalar FLVTOOL2 tambien necesitamos ruby, asi se instala en fedora o en centos:
Código:
yum install ruby
yum install ncurses-devel
Creamos una carpeta:
Código:
mkdir ~/ff
cd ~/ff
Ahora instalamos FFMPEG:
Código:
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-shared --prefix=/usr
make clean && make
make install
ATENCION!! SI TE DA EL ERROR DE TMP AL HACER EL configure DE FFMPEG DEBES ABRIR EL configure Y EDITAR DONDE SALE: TMPDIR1=
Poner por ejemplo /root/ffmpeg/tmp (crea la carpeta tmp en ffmpeg antes de ejecutar el configure de nuevo)
Y ahora ya solo tienes que copiar y pegar todo esto ;D instalaras MPLAYER, FAAD2, LAME-MP3, FLVTOOL2, FAAC, SPEEX, LIBVORBIS, LIBOGG y FFMPEG-PHP
Código:
##MPLAYER:
cd ~/ff
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd mplayer
./configure
make
make install
##LIBOGG:
cd ~/ff
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
tar zxvf libogg-1.1.3.tar.gz
cd libogg-1.1.3
./configure --prefix=/usr &&
make
make install
##LIBVORBIS:
cd ~/ff
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.bz2
tar zxvf libvorbis-1.2.0.tar.bz2
cd libvorbis-1.2.0
./configure --prefix=/usr &&
make
make install &&
install -v -m644 doc/Vorbis* /usr/share/doc/libvorbis-1.2.0
##SPEEX:
cd ~/ff
wget http://downloads.us.xiph.org/releases/speex/speex-1.0.5.tar.gz
tar zxvf speex-1.0.5.tar.gz
cd speex-1.0.5
./configure --prefix=/usr &&
make
make install
##FAAC:
cd ~/ff
wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz
tar zxvf faac-1.26.tar.gz
cd faac
./bootstrap &&
sed -i -e '/obj-type/d' -e '/Long Term/d' frontend/main.c &&
./configure --prefix=/usr &&
make
make install
##FAAD2:
cd ~/ff
wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz
tar zxvf faad2-2.6.1.tar.gz
cd faad2
./bootstrap &&
./configure --prefix=/usr &&
make
make install
##LAME-MP3:
cd ~/ff
wget http://kent.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
tar zxvf lame-3.97.tar.gz
cd lame-3.97
./configure
make
make install
##FLVTOOL2:
cd ~/ff
wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
tar zxvf flvtool2-1.0.6.tgz
cd flvtool2-1.0.6
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
##FFMPEG-PHP:
cd ~/ff
wget http://dfn.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.3.tbz2
tar -xjf ffmpeg-php-0.5.3
cd ffmpeg-php-0.5.3
phpize
./configure && make
make install
Asegurate de dos cosas:
- En el php.ini tienes puesto:
Código:
extension = "ffmpeg.so"
- El archivo ffmpeg.so esta en el directorio de tus extensiones de php normalmente es algo parecido a este:
Código:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613
Espero que os sea util la guia, si teneis dudas preguntar!!
PD: Intentar no postear la guia en otros sitios, y si lo haces poner un enlace a esta