Decoding videos in Firefox with VA-API
Full Potential

© Photo by Joshua Earle on Unsplash
Today's graphics cards not only specialize in quickly drawing graphics on the screen, but they can also speed up video playback, reducing the CPU's load. While Firefox supports this optimization, you must manually enable hardware acceleration to quickly decode video on the browser.
For awhile, graphics cards have contained dedicated components for decoding and encoding video formats such as MPEG2, H.264, and H.265. In chip developer jargon, these embedded units are called application-specific integrated circuits (ASICs) [1].
CPUs without ASICs have a hard time decoding videos. However, graphics cards with their specialized circuits can decode video even on low-powered systems like the Raspberry Pi without jerking and with lower power consumption, thus shifting some of the load off the main processor. Lower power consumption means longer battery life and less heat generated, which in turn makes the system quieter.
Interface
On Linux, programs access the graphics chip's acceleration functions via the Video Acceleration API (VA-API) [2]. The vainfo
tool (included in the vainfo or libva-utils packages) shows you the algorithms supported by the graphics card. The VLD
suffix indicates the decoding capability, while EncSlice
denotes the encoding capability.
[...]
Buy this article as PDF
(incl. VAT)