#yum groupinstall "Development tools"#cd /etc/yum.repos.d/#cp -prv ../yum.repos.d{,.orig} #vim dag.repo#cat dag.repo [dag]name=Dag RPM Repository for Red Hat Enterprise Linuxbaseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/daggpgcheck=1gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txtenabled=1protect=0#wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt -P /tmp#rpm --import /tmp/RPM-GPG-KEY.dag.txt#yum repolist#yum install ffmpeg-devel re2c ffmpeg#cd /usr/local/src/#wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2#tar -xjf ffmpeg-php-0.6.0.tbz2#cd ffmpeg-php-0.6.0/#phpize#./configure#sed -i 's#PIX_FMT_RGBA32#PIX_FMT_RGB32#' ./ffmpeg_frame.c#sed -i '311,360s/list_entry/zend_rsrc_list_entry/' ./ffmpeg_movie.c#make && make install#echo -e "extension=ffmpeg.so\n" > /etc/php.d/ffmpeg.ini#apache -k restart#php -m|grep ffmpeg
参考文章:https://stavrovski.net/blog/install-ffmpeg-and-ffmpeg-php-in-centos-6-with-virtualmin