Chromium VAAPI-enabled snap running in Ubuntu 18.04 - notice the low CPU usage when playing a YouTube video

chrome://flags

vaQuerySurfaceAttributes

Chromium snap with VAAPI installation

candidate/vaapi

sudo snap install --channel=candidate/vaapi chromium

chrome://media-internals

chrome://media-internals

Player Properties

video_decoder

video_decoder

GpuVideoDecoder

FFmpegVideoDecoder

VpxVideoDecoder

Canonical developer Olivier Tilloy has created a VAAPI-enabled Chromium snap using the Fedora patch (which got Chromium with VAAPI support about 2 weeks ago ), and published it in a new candidate/vaapi channel. Thanks to this, Ubuntu and other Linux distributions that can enable Snap support, can easily install Chromium with Video Acceleration API enabled, which should bring smoother video playback, less CPU usage and improved power usage.Just like on Fedora, the Chromium VAAPI snap comes with the "Hardware-accelerated video decode" flag (available in) enabled by default, so you don't need to do anything to enable GPU accelerated video decoding.However, some GPUs don't support hardware acceleration for some codecs like VP8 or VP9, so in such cases hardware acceleration won't work out of the box.There's another important aspect to mention. While hardware acceleration is used by default using the Chromium VAAPI snap with Intel GPUs (and I assume AMD GPUs as well, but I can't try this out as I don't have one), that's not the case for Nvidia GPUs.If the patch used by this Ubuntu snap and by the Fedora package is similar to the one used for Chromium with VAAPI patches PPA, a patched vdpau-va-driver (which implements) is needed to enable hardware-accelerated video decoding in Chromium running on Nvidia graphics. Since this is not available directly in Ubuntu, the Chromium VAAPI snap is built without this, so hardware-accelerated video decoding doesn't work with Nvidia GPUs in this case. Either way,As an alternative, Ubuntu / Linux Mint users with Nvidia GPUs (or those that don't want to use a Chromium snap package) can install Chromium with VAAPI enabled by using a PPA , which provides a patched vdpau-va-driver.The Chromium snap with VAAPI enabled is in thesnap channel, which is not listed in Ubuntu Software, or on the Snap Store . To install it you can use the command line:On Linux distributions where snapd is not enabled by default, you can find instructions for installing / enabling it on snapcraft.io You can check if Chromium is using hardware-accelerated video decoding by observing its CPU usage when playing videos, which should be a lot lower than using standard Chromium builds. To make sure, you can open a video on YouTube, then open a new tab in Chromium and enter the following in the URL bar:On thetab, click on the video url in order to expand it, scroll down and look under, and you should find theproperty. If thevalue isit means that the video that's currently playing on YouTube in the other tab is using hardware-accelerated video decoding.If it showsor, accelerated video decoding is not working, or maybe you're using a GPU that doesn't support accelerated video decoding for VP8/VP9, and you forgot to install or disabled the h264ify Chrome extension.via Phoronix