centos 5.x 安装 FFmpeg, Lame,Mplayer, Mencoder, FFmpeg-PHP 视频转换

首先做下准备工作:
yum update
yum upgrade
yum install libjpeg-progs libjpeg62 libjpeg62-dev libsdl1.2-dev php5-dev build-essential unzip

一. 安装所需程序库的RPM包到 centos 5.x
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

二. 安装 Install ffmpeg, mplayer, mencoder 等模块
yum -y install ffmpeg ffmpeg-devel mplayer mencoder flvtool2

三. 安装 Lame
cd /usr/local/src
wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
tar zxvf lame-3.97.tar.gz
cd /usr/local/src/lame-3.97
./configure
make && make install

四. 安装 FFMPEG-PHP
cd /usr/local/src
wget http://garr.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.6.0.tbz2
tar jxvf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
phpize
./configure
make
make install

然后修改php.ini文件
vi /etc/php.ini

在php.ini文件加上这句
extension=ffmpeg.so

然后重新启动apache
/etc/init.d/httpd restart

运行
php -m | grep ffmpeg

大功告成,全文完。

Last modification:October 1st, 2017 at 09:24 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment