See review D24062 for the patch. Hardware video decoding how-to: 0. (optional, hybrid VP9 on Skylake) Build libva-intel-driver with HYBRID=on then export LIBVA_DRIVER_NAME=i965 1. Start a Wayland compositor e.g., Sway 2. Enable native Wayland support: export MOZ_ENABLE_WAYLAND=1 3. Enable WebRender: export MOZ_WEBRENDER=1 or gfx.webrender.all=true in about:config 4. Enable VAAPI: widget.wayland-dmabuf-vaapi.enabled=true in about:config 5. Disable bundled FFmpeg: media.ffvpx.enabled=false in about:config 6. Play a H.264 or VP9 video e.g., https://www.youtube.com/embed/hVvEISFw9w0 ?. Diagnose via export MOZ_LOG=PlatformDecoderModule:5 (look for "VA-API" string) On X11 just run Firefox within a Wayland compositor nested on top of xorg-server e.g., $ cat /tmp/sway.conf exec firefox https://www.youtube.com/embed/hVvEISFw9w0 $ MOZ_LOG=PlatformDecoderModule:5 sway -c /tmp/sway.conf |& fgrep VA-API [Child 6778: MediaPDecoder #2]: D/PlatformDecoderModule Initialising VA-API FFmpeg decoder [AVHWDeviceContext @ 0x83063cac0] libva: VA-API version 1.6.0 [Child 6778: MediaPDecoder #2]: D/PlatformDecoderModule VA-API FFmpeg init successful [Child 6778: MediaPDecoder #2]: D/PlatformDecoderModule Choosing FFmpeg pixel format for VA-API video decoding.
(In reply to Jan Beich from comment #0) > $ cat /tmp/sway.conf > exec firefox https://www.youtube.com/embed/hVvEISFw9w0 > > $ MOZ_LOG=PlatformDecoderModule:5 sway -c /tmp/sway.conf |& fgrep VA-API For nesting Cage maybe more convenient than Sway e.g., $ MOZ_LOG=PlatformDecoderModule:5 cage -d firefox https://www.youtube.com/embed/hVvEISFw9w0 |& fgrep VA-API
(In reply to Jan Beich from comment #0) > 3. Enable WebRender: export MOZ_WEBRENDER=1 or gfx.webrender.all=true in about:config WebRender doesn't provide optimal performance yet. VAAPI will work with legacy OpenGL as well e.g., $ export MOZ_ACCELERATED=1 $ unset MOZ_WEBRENDER or in about:config layers.acceleration.force-enabled=true gfx.webrender.all=false
> Disable bundled FFmpeg: media.ffvpx.enabled=false in about:config Huh, never had to do this step (with my own builds of Firefox at least), why was that necessary for you? Actually I just noticed that my sandboxing work has been preventing mozavcodec/util from loading :D but without sandboxing and without this pref tweak VAAPI still works.
(In reply to Greg V from comment #3) > why was that necessary for you? ffvpx doesn't have VAAPI-based VP9 decoder. See https://bugzilla.mozilla.org/show_bug.cgi?id=1619258#c2
A commit references this bug: Author: jbeich Date: Tue Mar 31 20:32:41 UTC 2020 New revision: 530013 URL: https://svnweb.freebsd.org/changeset/ports/530013 Log: www/firefox: update to 75.0 Changes: https://www.mozilla.org/firefox/75.0/releasenotes/ PR: 244793 Security: 98c69f9a-856b-4180-8f0b-11846626c6cc Differential Revision: https://reviews.freebsd.org/D24062 Changes: head/Mk/bsd.gecko.mk head/www/firefox/Makefile head/www/firefox/distinfo head/www/firefox/files/patch-bug1594027 head/www/firefox/files/patch-bug1607052 head/www/firefox/files/patch-bug1612377 head/www/firefox/files/patch-bug1619258
Just updated; now cannot load anything that uses the network connection. The tab processes just hang.
(In reply to Charlie Li from comment #6) Provide more details. Works fine on 11.3 i386.
(In reply to Jan Beich from comment #7) Turns out it was an add-ons issue on my end. Sorry for the noise.