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
You can use a static build from ffmpeg gusari and the sources syntax to automagically download and extract the binaries from a static build tar to
/usr/local/bin
. Here's an extremely simple example that has worked for me:add the following to your
.ebextensions/packages.config
A kind person at Amazon helped me out and sent me this config file that works, hopefully some other people will find this useful:
Edit: Changed the commands to install a "more official" static build linked from the FFMPEG web site. Also, the former static build from Gusari does not seem available anymore.
Check cloud-init logs for messages. On a Linux instance, that would be:
Also, you can log to another file to make errors easier to find:
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:
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:
Untested, but shouldn't it be
tar xzf /usr/local/bin/ffmpeg
without a minus?