As of this writing (2024-05), VA-API has no support for AMD's low-latency encoding mode. This is problematic for ultra low-latency applications like realtime game-streaming as implemented by Sunshine.
As a temporary fix, Mesa can be patched to unconditionally use the low-latency optimizations. This entails a higher power consumption and may not be suitable for all applications.
I'm providing a basic shell script to re-build Ubuntu's Mesa from the official source .deb
s with the necessary patch. It has only seen some light testing (22.04 only) and is provided without support. For my own usage I'm executing this script in a throw-away Incus container based on Ubuntu 22.04. The script does not clean up after itself (i.e. no purging of build dependencies etc.). **Make sure to valid