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_commands:
container_commands:
01-ffmpeg:
command: wget -O/usr/local/bin/ffmpeg http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-03-05.tar.gz
leader_only: false
02-ffmpeg:
command: tar -xzf /usr/local/bin/ffmpeg
leader_only: false
03-ffmpeg:
command: ln -s /usr/local/bin/ffmpeg /usr/bin/ffmpeg
leader_only: false
Command 01 and 03 seems to work perfectly but 02 doesn't seem to work so ffmpeg doesn't unzip. Any ideas what the issue might be?
Thanks, Helen
Next, the sources line instructs Elastic Beanstalk to download and unzip the ffmpeg tarball into the /usr/local/src directory. The commands line then tells Elastic Beanstalk to change into the newly unpacked ffmpeg-3.2 directory, and configure and install FFmpeg.
AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, . NET, PHP, Node. js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.
A kind person at Amazon helped me out and sent me this config file that works, hopefully some other people will find this useful:
# .ebextensions/packages.config
packages:
yum:
ImageMagick: []
ImageMagick-devel: []
commands:
01-wget:
command: "wget -O /tmp/ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-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-4.2.2-amd64-static/ffmpeg /usr/bin/ffmpeg; fi"
05-ln:
command: "if [[ ! -f /usr/bin/ffprobe ]] ; then ln -sf /opt/ffmpeg/ffmpeg-4.2.2-amd64-static/ffprobe /usr/bin/ffprobe; fi"
06-pecl:
command: "if [ `pecl list | grep imagick` ] ; then pecl install -f imagick; fi"
Edit:
The above code works for me today 2020-01-03, in Elastic Beanstalk environment Python 3.6 running on 64bit Amazon Linux/2.9.17
.
https://johnvansickle.com/ffmpeg/ is linked from the official ffmpeg site.
(The former static build from Gusari does not seem available anymore.)
Warning:
The above will always download the latest release when you deploy. You're also depending on johnvansickle's site being online (to deploy), and his URL not changing. Two alternative approaches would be:
https://johnvansickle.com/ffmpeg/old-releases/ffmpeg-4.2.2-amd64-static.tar.xz
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With