Install ffmpegthumbnalier on Elastic Beanstalk instances

191 views Asked by At

I need to install ffmpegthumbnailer to create video thumbnails in my Easltic Beanstalk instances. When I try to put in configuration in the .ebextensions directory under: packages => yum => ffmpegthumbnailer it comes back with an error. No package ffmpegthumbnailer available.

I tried add the ffmpeg-devel in the packages and then tried the rpm option. That came back with an error as well.

Please let me know if someone has done this successfully in the past. Thanks in Advance.

1

There are 1 answers

0
littleforest On

I was able to easily install FFmpeg on Elastic Beanstalk from source a few years ago. Here are my notes on that installation. Please update the release for FFmpeg, as it looks like version 4.2 is the current stable version now. Here is the FFmpeg download page.

You can install from source by creating a configuration file in the .ebextensions folder:

# .ebextensions/ffmpeg.config

packages:
  yum:
    autoconf: []
    automake: []
    cmake: []
    freetype-devel: []
    gcc: []
    gcc-c++: []
    git: []
    libtool: []
    make: []
    nasm: []
    pkgconfig: []
    zlib-devel: []
sources:
  /usr/local/src: http://ffmpeg.org/releases/ffmpeg-3.2.tar.bz2
commands:
  ffmpeg_install:
    cwd: /usr/local/src/ffmpeg-3.2
    command: sudo ./configure --prefix=/usr && make && make install

The packages line of this file tells Elastic Beanstalk to install several packages through yum that are dependencies of FFmpeg. 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.

Ordinarily it is a good practice to install packages from source into the /usr/local directory. However, it's possible that the default user that runs your application may not have /usr/local in its PATH. Installing ffmpeg in the /usr directory ensures it will be available to the application in/usr/bin. But you can update the installation directory by modifying the --prefix in the configure command as needed.