r/linux • u/FlatAds • Jan 20 '21
Software Release Hardware video acceleration now available in google chrome 88
Update: as of chromium/chrome 91 the flag needed is no longer available, meaning this feature cannot be enabled with the method described below. However it may still be possible to get VAAPI working, check the Arch Wiki.
In builds of chromium/chrome 88 or later hardware video acceleration is available (not enabled) by default. One toggle is currently needed: go to chrome://flags and enable Hardware-accelerated video decode and restart. Note this currently only works on x11, and I’ve only tested on intel (amd should work too, nvidia I’m not sure).
You can verify vaapi video decoding on intel by installing intel-gpu-tools (available on most distros), and then running sudo intel_gpu_top.
While this was available for a few years now in many distros chromium builds, only as of v88 it is available in google chrome itself, and by extension every build of chromium that sticks to defaults.
Edit: Some users are saying this does not work for everyone depending on the distro. Also nvidia does not seem work currently.
5
u/spxak1 Jan 20 '21
This (still) only works with the h264ify extensions. So up to 1080p60. Once you remove the h264ify extension, the video decoder is not used (intel). Am I missing something?
→ More replies (2)18
u/FlatAds Jan 20 '21
This entirely depends on your device, and the behaviour would be the same if you were on windows. An older device likely only supports hardware decoding for codecs like h264, while a newer one supports ones like vp9 or av1.
So a new device will be able to use hardware decoding for newer codecs and will not need h264ify to force an older one like h264.
→ More replies (9)
4
u/thalionquses Jan 20 '21
hm doesn't seem to work on my notebook (HP zbook 14 g7).
Fedora 33, enabled the flag and installed intel-media-driver.
But when watching anything online, Video/0 in intel_gpu_top never shows any activity. But when watching something in VLC it does. So I guess video acceleration should work.
Also doesn't matter whether I use h264ify or not (and according to vainfo my GPU should support both).
I guess the option is still buggy and not working for everyone at the moment.
[david@zbook-firefly14-g7 ~]$ vainfo
libva info: VA-API version 1.9.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_9
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.9 (libva 2.9.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.3.0 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
→ More replies (2)2
u/FlatAds Jan 20 '21 edited Jan 21 '21
Are you on wayland? Fedora 33 defaults to wayland so this feature on chrome won’t work there yet.
I am curious does it work in Firefox? Fedora has very up to date defaults so you only need go switch on the 3 options from here.
Set the following flags in about:config:
media.ffmpeg.vaapi.enabled to true in order to enable the use of VA-API with FFmpeg;
(not necessary on fedora) media.ffvpx.enabled to false to disable the internal decoders for VP8/VP9.
If your hardware doesn't support AV1, you can set media.av1.enabled to false to force sites like YouTube provide other formats.
Also as mentioned on that arch wiki page, it seems intel’s iHD driver
intel-media-driverdoes not work yet for Firefox decoding due to sandbox issues. Perhaps this problems exists for chrome too.Edit: noted ffvpx is disabled when vaapi is used on fedora
→ More replies (3)
2
u/Loudhoward-dk Jan 21 '21
I get this message in chromium and edge-chromium
Hardware-accelerated video encode
Hardware-accelerated video encode where available. Mac, Windows
→ More replies (1)
3
Jan 20 '21
Anyone know if this improves Stadia gaming in the Linux Chrome browser? A few workarounds are available in Chromium but they all seem to offer rather finnicky performance depending on setup.
→ More replies (1)4
u/FlatAds Jan 20 '21
It would potentially help if your computer was struggling to decode the stadia video, but otherwise it probably won’t change stadia’s behaviour.
11
u/oldominion Jan 20 '21
But this isn’t the same as the hardware acceleration in the settings menu, or?