Firefox 43 can use FFmpeg directly
Starting with version 43, Firefox on Linux can use FFmpeg directly if installed in your system. I noticed the change when sites that served HTML5 video only in H.264 started working, to my surprise, after updating Firefox, without any other change in my system.
Firefox will mainly use FFmpeg to decode H.264 video or AAC audio and other patented video or audio formats in HTML5. Support for WebM-related formats was already provided by libvpx.
For many people, this is a small change they will not perceive. They may be playing H.264 already in Firefox. Firefox used GStreamer when available, and the GStreamer Libav plugin allowed playing H.264 content. In Fedora, the plugin could be installed from RPMFusion.
However, I view this as a big change for several reasons.
First, FFmpeg (or Libav, I’m an outsider in the controversy) is becoming the de-facto system library for multimedia content on Linux. The change emphasizes this fact even more. Just like Firefox can use system codecs in Android or Windows, in Linux it will use FFmpeg without intermediaries. Even better, Firefox will not depend directly on it via dynamic linking. For maximum flexibility, it will dynamically load the library when present. This allows anyone to run Firefox in an system without FFmpeg, with an FFmpeg version supporting free formats only or with an FFmpeg version that has been built with support for every conceivable format under the Sun, including patented ones.
Second, GStreamer had two major incompatible versions released: 0.10 and 1.0. FFmpeg was available as a plugin with version 0.10, but version 1.0 started using Libav, and it was embedded instead of using the system-wide Libav. By using FFmpeg directly, Firefox removes one intermediary, makes life easier for packagers and makes it simpler to have H.264 support.
I have blogged in the past about my preference for avoiding third party repositories if possible and building my multimedia toolchain by hand. FFmpeg is, of course, an integral part of the toolchain. I try to use programs that work well with it, directly, and do not ship an embedded version, so I have a single copy of the libraries in my system. That’s why I use mpv or MOC. From that point of view, I’m very happy Mozilla made this change as it’s moving the ecosystem in a direction I like.
FFmpeg includes decoders for many video and audio formats out of the box, and can be installed on any system with barely anything more than a C compiler and the nasm assembler. On the other hand, the GStreamer route implied installing a bunch of packages from RPMFusion or building GStreamer yourself with plugins enabled and splitting the compilation results like RPMFusion does. I dream of a world where every program handling multimedia content uses FFmpeg when available by loading the library in run-time, so the only thing I have to do is build and install FFmpeg. This gets me one step closer to that world.