All going well, Mozilla Firefox 116 will include hardware accelerated video decoding on the Raspberry Pi 4.

Current stable builds of the famed FOSS browser use software decoding for video playback on the Raspberry Pi 4. While this works it does result in high CPU usage which, if viewing HD and/or high-frame rate content, can result in lag, stuttering, and dropped frames.

Not ideal.

Hardware-accelerated video decoding in Firefox uses VA-API (via FFmpeg) on Linux. This works for traditional computing platforms with traditional graphics cards (Intel, etc) but not the Raspberry Pi.

Thing is, the Raspberry Pi 4 supports hardware accelerated video decoding and encoding, using a Linux kernel API called Video4Linux Memory-to-Memory (V4L2-M2M). Thus, Firefox developers have been working hard to add support for V4L2-M2M to Firefox’s ARM builds.

And now, according to the bug report tracking their effort, it’s ready for roll-out.

Nightly builds of Firefox have had hardware accelerated playback working for h.264 video on the Raspberry Pi 4 for a while. The testing has (presumably) gone well so the feature is being readied for release in Firefox 116, due for release in early August.

It’ll be a while before this feature filters down to Firefox ESR (the version used by the Debian 11-based Raspberry Pi OS). And since there are no pre-compiled nightly builds of Firefox available for ARM, neither I nor you can get an early hands-on to see how well it works.

But I’m super excited this is coming.

I must point out that, for now, this only covers video decode (i.e. playback) but work to extend it to support video encoding is underway.

Also, this is h2.64 only for the moment. Hardware accelerated VP8/VP9 decoding is the next goal and will help bring Firefox’s media capabilities on the Raspberry Pi 4 in-line with other platforms.