Fedora supports Chromium through VAAPI support. The following is how to enable hardware accelerated video decoding

Chrome is Update Patch enabled in Fedora VAAPI (Video acceleration API) support. When using VAAPI, video playback should be smoother while using less CPU and improving power consumption.
Although this patch is Refused Provided by upstream Chromium maintainers, there are many third-party software packages, including VAAPI patches for Ubuntu, Arch Linux, And others. Now, Fedora includes this feature by default!
Why is this so important? For example, my laptop (using Chromium on Fedora 29) consumes a lot of CPU when playing YouTube videos, which causes it to become very hot and also consumes battery power:

This is the same video / Fedora laptop, but this time using Chromium enabled hardware accelerated video decoding (VAAPI), showing lower CPU usage:CPU usage Chromium VAAPI Fedora

Another screenshot shows the difference in CPU usage when playing video with Firefox, Chromium without VAAPI patch and Chromium with VAAPI. fedoramagazine.org (Source: Tobias Wolfshappen):Fedora supports Chromium through VAAPI support. The following is how to enable hardware accelerated video decoding

For AMD graphics cards, Chromium should use hardware accelerated video decoding by default, but not for Intel graphics cards, which requires libva-intel-driver RPM Fusion software package. As for Nvidia, I ’m not sure, because my Fedora laptop uses Intel graphics. But you will most likely need a patched vdpau-va-driver to make it work, just like Ubuntu. But for Intel and AMD graphics, if I want to enable hardware accelerated video decoding for h264 video, I will need to install something else. This is because the Fedora Chromium build does not support h264 by default.
Some older GPUs do not support hardware decoding of VP8 / VP9 codec. There is nothing you can do about it-in this case, VP8 / VP9 video will not be accelerated by hardware.
By default, a website that uses VP8 / VP9 is YouTube. However, YouTube may be forced to use h264 instead of VP8 / VP9, ​​thereby obtaining hardware-accelerated video decoding. How to enable hardware accelerated video decoding on Fedora with Intel graphics, and enable it for both h264 video, Intel and AMD graphics, and how to force YouTube to use h264 instead of VP8 / VP9. You will also find instructions on how to check if Chromium is using hardware accelerated video decoding.

  • Add from VAAPI patch chromium 71 in Fedora, so you need this version or higher (available in Fedora Rawhide and Fedora 29 to test Fedora 28 and EPEL 7)
  • You need (?) Xorg session to use VAAPI with Chromium browser (For GDM / GNOME users, please click Sign In Click the button on the login screen and select GNOME on Xorg). My laptop with Intel graphics cannot use the VAAPI under Wayland (XWayland) in Fedora 29, but I am not entirely sure whether the same is true for AMD graphics.

I. AMD / Intel graphics: enable RPM Fusion and install chromium-libs-media-freeworld Used for h264 support.
See These instructions Used to install the RPM Fusion repository (download and install the Fedora version software package or follow the command line instructions). After enabling RPM Fusion, please install chromium-libs-media-freeworld Package on your Fedora system:

sudo dnf install chromium-libs-media-freeworld

two. AMD / Intel Graphics: Force YouTube to use h.264 instead of VP8 / VP9.
Install h264ify Chrome extension can force YouTube to stream h.264 video instead of VP8 / VP9 video.
This is because, as I mentioned above, many GPUs do not support hardware decoding of VP8 / VP9 codecs, and YouTube uses these decoders by default. Intel graphics only: installation libva-intel-hybrid-driver with libva-intel-driver Software package from RPM Fusion to obtain Chromium to use VAAPI.

sudo dnf install libva-intel-driver libva-intel-hybrid-driver

As a side note, Hardware-accelerated video decode with Hardware-accelerated mjpeg decode for captured frame These flags are enabled by default in Fedora Chromium builds, so you do n’t need to manually enable these flags.

How to check if Chromium is using GPU video decoding

Fedora Chromium GPUVideoDecoder

To check if Chromium is using GPU video decoding, first play the video on YouTube. Next, open a new tab in Chromium and enter the following in the URL bar: chrome://media-internals
In chrome://media-internals Tab, click the video URL (to expand it), scroll down and click Player Properties, You should find video_decoder Attributes. in case video_decoder Value is GpuVideoDecoder, It means that the video currently playing on YouTube on other tags is using hardware accelerated video decoding. When playing videos, you should also notice that the CPU usage in Chromium is greatly reduced.
If FFmpegVideoDecoder Or VpxVideoDecoder, Accelerated video decoding does not work properly, or you may forget to install (or disable) the h264ify Chrome extension or chromium-libs-media-freeworld RPM Fusion software package.

Source

Sidebar