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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
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