You wonder why your ~10+ years old but still perfectly fine otherwise laptop is struggling as hell every time you open Twitch or Youtube?

In Firefox-based browsers, go to your about:config, and search for those two settings:

media.av1.enabled
media.webm.enabled

And set them to false.

It'll prevent the various players to use anything but good old standard H264 codecs which most GPUs and iGPUs from the previous decade can hardware decode.

I know you have some extension to do that, but I had quite a mixed experience with those, and they're often limited to specific websites, whereas disabling AV1 and WebM at the browser level ensures it'll apply to any web video player.

EDIT: to answer the probable "do I need to do that?" question you might have, here's a quick breakdown of which kind of hardware, regarding what they can and cannot decode, could need one of the two or both.

Disabling both AV1 and WebM (format which encompasses both VP8 and VP9 codecs, the latter being unsupported by a lot of 2010s GPUs, especially on AMD's side):

  • AMD: APUs before Ryzen 2000 range (Raven Ridge), GPUs before Radeon RX 5000 series.
  • Intel: iGPUs before 7th gen CPUs with HD/Iris 6XX (Kaby Lake).
  • Nvidia: GPUs before GeForce 10 series, (except GeForce GTX 750 SE, GTX 950 and GTX 960).

Disabling AV1 only:

  • AMD: Radeon RX 5000 series (+ Radeon RX 6400 and 6500 XT).
  • Intel: 7th generation CPUs with HD/Iris Plus 6XX (Kaby Lake) to 10th generation CPUs with UHD/Iris Plus 6XX or UHD/Iris Plus GX.
  • Nvidia: GeForce 10 series (+ GeForce GTX 750 SE, GTX 950 and GTX 960) to GeForce GTX 16/RTX 20 series.

#Firefox

@transcendentempress
My laptop from 2019 with a i7-9750H and a GTX 1650 is incapable of reading AV1 without lagging. I had to configure yt-dlp not to select that format for video when downloading from youtube. It has no problem with h264 or h265.

But what does disabling webm does in firefox ?
As far as I know it's a mkv container, so it should have no relation with the video format 🤔
Most of the time yt-dlp download video (and audio) as webm before remuxing them in the same container format for the destination file. Even when excluding AV1.
Is it really necessary to disable it in firefox 🤔?

@ancilevien74 The thing is, if you don't disable the support of codecs themselves, web video players will use them by default as your CPU can always decode them in software anyway even if your GPU doesn't have hardware decoding for those. But when you're on older PCs, especially with Celeron/Pentium-class or equivalent CPUs, it can really makes the PC to struggle, so it's better for overall usage comfort to revert to codecs like H264 those chips can hardware decode with GPU.

And the best way to ensure it's always that way is to completely disable the usage of unwanted codecs at the browser level, for the various extensions like h264ify & friends work differently from what I understood, they try to trick the web player into thinking there's no support for unwanted codecs, but as it's not real disabling, websites can bypass those tricks.