FFmpeg Configure Flags for libvpx Support

To enable VP8 and VP9 video encoding and decoding in FFmpeg, you must compile it from source with specific configuration flags. This article provides the exact configure flags needed to enable libvpx support, lists the necessary system dependencies, and provides a practical compilation command.

The Essential Configure Flag

The primary flag required to enable VP8 and VP9 support in FFmpeg is:

This flag instructs the FFmpeg build system to look for and link against the external libvpx library during compilation.

When configuring FFmpeg with external libraries, you typically include several helper flags to ensure a successful build:

Prerequisites

Before running the configure script, you must install the libvpx development headers on your system.

Example Configuration Command

Once the prerequisites are installed, navigate to your FFmpeg source directory and run the following configure command:

./configure \
  --enable-gpl \
  --enable-libvpx \
  --enable-pkg-config

After the configuration script completes without errors, compile and install FFmpeg by running:

make -j$(nproc)
sudo make install

To verify that libvpx was enabled successfully, run the following command in your terminal:

ffmpeg -encoders | grep vpx

You should see both libvpx-vp8 and libvpx-vp9 listed in the output, confirming they are ready for use.