Hardware Video Acceleration on Linux: VA-API in Firefox and Chrome
Watching a video should be one of the lightest things a computer does. Every modern GPU has dedicated media hardware that decodes H.264, HEVC, VP9, and often AV1 using a fraction of the power the CPU would need. When that hardware is not used, a laptop’s fans spin up, the battery drains, and 4K video stutters.
On Linux, the bridge between applications and that hardware is VA-API. This guide explains how it works, how to check it, and how to make sure your browser is using it. It is timely: Firefox 157 just added hardware AV1 decoding for WebRTC calls.
How it fits together
Browser / video player
|
VA-API (libva)
|
driver for your GPU
- Intel: intel-media-driver (iHD), or the older i965
- AMD: Mesa (radeonsi)
- NVIDIA: nvidia-vaapi-driver (translates to NVDEC)
|
GPU media engine
Our Mesa explainer and Linux GPU drivers guide cover the driver layer in more depth.
Step 1: install the driver
Intel (Broadwell and newer):
sudo apt install intel-media-va-driver # Debian/Ubuntu (non-free variant adds more codecs)
sudo dnf install intel-media-driver # Fedora (RPM Fusion)
sudo pacman -S intel-media-driver # Arch
AMD: VA-API comes with Mesa.
sudo apt install mesa-va-drivers
sudo dnf install mesa-va-drivers-freeworld # Fedora, via RPM Fusion, for H.264/HEVC
sudo pacman -S libva-mesa-driver
On Fedora, the default Mesa build omits patented codecs; the freeworld package from RPM Fusion restores H.264 and HEVC.
NVIDIA (proprietary driver):
sudo apt install nvidia-vaapi-driver
sudo dnf install libva-nvidia-driver
sudo pacman -S libva-nvidia-driver
Step 2: check with vainfo
sudo apt install vainfo # or dnf/pacman install libva-utils
vainfo
The output lists profiles and entrypoints. VAEntrypointVLD means hardware decode; VAEntrypointEncSlice means encode:
VAProfileH264High : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
If vainfo errors, the driver is missing or the wrong one is selected. You can force a driver with LIBVA_DRIVER_NAME:
LIBVA_DRIVER_NAME=iHD vainfo # Intel modern
LIBVA_DRIVER_NAME=radeonsi vainfo # AMD
LIBVA_DRIVER_NAME=nvidia vainfo # NVIDIA via nvidia-vaapi-driver
Which codecs does your GPU have?
| Codec | Intel | AMD | NVIDIA |
|---|---|---|---|
| H.264 | Everything recent | Everything recent | Everything recent |
| HEVC 10-bit | 7th gen (Kaby Lake)+ | Polaris+ | GTX 10 series+ |
| VP9 10-bit | 7th gen+ | RDNA 1+ (partial earlier) | GTX 10 series+ |
| AV1 | 11th gen (Tiger Lake)+ | RDNA 2+ | RTX 30 series+ |
YouTube serves AV1 to browsers that claim support. On a GPU without AV1 decode, the browser decodes it in software, which is the most common cause of hot laptops on YouTube. An extension such as enhanced-h264ify can block AV1 so YouTube sends VP9 or H.264 instead.
Step 3: Firefox
Firefox enables VA-API by default on Linux for Intel and AMD with working drivers. To confirm:
- Open
about:support - In Media, look at Codec Support: the Hardware Decoding column should say Supported for the codecs your GPU has
- Under Graphics, check that compositing says WebRender (hardware)
The relevant settings in about:config:
| Setting | Meaning |
|---|---|
media.ffmpeg.vaapi.enabled | VA-API decoding on (true) |
media.hardware-video-decoding.force-enabled | Override the blocklist, for testing |
gfx.webrender.all | Force hardware WebRender |
On NVIDIA with nvidia-vaapi-driver, the driver’s README lists extra variables (such as MOZ_DISABLE_RDD_SANDBOX=1 and NVD_BACKEND=direct) depending on driver version. Follow it rather than copying old forum posts.
Step 4: Chrome and Chromium
Chrome’s Linux hardware decoding has changed flags several times. Check the current state at chrome://gpu: the Video Decode line should say Hardware accelerated, and the Video Acceleration Information section lists supported profiles.
If it says software only, recent versions can usually be enabled with:
google-chrome --enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL
Flag names change between versions, so check chrome://gpu after each change rather than trusting a fixed recipe. Distribution builds of Chromium sometimes ship with different defaults than Google’s Chrome.
Step 5: verify it is really working
Play a high-resolution video, then watch the GPU’s video engine:
sudo intel_gpu_top # Intel: watch the "Video" engine
amdgpu_top # AMD: watch VCN
nvtop # NVIDIA and others: watch DEC
top # CPU usage should stay low
If the video engine is busy and the CPU is mostly idle, hardware decoding works. If the CPU is pinned and the video engine is idle, it is decoding in software. Our CPU monitoring guide and GPU temperatures with lm-sensors help measure the difference.
Flatpak, Snap, and Wayland notes
- Flatpak browsers use drivers from the Flatpak runtime. Run
flatpak updateto make sure the GL and codec extensions match your system - Snap Firefox on Ubuntu supports VA-API on Intel and AMD; if not,
snap refreshand checkabout:support - Wayland generally makes hardware decoding easier, because the decoded frames can be passed to the compositor without copies. See Wayland vs X11
Beyond browsers
Video players like mpv (--hwdec=auto) and VLC use the same VA-API stack, and media servers use it for transcoding: our Jellyfin hardware transcoding guide covers the server side.
Frequently Asked Questions
What is VA-API?
VA-API, the Video Acceleration API, is the standard Linux interface that lets applications hand video decoding and encoding to the GPU’s dedicated media hardware. Mesa provides it for AMD, Intel provides its own driver, and a community driver translates it for NVIDIA.
How do I check if hardware decoding works?
Install vainfo and run it. It lists the codecs your GPU can decode and encode. Then play a video and watch GPU video engine usage with intel_gpu_top, amdgpu_top, or nvtop, while CPU usage should stay low.
Does Firefox use hardware decoding on Linux by default?
Yes, on Intel and AMD GPUs with working VA-API drivers. You can confirm it in about:support, where the Media section lists which codecs have hardware decoding, and in about:config the media.ffmpeg.vaapi.enabled setting controls it.
Why is AV1 not hardware decoded on my laptop?
Your GPU may not have AV1 decode hardware. Intel added it with 11th generation Tiger Lake, AMD with RDNA 2, and NVIDIA with the RTX 30 series. Older GPUs fall back to software decoding, and you can install a browser extension such as enhanced-h264ify to request VP9 or H.264 instead.
Does hardware decoding work with NVIDIA?
With the proprietary driver, install the community nvidia-vaapi-driver, which translates VA-API to NVIDIA’s NVDEC. It works well in Firefox but needs some configuration. With the open source Nouveau and NVK stack, video decoding support is more limited.
Do Flatpak browsers support hardware decoding?
Yes, through the runtime’s bundled drivers and codecs. If it does not work, check that the matching GL and VA-API runtime extensions are installed with flatpak update, and that the browser has GPU access, which it does by default.