Enabling HW Acceleration - YouTube drops frames

Hi,

I am quite new to Fedora & tried to play some YouTube videos. However, I realized that a lot of frames were dropped as soon as I started watching in higher qualities (starting with 1080p50).

I soon realized that it has to do with HW acceleration (I am using a RX460 which should easily handle playing back these files).

I’ve already tried the usual fixed (installing mesa-va-drivers-freeworld and mesa-vdpau-drivers-freeworld from RPMFusion). However, this still leads to the following result in Firefox:

Bildschirmfoto vom 2024-06-18 13-56-03

Did I do something wrong? Is there a fix for this?

Edit 1: I got H264 working (see comment).

However, VP9 and VP8 doesn’t work. I think this is a more fundamental problem, as they are not even showed in vainfo:

trying display: wayland
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib64/dri-nonfree/radeonsi_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/radeonsi_drv_video.so
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.21 (libva 2.21.0)
vainfo: Driver version: Mesa Gallium driver 24.1.1 for AMD Radeon RX 460 Graphics (radeonsi, polaris11, LLVM 18.1.6, DRM 3.57, 6.9.4-200.fc40.x86_64)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc

Did you remove the default mesa-va-drivers after installing mesa-va-drivers-freeworld and mesa-vdpau-drivers-freeworld from RPMFusion?

I used the swap command - however, I don’t know how to check whether the packages are still installed. Is there an easy command for this?

P.S.: I just got H264 hw acceleration to work by setting media.ffmpeg.vaapi.enabled to true in about:config.

Does this help to somehow also get the others (especially VP9) to work?

2 Likes

You can check the about:config & about:support to see what is/not supported. Also which GPU is being used.

about:config here :

about:support here:

Thanks for the quick reply! The about:config settings are the same for me (that’s how i got h264 hardware acceleration to work).

For me, vp8 and vp9 has the following value in about:support:

env blocklisted #BLOCKLIST_FEATURE_FAILURE_VIDEO_DECODING_MISSING Blockiert; Fehlercode FEATURE_FAILURE_VIDEO_DECODING_MISSING

However, I think this is because vp8 and vp9 decoding is not supported by the RX460. Is this true?

If you, can post inxi -FGxx, and you can enable it in Firefox with some tweaks. . .

I have Intel UHD 630 and have this:

Codec Name Software Decoding Hardware Decoding
H264 Supported Unsupported
VP9 Supported Supported
VP8 Supported Supported
AV1 Supported Unsupported
HEVC Unsupported Unsupported
Theora Supported Unsupported
AAC Supported Unsupported
MP3 Supported Unsupported
Opus Supported Unsupported
Vorbis Supported Unsupported
FLAC Supported Unsupported
Wave Supported Unsupported

(I’m surprised copy/pasting as-is formatted a nice table :stuck_out_tongue:)

No RPM Fusion or freeworld. A 4K video on YT shows Video acceleration usage in intel_gpu_top.


Do AMD Polaris GPUs have HW accelerated VP9 decoding? : linuxquestions claims no HW-acceleration for VP9 on Polaris (RX 460)

VP8 is no here, and VP9 is Navi or RDNA under VA-API decoding: Hardware video acceleration - ArchWiki

There’s a browser extension to force YouTube videos to H264; that might be useful to force acceleration if you can get it hardware-accelerated (likely from the freeworld package)