请帮助我安装FFMEPG, 我已经灌输了它,但是 php 设置中没有扩展名。
php.d中的ffmepg不存在。
任何人都知道如何安装。
答案 0 :(得分:0)
您不必这样做,您可以使用shell_exec
在php上运行ffmpeg
您可以点击此链接
Running ffmpeg command using shell_exec in php as a background process in windows
答案 1 :(得分:0)
对于PHP> = 7.0,只需使用composer:
# /opt/plesk/php/7.2/bin/php /usr/lib64/plesk-9.0/composer.phar install php-ffmpeg/php-ffmpeg
对于早期的PHP版本:
1。确保启用EPEL:
# yum repolist | grep epel
*epel/x86_64 Extra Packages for Enterprise Linux 7 - 12559
如果不是,请按如下所示启用它:
# yum install epel* -y
2。启用RPM Fusion:
# yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
# yum localinstall --nogpgcheck https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
3。安装FFmpeg和依赖项:
# sudo yum install ffmpeg ffmpeg-devel mplayer mencoder flvtool2 libogg libvorbis lame
# sudo yum install make plesk-php56-devel gcc glibc-devel zlib-devel
4。下载ffmpeg-php
:
# git clone https://github.com/nilsringersma/ffmpeg-php
# cd ffmpeg-php
# /opt/plesk/php/5.6/bin/phpize
5。做configure
和make
:
# ./configure --with-php-config=/opt/plesk/php/5.6/bin/php-config --enable-skip-gd-check
# make
# make install
6。启用扩展程序:
# echo "extension=ffmpeg.so" > /opt/plesk/php/5.6/etc/php.d/ffmpeg.ini
# plesk bin php_handler --reread
有关更多常规说明,请参见this guide。