vdpau and VA-API: wrapper drivers?

While working on the graphics card detection, I am not sure what to do with the vdpau and VA-API things.

These get more and more commonly used, now even Firefox seems to support that kind of hardware video acceleration (link in German, link).
Another example is VLC, an old user of VA-API, and now supports even VDPAU out of the box, as it is more effective than VA-API.
There are other applications that use VA-API, but not VDPAU yet, and vice versa, and in the Linux world there exist wrapper/converter-drivers in both directions.

Regarding such drivers on FreeBSD, my searches were unsuccessful.
If possible, I would love to automatically install the complement driver for the cards' generic driver, so that all applications can use hardware acceleration, no matter which of both interfaces they use.

Does anybody know of or even have experience with wrapper drivers VA-API->VDPAU and vice versa on FreeBSD?
 
First things first, there is already a wrapper for VA-API on BSD Ports -> https://www.freshports.org/multimedia/libva

Firstly, open Firefox and go to about:config in url bar. Click on “Accept the Risk and Continue”. Then search for following keys, enable or disable them one by one:


  • media.ffmpeg.vaapi.enabled set to true
  • media.ffvpx.enabled set to false.
  • media.rdd-vpx.enabled set to false.
  • media.navigator.mediadatadecoder_vpx_enabled set to true.
  • If you experience page crashes, try setting security.sandbox.content.level to 0.
In FreeBSD 13 there are some users that make this work -> https://www.reddit.com/r/freebsd/comments/igq5xd/confirmed_working_on_freebsd_130_current_firefox/

6qic57jt89j51.png


For Chrome, you will need the Chromium latest package, you can grab this one from pkg or ports it's up to you, after that create a file called chrome-flags.conf inside the '.config' folder in your home directory and put this content in to it:

--disable-features=UseChromeOSDirectVideoDecoder
--ignore-gpu-blocklist
--enable-accelerated-2d-canvas
--enable-accelerated-video-decode
--enable-accelerated-mjpeg-decode
--enable-drdc
--enable-gpu-compositing
--enable-native-gpu-memory-buffers
--enable-gpu-rasterization
--enable-raw-draw
--enable-zero-copy
--enable-features=UnexpireFlagsM90,ParallelDownloading,VaapiVideoEncoder,VaapiVideoDecoder

Additional tip: If you need to enforce Dark mode on Chromium just copy the .desktop to .local/share/applications and add this flag to the end of the Exec command:

--force-dark-mode

I hope this information can be useful to you and others!

Edit: This configurations will only works on Chromium on Xorg envs.
 
Top