[英]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"
我已經搜索了很多東西,但無法做到這一點,Amazon支持人員要求我使用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);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.