在 Amazon EC2 linux AMI 上安装 FFMPEG-Php


FFMPEG-Php installation on Amazon EC2 linux AMI

我已经使用此脚本在 Amazon EC2 Linux AMI 上安装了 FFMPEG,现在我正在尝试安装 FFMPEG-PHP,./configure后它会在命令make上给我此错误

 # make
/bin/sh /opt/ffmpeg-php-0.6.0/libtool --mode=compile cc  -I. -I/opt/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/opt/ffmpeg-php-0.6.0/include -I/opt/ffmpeg-php-0.6.0/main -I/opt/ffmpeg-php-0.6.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/ffmpeg  -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing   -c /opt/ffmpeg-php-0.6.0/ffmpeg-php.c -o ffmpeg-php.lo
libtool: compile:  cc -I. -I/opt/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/opt/ffmpeg-php-0.6.0/include -I/opt/ffmpeg-php-0.6.0/main -I/opt/ffmpeg-php-0.6.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /opt/ffmpeg-php-0.6.0/ffmpeg-php.c  -fPIC -DPIC -o .libs/ffmpeg-php.o

 In file included from /opt/ffmpeg-php-0.6.0/ffmpeg-php.c:42:0:
    /usr/local/include/ffmpeg/avcodec.h:43:21: fatal error: version.h: No such file or directory
     #include "version.h"

我已经搜索了很多,但无法做到,亚马逊支持人员要求我使用 CENTOS AMI 而不是 Linux AMI,但我在那里托管了所有内容,所以如果有人可以帮助我,我将不胜感激。

谢谢

哈姆扎

FFPMEG 不再受支持,并且自 2008 年以来没有更新,所以我设法通过 PHP 使用命令来做到这一点

因此,如果你们中的任何人想使用 FFMPEG,请使用exec命令,但请确保您输入正确的路径,如下所示

$ret = exec('ffmpeg -i /var/www/html/inputvid.mp4 -b:v 1300k -preset ultrafast /var/www/html/outputvid.mp4', $out, $err);