The Video Acceleration API, developed by Intel, has been enjoying widespread support in a variety of software, including the latest versions of Mozilla Firefox. The VA-API is an API for hardware acceleration that allows a computer to offload video decoding and encoding tasks to a system's video card, a task that historically has taken place in the CPU.

In this guide, we'll talk about Firefox's VA-API setting. This will include a brief introduction to what it is and how it works, as well as how to enable or disable the setting on a Linux system. Keep reading if you want to give the VA-API setting a try, potentially speeding up your web browser's video playback a great deal.

In this tutorial you will learn:
  • What is Video Acceleration API in Firefox?
  • How to enable or disable VA-API
VA-API setting enabled in Firefox on Linux
VA-API setting enabled in Firefox on Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux distro
Software Mozilla Firefox
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

What is Video Acceleration API?

Modern graphic cards (GPUs) are much better at processing videos than CPUs. Developers have begun to harness the power of GPUs through hardware acceleration, a process of offloading CPU tasks into the GPU. In order for this to happen, software needs an API through which it can communicate to the video card.

That's where Intel's VA-API comes in. Support for this API is broadening, with implementation into many popular software applications. As far as hardware goes, there's support on Intel, AMD, and NVIDIA. However, there's no support in proprietary NVIDIA drivers.

As long as you have a modern GPU with support for VA-API, you can utilize the feature in Firefox by simply enabling a setting. In the context of Firefox, you'll most likely notice a difference in how quickly videos (like on YouTube, Vimeo, etc.) are decoded. Hardware acceleration is still relatively new and experimental in many aspects, so it's recommended to try the setting out and see how it performs on your system. You can always disable it afterwards, if you want.

The benefits of the VA-API and the process for enabling it are quite similar to Firefox hardware acceleration on Linux, so be sure to check out that guide as well.


SUBSCRIBE NEWSLETTER & RSS
Subscribe to RSS and NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


Enable or disable VA-API in Firefox

If you haven't already installed Firefox, see our guide for downloading and installing Firefox on Linux.

  1. Start by launching Firefox. We'll need to access the advanced configuration options, which can be opened by entering about:config in the address bar. You may be warned that you're about to access some advanced configuration preferences - just click "accept the risk and continue."

    Proceed to the Advanced Preferences menu of Firefox
    Proceed to the Advanced Preferences menu of Firefox
  2. In the preferences search bar, type vaapi. You should get two search results, media.ffmpeg.vaapi-drm-display.enabled and media.ffmpeg.vaapi.enabled. They will say "false" if the setting is disabled, and "true" if it's enabled. To toggle these settings on or off, click the right most icon, indicated with an arrow in the screenshot below. Be sure to enable both if you are turning this setting on.

    The VA-API options found in Firefox Advanced Preferences menu
    The VA-API options found in Firefox Advanced Preferences menu
  3. Once it's been toggled on (or off, if you prefer), close all Firefox instances and open the browser back up.

With VA-API enabled, try resuming your normal video watching activities. You will hopefully notice a performance improvement when it comes to playing videos, such as the time it takes to process playback and the amount of CPU usage your system incurs. If your system is exhibiting problems with the new setting, you can always follow the same instructions above to toggle the setting off again.

Conclusion

In this guide, we saw the step by step instructions for enabling or disabling VA-API in Mozilla Firefox on Linux. We also learned about what VA-API is and why you may wish to use it with Firefox. For further tinkering with Firefox, check out our guide on Firefox and the Linux command line.

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.