cd ~/ffmpeg_sources
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --extra-libs=-lpthread \
  --extra-libs=-lm \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libfdk_aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  --enable-nonfree
make
make install
hash -d ffmpeg
Requires ffmpeg to be configured with --enable-gpl --enable-libx265.

cd ~/ffmpeg_sources
git clone --branch stable --depth 2 https://bitbucket.org/multicoreware/x265_git
cd ~/ffmpeg_sources/x265_git/build/linux
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make
make install
Requires ffmpeg to be configured with --enable-gpl --enable-libx264.

cd ~/ffmpeg_sources
git clone --branch stable --depth 1 https://code.videolan.org/videolan/x264.git
cd x264
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
make
make install
Requires ffmpeg to be configured with --enable-libfdk_aac (and --enable-nonfree if you also included --enable-gpl).

cd ~/ffmpeg_sources
git clone --depth 1 https://github.com/mstorsjo/fdk-aac
cd fdk-aac
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
Requires ffmpeg to be configured with --enable-libmp3lame.

cd ~/ffmpeg_sources
curl -O -L https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
tar xzvf lame-3.100.tar.gz
cd lame-3.100
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm
make
make install
Requires ffmpeg to be configured with --enable-libopus.

cd ~/ffmpeg_sources
curl -O -L https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
tar xzvf opus-1.3.1.tar.gz
cd opus-1.3.1
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
Requires ffmpeg to be configured with --enable-libvpx.

cd ~/ffmpeg_sources
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm
make
make install
An assembler used by some libraries. Highly recommended or your resulting build may be very slow.

cd ~/ffmpeg_sources
curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.bz2
tar xjvf nasm-2.15.05.tar.bz2
cd nasm-2.15.05
./autogen.sh
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
make
make install
Then run ./configure, make, and make install as shown in the Install libvpx section.

rm -rf ~/ffmpeg_sources/ffmpeg
Get the dependencies. These are required for compiling, but you can remove them when you are done if you prefer (except make; it should be installed by default and many things depend on it).

# yum install autoconf automake bzip2 bzip2-devel cmake freetype-devel gcc gcc-c++ git libtool make pkgconfig zlib-devel

Recommend

FFMPEG Compile FFmpeg on CentOS Compilation & Installation libvpx

FFMPEG Compile FFmpeg on CentOS Compilation & Installation libopus

FFMPEG Compile FFmpeg on CentOS Compilation & Installation libmp3lame

FFMPEG Compile FFmpeg on CentOS Compilation & Installation libfdk_aac

FFMPEG Compile FFmpeg on CentOS Compilation & Installation libx265

FFMPEG Compile FFmpeg on CentOS Compilation & Installation libx264

FFMPEG Compile FFmpeg on CentOS Compilation & Installation NASM

FFMPEG Compile FFmpeg on CentOS Get the Dependencies

FFMPEG CompilationGuide/Haiku–FFmpeg Configuring

FFMPEG CompilationGuide/Haiku–FFmpeg Setting paths for hybrid build

FFMPEG CompilationGuide/Haiku–FFmpeg Getting FFmpeg source

FFMPEG CompilationGuide/Haiku–FFmpeg Installing required components

FFMPEG MinGW/FFmpeg installation guide Installing Requirements MSys Option 2: MSYS2

FFMPEG MinGW/FFmpeg installation guide Installing Requirements MinGW Option 2: MinGW mainline

FFMPEG MinGW/FFmpeg installation guide Installing Requirements MinGW Option 1: MinGW-w64

FFMPEG Cross Compiling for Windows Compile FFmpeg

FFMPEG CompilationGuide/vcpkg–FFmpeg Context Navigation

FFMPEG Cross-Compiling openSUSE 13.1

FFMPEG Reverting Changes made by this Guide

FFMPEG Updating FFmpeg

FFMPEG Compilation & Installation Documentation

FFMPEG Compilation & Installation FFmpeg

FFMPEG Compilation & Installation libdav1d

FFMPEG Compilation & Installation libsvtav1

FFMPEG Compilation & Installation libaom

FFMPEG Compilation & Installation libopus

FFMPEG Compilation & Installation libfdk-aac

FFMPEG Compilation & Installation libvpx

FFMPEG Compilation & Installation libx265

FFMPEG Compilation & Installation libx264

FFMPEG Compilation & Installation NASM

FFMPEG Get the Dependencies

FFMPEG CompilationGuide/macOS–FFmpeg Compiling FFmpeg yourself Compiling

FFMPEG CompilationGuide/macOS–FFmpeg Compiling FFmpeg yourself Freetype

FFMPEG CompilationGuide/macOS–FFmpeg Compiling FFmpeg yourself Manual install of the dependencies without Homebrew Pkg-config & GLib

FFMPEG CompilationGuide/macOS–FFmpeg Compiling FFmpeg yourself Installing dependencies with Homebrew

FFMPEG CompilationGuide/macOS–FFmpeg Compiling FFmpeg yourself Xcode

FFMPEG CompilationGuide/macOS–FFmpeg ffmpeg through Homebrew Updating ffmpeg

FFMPEG CompilationGuide/macOS–FFmpeg ffmpeg through Homebrew Additional options

FFMPEG CompilationGuide/macOS–FFmpeg ffmpeg through Homebrew

FFMPEG CompilationGuide/macOS–FFmpeg ffmpeg through MacPorts

FFMPEG CompilationGuide/MSVC–FFmpeg Compiling FFmpeg with external libraries libopenh264

FFMPEG CompilationGuide/MSVC–FFmpeg Compiling FFmpeg with external libraries libx264

FFMPEG CompilationGuide/MSVC–FFmpeg Build Debug Builds

FFMPEG CompilationGuide/MSVC–FFmpeg Build Problem solving

FFMPEG CompilationGuide/MSVC–FFmpeg Build

FFMPEG CompilationGuide/MSVC–FFmpeg Setting the environment

FFMPEG CompilationGuide/RaspberryPi–FFmpeg Cross-compiling FFmpeg for Raspbian Compiling FFmpeg FFmpeg with libaacplus, libx264 and alsa-lib

FFMPEG CompilationGuide/RaspberryPi–FFmpeg Cross-compiling FFmpeg for Raspbian Compiling FFmpeg Basic FFmpeg, without additional libraries

FFMPEG CompilationGuide/RaspberryPi–FFmpeg Cross-compiling FFmpeg for Raspbian Compiling FFmpeg

FFMPEG CompilationGuide/RaspberryPi–FFmpeg Cross-compiling FFmpeg for Raspbian Compiling additional libraries needed for FFmpeg Compiling ALSA library

FFMPEG CompilationGuide/RaspberryPi–FFmpeg Cross-compiling FFmpeg for Raspbian Compiling additional libraries needed for FFmpeg Compiling libx264

FFMPEG CompilationGuide/RaspberryPi–FFmpeg Cross-compiling FFmpeg for Raspbian Compiling additional libraries needed for FFmpeg Compiling libaacplus

FFMPEG CompilationGuide/RaspberryPi–FFmpeg Cross-compiling FFmpeg for Raspbian Preparing the environment Quick test of the toolchain

FFMPEG CompilationGuide/RaspberryPi–FFmpeg Cross-compiling FFmpeg for Raspbian Preparing the environment Building the toolchain

FFMPEG CompilationGuide/RaspberryPi–FFmpeg Cross-compiling FFmpeg for Raspbian Preparing the environment Building the crosstool-ng

FFMPEG Windows Store Certification, File I/O, and Other Details

FFMPEG Compiling for Windows 8.1 Windows Store 8.1 ARM (Windows 8.1 ARM in Visual Studio)

FFMPEG Compiling for Windows 8.1 Windows Store 8.1 x64 (Windows 8.1 x64 in Visual Studio)

FFMPEG Compiling for Windows 8.1 Windows Store 8.1 x86 (Windows 8.1 Win32 in Visual Studio)