Details
-
Suggestion
-
Resolution: Fixed
-
P3: Somewhat important
-
5.15.3, 6.2.2, 6.3.0, 6.4.0
-
OS: Arch Linux
Kernel version: linux-5.11.2
qtwebengine version: 5.15.3
OpenGL: Intel, 4.6 (Compatibility Profile) Mesa 20.3.4Graphics: Device-1: Intel UHD Graphics 620 vendor: Huawei driver: i915 v: kernel
CPU: Info: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP
arch: Kaby Lake note: check family: 6 model-id: 8E (142) stepping: A (10)OS: Arch Linux Kernel version: linux-5.11.2 qtwebengine version: 5.15.3 OpenGL: Intel, 4.6 (Compatibility Profile) Mesa 20.3.4 Graphics: Device-1: Intel UHD Graphics 620 vendor: Huawei driver: i915 v: kernel CPU: Info: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6 model-id: 8E (142) stepping: A (10)
-
-
7e5ee9d6a (108-based), 1b7aaf1c7 (dev)
Description
Most Linux distros (Debian, Fedora, Arch Linux, Gentoo) now ship chromium with vaapi support enabled, which in principle allows users to make use of hardware accelerated video decoding (HAVD). This indicates that 1) builds with vaapi support are stable, and also that 2) HAVD works and is somewhat commonly used. In fact, chromium version 88 now enables the use_vaapi build flag by default. Enabling this flag is necessary (but not sufficient) to use in-browser HAVD on h264 and VP8/9 videos on Linux. To actually turn on HAVD, the user needs to supply some runtime flags to chromium (to check if HAVD is actually being used on an intel GPU, check the Video*/0 fields of intel_gpu_top). The specific set of flags one needs enable at runtime differs from system to system, but on Chromium v87 (the one shipped with the recently released qtwebengine 5.15.3) and a modern Intel GPU I only needed to use ––enable–accelerated–video–decode and --use-gl=desktop.
Enabling HAVD has been previously discussed in the context of qtwebengine (https://wiki.qt.io/QtWebEngine/VideoAcceleration and https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/209204), but these discussions/code changes seem really outdated today. Some chromium-based browsers (such as brave ) literally only enable the use_vaapi flag, and nothing more. Furthermore, HAVD on Linux has seen an increasing amount of attention in the Chromium repo, and, as I observed above, indeed seems to work without much hassle on any Intel GPU from Kaby Lake onward. Further stability of vaapi is guaranteed by the fact that Intel has been steadily working on libva and the intel-media-driver. (NVIDIA might be a different story, but, again, use_vaapi is a build-flag that doesn't affect runtime, so NVIDIA users needn't worry).
The intend of this suggestion is to prioritize support for HAVD in qtwebengine, such that qtwebengine users can benefit from performance and battery-life related improvements other chromium-based browsers have seen in the last two years. It would be lovely if you could introduce support for the use_vaapi buildflag in QT 5.15.X (or 6.X!), as watching any HD video in webengine drains a lot of battery, and uses a disproportionate amount of CPU resources.
Attachments
Issue Links
- is duplicated by
-
QTBUG-92164 QtWebEngine doesn't support hardware accelerated video playback on Linux
- Closed
-
QTBUG-84245 Add support for hardware video acceleration for embedded linux platforms
- Closed