Skip to content

Instantly share code, notes, and snippets.

@icaliman
Created March 28, 2015 14:55
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save icaliman/1ee56b7f3ed5abf0dec1 to your computer and use it in GitHub Desktop.
Save icaliman/1ee56b7f3ed5abf0dec1 to your computer and use it in GitHub Desktop.
Install latest ffmpeg on Centos with libmp3lame enabled
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Centos
# Inspired from https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
# Get the dependencies:
sudo yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
# Install libmp3lame
cd ~/ffmpeg_sources
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
make distclean
# Install ffmpeg
cd ~/ffmpeg_sources
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--bindir="$HOME/bin" \
--enable-libass \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libtheora \
--enable-libvorbis
make
make install
make distclean
hash -r
@levelKro
Copy link

levelKro commented Dec 8, 2019

Must install libass, libtheora and libvorbis for CentOS 7 x64 Minimal before compile lame mp3 and ffmpeg.
yum install libass libass-devel libtheora libtheora-devel libvorbis libvorbis-devel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment