Tested with Firefox 103.1.
Use command vainfo
to check supported codecs.
Use radeontop
to check for AMD GPU usage.
Set MOZ_ENABLE_WAYLAND=1.
Automatically enables hardware WebRender and EGL.
Enable VA-API:
media.ffmpeg.vaapi.enabled true
Force hardware WebRender in case it's still disabled:
gfx.webrender.all true
Force enable EGL in case it's still disabled:
gfx.x11-egl.force-enabled true
https://addons.mozilla.org/es/firefox/addon/enhanced-h264ify/