繁体   English   中英

AWS弹性beantalk UnhandledPromiseRejectionWarning:找不到ffprobe

[英]AWS elastic beanstalk UnhandledPromiseRejectionWarning: Cannot find ffprobe

使用在 64 位 Amazon Linux 2/5.2.3 上运行的 Node.js 10 的 elasticbeanstalk。 我在.ebextensions文件夹下有一个packages.config文件。

   packages:
  yum:
    ImageMagick: []
    ImageMagick-devel: []
commands:
  01-wget:
    command: "wget -O /tmp/ffmpeg.tar.xz http://ffmpeg.org/releases/ffmpeg-4.1.tar.gz"
  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-4.1/ffmpeg /usr/bin/ffmpeg; fi"
  05-ln:
    command: "if [[ ! -f /usr/bin/ffprobe ]] ; then ln -sf /opt/ffmpeg/ffmpeg-4.1/ffprobe /usr/bin/ffprobe; fi"
  06-pecl:
    command: "if [ `pecl list | grep imagick` ] ; then pecl install -f imagick; fi"

我正在使用fluent-ffmpeg @2.1.2 模块来保存屏幕截图。

您只是下载并解压ffmpeg的源代码。 在您可以使用ffmpegffprobe之前,您必须编译代码。 没有这个,您的脚本将无法工作。

要编译,您可以尝试在/opt/ffmpeg/ffmpeg-4.1文件夹中运行以下命令:

./configure  --disable-x86asm
make

但是,编译会很耗时 这可能会更好地编译所有内容,例如将二进制文件存储在 S3 中,或者与您的应用程序 zip 捆绑在一起,以节省大量时间。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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