Install ffmpeg on elastic beanstalk using ebextensions config

前端 未结 6 2152
忘了有多久
忘了有多久 2020-12-24 09:32

I\'m attempting to install an up to date version of ffmpeg on an elastic beanstalk instance on amazon servers. I\'ve created my config file and added these container_command

6条回答
  •  死守一世寂寞
    2020-12-24 10:00

    The version is not specified in the first command "01-wget ..." however, it is specified when linking the files. Since the publication of this the release has been changed from "ffmpeg-3.3.1-64bit-static" to "ffmpeg-3.3.3-64bit-static" there are two solutions to fix this problem:

    1. specify the version for wget
    2. strip the containing directory on unpacking.

      03-tar: command: "tar xvf /tmp/ffmpeg.tar.xz -C /opt/ffmpeg --strip 1"

    Here is the full script:

    packages:
      yum:
        ImageMagick: []
        ImageMagick-devel: []
    commands:
      01-wget:
        command: "wget -O /tmp/ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-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 --strip 1"
      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"
    

提交回复
热议问题