Trouble using Weylus and VAAPI

When using the Weylus application, I’m getting errors when trying to use their VAAPI feature.

[AVHWDeviceContext @ 0x7fd50c001a40] libva: dlopen of /usr/lib/dri/radeonsi_drv_video.so failed: /usr/lib/dri/radeonsi_drv_video.so: wrong ELF class: ELFCLASS32
[AVHWDeviceContext @ 0x7fd50c001a40] Failed to initialise VAAPI connection: -1 (unknown libva error).

This is my hardware

CPU: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8) @ 2.100GHz
GPU: AMD ATI 03:00.0 Picasso

VAAPI works fine on OpenShot and on Weylus on Ubuntu. How can I fix these errors? Why do they occur in the first place?

More details and GitHub project with the source code: Failed to initialize VAAPI connection · Issue #47 · H-M-H/Weylus · GitHub

The ffmpeg command they suggest running doesn’t work.

Wrong ELF class error suggests you have mesa-dri-drivers.i686 (32-bit) package installed but not mesa-dri-drivers.x86_64 (64-bit). Please install the other one and it should work.