FWIW... to check vaapi set up...
First identify your CPU architecture. Find your cpu name and look it up on intel.com
for example
$ cpuid | grep -i brand
Extended brand string: "Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz"
Chip support page is here
Browse Intel product information for Intel® Core™ processors, Intel® Xeon® processors, Intel® Arc™ graphics and more.
www.intel.com
- from that page note Code Name 'Products formerly Arrandale', this is the architecture name.
Look up the architecture name here
en.wikipedia.org
Find your codename in the list and check whether it was released before or after Broadwell. In this example Arrandale was released in 2010, before Broadwell which was released in 2014. Then choose which intel driver package to install as below.
$ pkg ins libva-intel-driver # for pre-broadwell cpus OR
$ pkg ins intel-media-driver # for broadwell and later cpus
Finally install libva tools
$ pkg ins libva-utils
Now run vainfo and check output looks reasonable. On my core i3-560m I get
$ vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_22
/usr/local/lib/dri/hybrid_drv_video.so init failed
Not using hybrid_drv_video.so
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Ironlake Mobile - 2.4.1
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
I'm not sure of the significance of the hybrid driver init failing is. But we get some valid VA entrypoints.
After doing this...
1. mpv with hwdec=vaapi works with hardware video decoding
2. in firefox, go to about:support and search for HARDWARE_VIDEO_DECODING
- if it shows 'available' as per my screenshot below, you get hardware video decode in firefox, eg for yt videos.
- you don't need to change any about:config settings (AFAIK!)
- you DO need to restart FF after installing the intel driver
So you now have hardware accelerated video decoding operational in both mpv and the firefox video player
