Building FFmpeg 6.x from Source on Ubuntu 22.04.3 LTS

Instaling Required Depandencies

Begin by isntalling the essential development packages needed for compilation:

sudo apt update
sudo apt install build-essential nasm

Install video and audio codec libraries for comprehensive format support:

sudo apt install libx264-dev libx265-dev libaom-dev \
libvorbis-dev libmp3lame-dev libfdk-aac-dev libass-dev

Configuring FFmpeg Build

Navigate to the extracted FFmpeg source directory and configure the build with these options:

./configure --prefix=/usr/local/ffmpeg6.0 \
--enable-gpl \
--enable-nonfree \
--enable-libx264 \
--enable-libx265 \
--enable-libaom \
--enable-libvorbis \
--enable-libmp3lame \
--enable-libfdk-aac \
--enable-libass \
--extra-cflags="-I/usr/include" \
--extra-ldflags="-L/usr/local/lib"

Compilation and Installation

Build FFmpeg using multiple processor cores for faster compilation:

make -j$(nproc)

Install the compiled binaries to the specified directory:

sudo make install

Environment Configuration

Add FFmpeg to your system PATH by editing your shell profile:

echo 'export PATH="/usr/local/ffmpeg6.0/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Verify the installation by checking the version:

ffmpeg -version

The installed FFmpeg should now support H.264, H.265, AV1 video codecs, along with MP3, AAC, Vorbis audio formats, and ASS subtitle rendering.

Tags: ffmpeg Ubuntu source-compilation media-processing video-codecs

Posted on Fri, 15 May 2026 17:51:07 +0000 by JCF22Lyoko