On a fresh installation of Fedora, video streaming for many web sites does not work (things like Netflix, Amazon, etc.). To get them to work I install the ffmpeg-libs package from the RPM Fusion rpmfusion-free repositories. I noticed that the Firefox flatpak could play streaming videos out of the box. I always find issues around licensing confusing so I thought I would take this opportunity to ask about how Flathub views licensing concerns in this area (I’m not advocating for any change, just trying to understand):

From what I can tell, the Firefox flatpak mostly just drops the standard Firefox release tarball into the org.freedesktop.Platform runtime from Flathub (looking at this file). Does video playback work because org.freedesktop.Platform contains the equivalent of ffmpeg-libs from rpmfusion-free? (Note that in the commit history for the runme.sh script linked above ffmpeg-full was experimented with but I don’t think it was included in a version I tried).

Does Flathub take a similar stance to codec licensing as RPM Fusion and Ubuntu – i.e. open source codecs are freely distributable regardless of patent issues in various countries (in contrast to the stance of Fedora and Red Hat which don’t include codecs covered by patents)?

The runtime ships with openh264 which is not ideal as many (if not all) h264 videos stutter on the current version; the runtime team works on it. The ffmpeg-full extension would be an equivalent of ffmpeg-libs from rpmfusion, but applications need to opt-in to actually use it. The change has been reverted as it’s not clear whether Mozilla can use it, it’s still being discussed.

Pretty much, yes. I believe flatpak can be configured to be more strict about licensing and user/distribution can mask problematic IDs with flatpak mask command.

@barthalion Thanks for the information! One thing that was confusing me originally was that I couldn’t figure out where the org.freedesktop.Platform runtime was created because it was not in the Flathub GitHub organization. Then I discovered that the freedesktop-sdk is actually separate project hosted on GitLab. I found this yaml file which describes how the patent-free version of ffmpeg is built for the org.freedesktop.Platform runtime.

One thing that I still don’t understand is what Fedora and Red Hat’s stance is towards ffmpeg. The best I could find was Fedora’s page on software patents (can’t link to it because of the limit on the number of links but it is at fedoraproject dot org/wiki/Software_Patents) and various Red Hat bug tracker comments and support posts where they just say that Red Hat does not support ffmpeg. That is strange to me since org.freedesktop.Platform and the link I gave above show that it is possible to distribute ffmpeg in a way that does not use patent encumbered codecs. My best guess is that Red Hat does not support ffmpeg because the upstream project itself makes no effort to split out the patent encumbered codecs, so Red Hat providing a stripped down version would lead to many support requests related to missing codecs – better for users who need ffmpeg to get the full version from a third party instead.

One other thing this made me wonder about was how the org.fedoraproject.Platform runtime was built. I found this project that includes the scripts used to build it. It seems to pull data from org.freedesktop.Platform and from Fedora repos and combine them in a complicated way. I couldn’t find how it excluded ffmpeg from the result (I think it might be that it looks at every file in org.freedesktop.Platform and finds what rpm provides that files and ignores files like those of ffmpeg for which there is no corresponding rpm), but I confirmed that there were no ffmpeg files in org.fedoraproject.Platform/x86_64/f32.

My best guess is that Red Hat does not support ffmpeg because the upstream project itself makes no effort to split out the patent encumbered codecs, so Red Hat providing a stripped down version would lead to many support requests related to missing codecs – better for users who need ffmpeg to get the full version from a third party instead.

That’s pretty much how I understood their stance towards ffmpeg.

My solution was replacing the Fedora’s Firefox flatpak with Flathub one. Therefore I have no need installing 3rd party repositories in my Silverblue…

That codec absence is one of the biggest flaws of Fedora. I hope they find a way to get around it.