I am trying to enable libmp3lame with FFMPEG in elastic beanstalk (Amazon Redhat Linux machine).
I am able to successfully install FFMPEG in /ffmpeg.config
with the following script:
# .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
I need to install libmp3lame however. I’ve tried to do this with an --enable-libmp3lame
flag and the directions here. The modified script:
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: 01-install_libmp3lame: cwd: /usr/local/src/ command: curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz && tar xzvf lame-3.99.5.tar.gz && cd lame-3.99.5 && ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm && make && make install 02-ffmpeg_install: cwd: /usr/local/src/ffmpeg-3.2 command: sudo ./configure --enable-libmp3lame && --prefix=/usr && make && make install
This doesn’t work. Command 01-install_libmp3lame
completes. Command 02-ffmpeg_install fails because:
[2017-10-12T20:55:19.324Z] INFO [24606] - [Application update app-8fe3-123456_7895@111/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_3_clover_platform/Command 02-ffmpeg_install] : Activity execution failed, because: ERROR: libmp3lame >= 3.98.3 not found
I have tried installing libmp3lame in /ffmpeg-3.2 and got the same issue.
Advertisement
Answer
You used
--prefix="$HOME/ffmpeg_build"
, but you didn’t tell ffmpeg to look there for it. You can omit this and it will probably use/usr/local/
by default.You are trying to run
--prefix=/usr
as an independent command instead of part of your ffmpeg./configure
. You can omit this.If you’re going to use a release branch of ffmpeg instead of the git snapshot you should use the latest version which is currently 3.3, not 3.2. However, 3.4 is due very soon (within days or a week I’m guessing).
No need for
sudo
to configure, but you may need it formake install
depending on your system and user.
Below are commands you can adapt. I didn’t verify the paths are correct to the directories containing the source for lame and ffmpeg.
cd lame-3.99.5 make uninstall make distclean ./configure --disable-shared --enable-nasm make make install cd ../ffmpeg make uninstall cd ../ rm -f ffmpeg curl -O http://ffmpeg.org/releases/ffmpeg-3.3.4.tar.bz2 cd ffmpeg ./configure --enable-libmp3lame make make install