Firefox's media handling has gotten significantly better over the past few years. Here's a guide to video codecs, hardware acceleration, and audio on Firefox.
Video Codec Support
Firefox supports:
- H.264: Software decode by default; hardware decode via VA-API (Linux) or platform APIs (Windows, macOS)
- VP8/VP9: Google's codecs; Firefox supports both, hardware decode available
- AV1: Open, royalty-free codec from the Alliance for Open Media; Firefox 67+ with software decode; hardware decode on newer GPUs
- HEVC/H.265: Limited — requires system codec on Windows, macOS with hardware support
Check what Firefox can play: Go to about:support → Media section, or the about:media diagnostics page.
Hardware Video Decode (VA-API on Linux)
On Linux, enabling VA-API hardware decode significantly reduces CPU usage for video (especially useful when streaming or watching high-res video while gaming or running other CPU-intensive tasks).
Enable:
about:config → media.ffmpeg.vaapi.enabled = true
Requires:
- Intel:
intel-media-driver(Broadwell and newer) orlibva-intel-driver(older) - AMD:
mesa-vaapiorlibva-mesa-driver - NVIDIA:
nvidia-vaapi-driver(community maintained)
Verify it's working: about:support → Graphics → Video Decode section → should show hardware path. Or use vainfo command to verify VA-API drivers are functional.
Also useful: enable GPU rendering alongside VA-API:
about:config → gfx.webrender.all = true
Windows Hardware Video Decode
Firefox on Windows uses DXVA (DirectX Video Acceleration) and D3D11VA for hardware decode. This is enabled by default when hardware acceleration is on.
Settings → Performance → "Use hardware acceleration when available" — ensure this is checked.
macOS Video Decode
Firefox uses VideoToolbox on macOS for hardware decode. Generally works well out of box. Check about:support → Graphics for status.
Media Autoplay
Firefox's autoplay policy: media will not autoplay unless:
- The user interacted with the page
- The video is muted (muted videos may autoplay)
- You explicitly granted autoplay permission for the site
Configure globally: Settings → Privacy & Security → Permissions → Autoplay → Settings.
Configure per-site: Click the shield icon in the address bar → "Media Autoplay" or "Permissions" → allow/block autoplay.
about:config approach:
-
media.autoplay.default: 0 = allow all, 1 = block audio (allow muted), 5 = block all -
media.autoplay.blocking_policy: 0 = use default, 1 = block all, 2 = block audio (allow muted video)
Audio
Firefox handles audio via the Web Audio API for programmatic audio, and standard <audio> elements for HTML audio.
Web Audio: Full implementation including AudioContext, AudioWorklet, spatial audio. Useful for web apps and games.
Codec support: MP3, AAC, FLAC, Ogg Vorbis, Opus, WAV.
Audio routing: Firefox respects your OS audio device settings. If you have multiple output devices, Firefox uses whatever is set as default in your OS. Some advanced audio routing (JACK on Linux, Core Audio routing on macOS) works via the OS level.
Virtual Reality and WebXR
Firefox supports WebXR for VR/AR experiences in the browser. Works with headsets that expose WebXR APIs.
about:config → dom.vr.enabled (legacy WebVR) and dom.webxr.enabled (current WebXR standard).
Media Keys
Firefox responds to media keys on keyboards (play/pause, previous/next) for any playing media. This is controlled via the Media Session API.
about:config → dom.media.mediasession.enabled — controls whether Firefox handles media key events.
Casting (Chromecast / AirPlay)
Native Chromecast/AirPlay support is not built into Firefox (unlike Chrome which has native Chromecast). Options:
- Extensions: Cast extensions are available on AMO that add Chromecast support
- Screen mirroring: Cast your entire screen from your OS (not browser-level casting)
AirPlay support in Firefox on macOS is limited — Safari handles this better on Apple platforms.
Audio Devices in WebRTC
For video calls, Firefox exposes your available microphones and speakers to sites. You can change which device is used per-call in most video call UIs, or in Firefox DevTools → Media Devices.
Default audio device: whatever is set as default in your OS. Firefox doesn't have its own audio device preference separate from the OS.
For most users, video just works in Firefox. For Linux users with VA-API support, enabling hardware decode via about:config is worth the 30 seconds it takes — the CPU reduction on video-intensive workloads is substantial.
Top comments (0)