Configure OBS Studio VA-API Encoder on Linux

This guide provides a straightforward tutorial on how to configure OBS Studio to use the VA-API (Video Acceleration API) hardware encoder on Linux. You will learn how to verify your system’s hardware acceleration support, install the necessary drivers, and adjust the settings within OBS Studio to enable efficient, low-CPU video encoding using your AMD or Intel graphics card.

Step 1: Install VA-API Drivers

Before configuring OBS Studio, you must ensure that your Linux system has the correct VA-API drivers installed for your hardware.

For Intel Graphics: * Ubuntu/Debian: sudo apt install intel-media-va-driver-non-free vainfo * Fedora: sudo dnf install intel-media-driver vainfo * Arch Linux: sudo pacman -S intel-media-driver vainfo

For AMD Graphics: * Ubuntu/Debian: sudo apt install mesa-va-drivers vainfo * Fedora: sudo dnf install mesa-dri-drivers vainfo * Arch Linux: sudo pacman -S mesa libva-mesa-driver vainfo

Step 2: Verify VA-API Installation

To confirm that VA-API is working correctly on your system, open your terminal and run the following command:

vainfo

If configured correctly, the terminal will output a list of supported video profiles and entrypoints (such as VAEntrypointVLD and VAEntrypointEncPicture). If you receive an error, restart your system or ensure your user belongs to the video or render group.

Step 3: Configure OBS Studio

Once the drivers are verified, open OBS Studio and follow these steps to enable VA-API encoding:

  1. Click on Settings in the bottom-right corner of the OBS window.
  2. Navigate to the Output tab in the left sidebar.
  3. Change the Output Mode dropdown at the top from Simple to Advanced.
  4. Select either the Streaming or Recording tab depending on which one you want to configure.
  5. Locate the Video Encoder dropdown menu.
  6. Select H.264 / AVC Encoder (VAAPI) or HEVC / H.265 Encoder (VAAPI).

Step 4: Fine-Tune Encoder Settings

After selecting the VA-API encoder, adjust the following settings for optimal performance:

Click Apply and then OK to save your settings. OBS Studio is now configured to use your GPU for hardware-accelerated encoding on Linux.