简体   繁体   English

在Amazon EC2 linux AMI上安装FFMPEG-Php

[英]FFMPEG-Php installation on Amazon EC2 linux AMI

I have installed FFMPEG on Amazon EC2 Linux AMI using this script now I am trying to install FFMPEG-PHP and after ./configure it gives me this error on make command 我已使用脚本在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"

I have searched this a lot but couldn't manage to do it, Amazon support officer asked me to use CENTOS AMI instead of Linux AMI but I have everything hosted there, so I will appreciate if someone can help me with this. 我已经搜索了很多东西,但无法做到这一点,Amazon支持人员要求我使用CENTOS AMI而不是Linux AMI,但是我在此托管了所有东西,因此,如果有人可以帮助我,我将不胜感激。

Thank you, 谢谢,

Hamza 哈姆扎

The FFPMEG is no longer supported and is not updated since 2008, So I have managed to do it using commands through PHP FFPMEG不再受支持,并且自2008年以来未更新,因此我设法通过PHP使用命令来做到这一点

so if anyone of you wants to use FFMPEG then use exec command but make sure you enter correct path like below 因此,如果您想使用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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM