11
December
2020
Setting up video playback in FireFox for a weak PC
10:18

Setting up video playback in FireFox for a weak PC

11 December 2020 10:18

For a colleague, I made a home computer from the organization’s decommissioned equipment (motherboard on an 865 chipset, socket 775) and upgraded the PC for little money. Due to poor performance, it was necessary to optimize the viewer settings for video playback.

Video for verification

https://www.youtube.com/watch?v=HcQJzFzZfVI

Background

The office computer had an Intel Celeron 2.5 GHz processor and an IDE hard drive. RAM 2 GB. All web pages opened for a long time and slowly - the computer was loaded at 100% when browsing the WWW. I replaced the processor with an Intel Pentium 4 with socket 775, frequency 3.2 GHz, with support for HyperThreading technology (price 300 rubles - $4.1), replaced the 80 GB IDE hard drive with a solid-state SSD 120 Gb (price 1750 rubles - $23.9). After this, web browsing began to be tolerable - without pauses for content to be displayed on the screen.

However, playback from YouTube did not satisfy me. The built-in video card in a PC in Windows 7 is defined as "Standard VGA Graphics Adapter". The external video card connector on the GA-8I865GVMK-775 motherboard is not soldered. There are only free PCI slots, but video cards for them have not been produced for a long time. Therefore, upgrading the video card is not possible. Next, I'm trying to improve the performance of my PC using system and Internet browser settings.
computer

Why did I choose the Firefox browser?

The FireFox browser is famous for its fine-tuning capabilities using about:config. Therefore, FireFox was taken as a basis. The latest version 83.0 (32-bit) was used.
Mozilla Firefox

Setting up FireFox for smooth video playback

Let's move on to the essence of the setup.

  1. The system has set the color depth to 24 bits.
  2. Installed on Windows DirectX for Windows 7 https://www.microsoft.com/ru-RU/download/details.aspx?id=34429
  3. Installed on Windows K-Lite Codec Pack Standard https://www.codecguide.com/download_kl.htm
  4. In the K-Lite Codec Pack configuration (Start - K-Lite Codec Pack - Configuration - LAV Video) in the "Hardware Acceleration" section, select the item DXVA2 (native) and saved the changes (OK). The number of threads selected is 2 (equal to the maximum number of threads that this processor supports).
    setting up k-lite codec pack
  5. Launched the FireFox browser. In the Settings menu - Performance -"Use hardware acceleration whenever possible".
    productivity
  6. Then I configured the FireFox browser (the same for Windows and Linux). Entered settings about:config
  7. Changed the following parameters:
    • layers.acceleration.force-enabled = true
    • layers.force-active = true
      config3
      These two options enable Hardware acceleration in the FireFox web browser.

      Note: on some PCs it is better to leave the default value: layers.acceleration.force-enabled=false if it reduces the CPU load.

Hardware acceleration of 2D graphics (DOM: HTML/CSS) in a web browser using an external processor (GPU) or integrated graphics card (iGPU):

  • browser.preferences.defaultPerformanceSettings.enabled= true (default)
  • gfx.webrender.all= true (instead of false)
  • gfx.webrender.software= false (default, disable software decoding)
  • layers.gpu-process.enabled= false (by default, responsible for creating a separate process)
  • layers.gpu-process.force-enabled= false (by default, responsible for creating a separate process)
  • dom.webgpu.enabled= true

Hardware acceleration of video decoding using the video card processor (GPU):

  • gfx.x11-egl.force-enabled= true
  • media.hardware-video-decoding.enabled= true (default)
    config4
  • media.hardware-video-decoding.force-enabled= true
    config5
  • media.rdd-ffmpeg.enabled= true (default)
  • widget.dmabuf.force-enabled= true
  • media.gpu-process-decoder= false (default)

Source:firefox_gpu_acceleration.shtml).

Check:
Restart the FireFox browser and log in
about:support

View parameter values

  • HW_COMPOSITING
  • WEBRENDER
  • HARDWARE_VIDEO_DECODING

Comparison "before" and "after"

CPU load decreased from 100% to 20%. Frame dropouts have become noticeably less.
video
The RuTube video on the AMC C-30 processor runs with slight jerks in 360p resolution.

A note about h.264, VP9 and WEBM formats

If, when playing a video on YouTube, especially in FullHD resolution, a reduced frame rate is observed, a possible reason is the lack of hardware decoding of the VP9 codec by the video card (used by YouTube by default since 2014). The previous method with the h264ify add-on for selecting h.264 video does not work.
ЗатGoogle has switched to broadcast video in HTML5 to the more modern WebM format, which is a container for VP8, VP9, ​​AV1 codecs. The transition to AV1 increased the requirements for the processor.

У хRuTube hosting has lower PC power requirements for decoding. RuTube video codec is H264 (MainConcept). If there is an accelerator only for h.264 and after enabling hardware acceleration in FireFox, 360p video playback works in full screen on a 2011 AMD C-30 processor (1 core, 1 thread) with a built-in AMD Radeon HD 6250 graphics accelerator. As a rule, the h.264 codec can play even old video cards 10-15 years ago.

Update from November 2025

Before starting FireFox or using the profile loading script (.bashrc)
It is recommended to set the environment variable

nano ~/.bashrc 

And add to the end of the file, for X11:

For X11:

export MOZ_DISABLE_RDD_SANDBOX=1
export MOZ_X11_EGL=1

For Wayland:

MOZ_DISABLE_RDD_SANDBOX=1
MOZ_ENABLE_WAYLAND=1

For nVidia:

LIBVA_DRIVER_NAME=nvidia

For Radeon:

LIBVA_DRIVER_NAME=radeonsi

For Intel graphics accelerators (intel-media-va-driver package for VAAPI acceleration for Intel processors generation 9 and above, such as Gen11 Rocket Lake, Alder Lake, Raptor Lake, Tiger Lake):

LIBVA_DRIVER_NAME=iHD

For old integrated graphics chipsets (Intel HD and UHD Graphics video chips for Intel processors up to the 8th generation inclusive: Sandy Bridge, Ivy Bridge, Haswell, Broadwell, Skylake, Kaby Lake, mobile Coffee Lake, Cannon Lake):

LIBVA_DRIVER_NAME=i965

Ctrl+O, Enter, Ctrl+X

Check. Log out of your session and log in again.

printenv | grep -E "MOZ|LIBVA" 

eglinfo -B | grep -C2 'EGL vendor string:'

If the driver is installed correctly and nvidia-drm.modeset=1 is enabled, it should look like this:
GBM platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES

X11 platform:
EGL API version: 1.4
EGL vendor string: NVIDIA
EGL version string: 1.4
EGL client APIs:

Device platform:
EGL API version: 1.4
EGL vendor string: NVIDIA
EGL version string: 1.4
EGL client APIs:

Recommendation for choosing a processor and video card

СраAn analysis of several PC configurations showed that programmatic playback of YouTube videos requires support for SSE4 instructions and Single Core performance (per core) of at least 2000 in the GeekBench 3 test. For example, AMD Athlon 240GE, AMD Athlon 3000G processors, which also have an integrated graphics core, are well suited.

At the same time, a “gaming” video card designed for 3D cannot cope with FullHD playback for three reasons:

  1. A significant portion of video decoding is performed on the CPU cores. See comparison http://cpuboss.com/cpus/Intel-Pentium-G840-vs-AMD-Phenom-II-X3-710- in my experience, the Pentium G840 processor with an nVidia 430 video card copes with 1920x1080 video at 30% load, while the AMD Phenom-II-X3-710 does not have an external video accelerator.
  2. The processor is required to support instructions to accelerate multimedia processing - SSE4, SSE4.1 and SSE4.2.
    Suitable processors:
    *Intel* from the "Nahalem" generation - Core i3-530 and higher - from 2012, "Sandy Bridge" Pentium G620T...G870, Core i3 2100 and higher.
    AMD** FX-4100...FX-8100 ("Bulldozer")
    *AMD FX-4300...FX-9590 ("Piledriver")
    • A4-4000...A10-6800K ("Piledriver")
    • Athlon X4 - any ("Piledriver")
    • Ryzen - any (architectures "Zen", "Zen+", "Zen2", etc.).
  3. For RuTube the video card requires support for hardware video decoding is H.264/MP4/AVC - video accelerators such as nVidia Pure Video(4 generations and above) or AMD Avivo. Suitable video cards starting from nVidia GeForce GT 240 geForce GT 220 and GeForce 210/G210("Tesla 2.0" architecture),GT 520/GT 610 and GT 530/GT 620,GT 440/GT 630("Fermi" architecture) and nVidia GeForce series 600/700("Kepler" architecture), or video cards AMD with support UVD starting with some models of the series HD 2000-AMD Radeon HD 2400,HD 2600 and HD 2900XT, subsequent AMD Radeon series **HD 3000 - HD 8000* and higher, codenames Radeon RX 200-RX 800 and newer, Radeon RX Vega radeon RX 5000/6000 and more recent. Mid-range video cards nVidia GTX 750/GTX 750Ti** and newer ones can also help a weak processor play FullHD (2K) video.
  4. For RuTube, if used built-in to processor (iGPU) video card, it is subject to the same requirements as an external one. Will fit Intel GMA X4500 and above,Intel HD Graphics "Ironlake" generation greater than or equal to 5.75 (that is, newer than 2010),Intel HD 2000(built into the Intel processor generation "Sandy Bridge") and AMD Radeon RX Vega 3(video cards built into cores Athlon 240GE,AMD Athlon 3000G and AMD Ryzen 3 3200G- 2019 and newer).
  5. For YouTube- support for hardware codec decoding is desirable VP9. Video cards NVIDIA geForce GTX 1050 Ti NVIDIA GeForce GTX 1650,AMD radeon RX 470. Processors: Intel Kaby Lake (Intel Core i3/i4/i7 7th generation, for example Core i7-7700).
  6. For YouTube and video 1080p60 and 4K/8K/HDR format AV1 (in WebM container) need modern video cards NVIDIA RTX 4070 Ti,AMD RX 7600 and higher. AV1 decoding using processors: 11th generation Intel Core ("Tiger Lake" and "Rocket Lake"), for example, Intel Core i5 11400H, Core i5 11600K;AMD- video cards and processors supporting the architecture RDNA2 and RDNA3, such as Radeon RX 6000 Series,Radeon RX 7000 Series, processors AMD Ryzen 4000(Vermeer), for example AMD 4300GE, 4300G, 4600G, 4700G, 4350G, 4650G, AMD Athlon Gold PRO 3125GE, 3150GE; laptop processor Ryzen 7840HS, mobile gaming video cards Radeon 890M and 880M.
  7. Chipset drivers and Video card driver must support hardware video acceleration. For example, on Linux Debian you will need to install special packages (more about the VA driver and VPAU drivers in Debian).

    Sources:

*https://comp-security.net/Which processors support SSE 4.1 and SSE 4.2/

*http://www.u-sm.ru/obzoryi-i-stati/na-chto-sposoben-geforce-gt-440ss-uznaem-na-primere-dvuh-kartochek-ot-otac-destroyer-i-thunder.html


Note:

  • The title of the article uses the video See You Again - Wiz Khalifa feat. Charlie Puth (Boyce Avenue feat. Bea Miller).
    All rights reserved.

Last change: 11/20/2025



Related publications