Php 如何在弹性豆茎上安装FFMPEG
这不是重复的,我发现了一个线程,它已过时且不工作: 我已经尝试安装了一段时间,似乎没有任何工作。 请共享config.yml,它将使这项工作正常进行 我正在使用64位Amazon Linux 2016.03 v2.1.6,在Elastic Beanstalk上运行PHP 7.0Php 如何在弹性豆茎上安装FFMPEG,php,ffmpeg,amazon-elastic-beanstalk,Php,Ffmpeg,Amazon Elastic Beanstalk,这不是重复的,我发现了一个线程,它已过时且不工作: 我已经尝试安装了一段时间,似乎没有任何工作。 请共享config.yml,它将使这项工作正常进行 我正在使用64位Amazon Linux 2016.03 v2.1.6,在Elastic Beanstalk上运行PHP 7.0 我当前的文件是 branch-defaults: default: environment: Default-Environment master: environment: Defau
我当前的文件是
branch-defaults:
default:
environment: Default-Environment
master:
environment: Default-Environment
global:
application_name: "My First Elastic Beanstalk Application"
default_ec2_keyname: ~
default_platform: "64bit Amazon Linux 2016.03 v2.1.6 running PHP 7.0"
default_region: us-east-1
profile: eb-cli
sc: git
packages: ~
yum:
ImageMagick: []
ImageMagick-devel: []
commands:
01-wget:
command: "wget -O /tmp/ffmpeg.tar.gz http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-03-05.tar.gz"
02-mkdir:
command: "if [ ! -d /opt/ffmpeg ] ; then mkdir -p /opt/ffmpeg; fi"
03-tar:
command: "tar -xzf ffmpeg.tar.gz -C /opt/ffmpeg"
cwd: /tmp
04-ln:
command: "if [[ ! -f /usr/bin/ffmpeg ]] ; then ln -s /opt/ffmpeg/ffmpeg /usr/bin/ffmpeg; fi"
05-ln:
command: "if [[ ! -f /usr/bin/ffprobe ]] ; then ln -s /opt/ffmpeg/ffprobe /usr/bin/ffprobe; fi"
06-pecl:
command: "if [ `pecl list | grep imagick` ] ; then pecl install -f imagick; fi"
尝试以下
.ebextensions/00安装ffmpeg.config
文件:
命令:
01安装:
命令:“wgethttp://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz -O-| tar zxf--C/usr/bin“
以下配置对我有效。尝试使用特定版本,并根据ffmpeg的版本确保文件夹名称正确
文件.ebextensions/03\u ffmpeg\u package.config
packages:
yum:
ImageMagick: []
ImageMagick-devel: []
commands:
01-wget:
command: "wget -O /tmp/ffmpeg.tar.xz https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-3.4.2-64bit-static.tar.xz"
02-mkdir:
command: "if [ ! -d /opt/ffmpeg ] ; then mkdir -p /opt/ffmpeg; fi"
03-tar:
command: "tar xvf /tmp/ffmpeg.tar.xz -C /opt/ffmpeg"
04-ln:
command: "if [[ ! -f /usr/bin/ffmpeg ]] ; then ln -sf /opt/ffmpeg/ffmpeg-3.4.2-64bit-static/ffmpeg /usr/bin/ffmpeg; fi"
05-ln:
command: "if [[ ! -f /usr/bin/ffprobe ]] ; then ln -sf /opt/ffmpeg/ffmpeg-3.4.2-64bit-static/ffprobe /usr/bin/ffprobe; fi"
06-pecl:
command: "if [ `pecl list | grep imagick` ] ; then pecl install -f imagick; fi"
我使用这个链接的静态构建
另一种方法非常简单,只需下载ffmpeg的静态版本,将其压缩并上传到S3存储桶或任何在线位置,然后将其添加到eExtension
sources:
/etc/ffmpeg: https://url-to/ffmpeg-static-file.zip
我建议您切换到使用docker映像,这样可以更容易地设置ffmpeg