Description of problem: I rebased my Fedora Silverblue on Silverblue 38 beta and replaced libav*-free with ffmpeg-libs from RPM Fusion (but IIUC, the problem should be the same without RPM Fusion), and Firefox seems not to be able to use FFmpeg: ``` [yann@laptop ~]$ MOZ_LOG="PlatformDecoderModule:5" firefox [Child 32283: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in Content process [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: H264/AAC codecs unsupported without [ [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: libavcodec.so.59 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: , libavcodec.so.58 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: , libavcodec-ffmpeg.so.58 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: , libavcodec-ffmpeg.so.57 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: , libavcodec-ffmpeg.so.56 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: , libavcodec.so.57 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: , libavcodec.so.56 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: , libavcodec.so.55 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: , libavcodec.so.54 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: , libavcodec.so.53 [Child 32283: Main Thread]: D/PlatformDecoderModule FFMPEG: ] ``` After some investigations, Fedora 38 comes with the recently released FFmpeg version 6 which provides libavcodec.so.60 which Firefox doesn’t support at the time (it’s planned for Firefox 112 but Fedora 38 comes with Firefox 110): https://bugzilla.mozilla.org/show_bug.cgi?id=1819374. Arch Linux has patches, but they’re for Firefox 111, I don’t know if they can be backported: https://github.com/archlinux/svntogit-packages/tree/packages/firefox/trunk. Version-Release number of selected component (if applicable): firefox-110.0-3.fc38.x86_64 How reproducible: It’s permanently reproducible. Steps to Reproduce: 1. Start Firefox. 2. Try to play a video which requires FFmpeg codecs. Actual results: The video doesn’t play. Expected results: The video plays like it was the case in Fedora 37.
It looks like fixes have been committed upstream for Firefox 112: https://bugzilla.mozilla.org/show_bug.cgi?id=1819374 Perhaps they can be backported?
Pull requests submitted with patches from Arch Linux: * Rawhide: https://src.fedoraproject.org/rpms/firefox/pull-request/49 * F38: https://src.fedoraproject.org/rpms/firefox/pull-request/50
Proposed as a Blocker for 38-final by Fedora user ngompa using the blocker tracking app because: Firefox not being able to properly decode content through FFmpeg violates the Final release criterion that the default browser must withstand a basic functionality test.
Firefox 112 release date is 2023-04-11 which looks too late for Fedora 38 release.
Discussed at 2023-03-20 blocker review meeting: https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2023-03-20/f38-blocker-review.2023-03-20-16.00.html . We agreed to delay the decision on this bug as it's not clear exactly what is affected; we found during quick in-meeting testing that obvious things (youtube, twitch, bluejeans test call) seem to work OK. So we'd ask for some more detail on what exactly is broken by this in order to make the decision.
(In reply to Adam Williamson from comment #5) > Discussed at 2023-03-20 blocker review meeting: > https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2023-03-20/f38- > blocker-review.2023-03-20-16.00.html . We agreed to delay the decision on > this bug as it's not clear exactly what is affected; we found during quick > in-meeting testing that obvious things (youtube, twitch, bluejeans test > call) seem to work OK. So we'd ask for some more detail on what exactly is > broken by this in order to make the decision. Yes, that's correct. Only broken thing is H.264 decode via ffmpeg from rpmfusion. Default Fedora setup is not affected as H.264 is decoded by OpenH264 and it's not affected by that. Also open formats (VP8/9 and AV1) are decoded by Firefox internal/bundled ffvpx decoder and it's not affected. So I think it's safe to leave it to 112.0 and release it as update.
Note that VA-API decode of open formats (VP8/9 and AV1) are not affected as Firefox internal/bundled ffvpx decoder is used for it.
(In reply to Martin Stransky from comment #6) > Yes, that's correct. Only broken thing is H.264 decode via ffmpeg from > rpmfusion. Default Fedora setup is not affected as H.264 is decoded by > OpenH264 and it's not affected by that. Note that Fedora has ffmpeg as well now (with problematic codecs stripped out) and it's installed by default in F38 (since https://pagure.io/fedora-comps/c/85ce9364001f0546ac229fc0ebbe968a4197620d?branch=main). How does firefox behave in a situation like that? Does it pick standalone openh264 or ffmpeg?
(In reply to Kalev Lember from comment #8) > Note that Fedora has ffmpeg as well now (with problematic codecs stripped > out) and it's installed by default in F38 (since > https://pagure.io/fedora-comps/c/ > 85ce9364001f0546ac229fc0ebbe968a4197620d?branch=main). How does firefox > behave in a situation like that? Does it pick standalone openh264 or ffmpeg? I expect it doesn't support H.264 decode, right? In such case should be ignored by Firefox (and if not it's a bug which needs to be fixed).
I believe it does - it includes a patch to dlopen openh264, https://src.fedoraproject.org/rpms/ffmpeg/blob/rawhide/f/ffmpeg-dlopen-openh264.patch and the spec file passes --enable-libopenh264-dlopen to configure, https://src.fedoraproject.org/rpms/ffmpeg/blob/rawhide/f/ffmpeg.spec
(In reply to Kalev Lember from comment #10) > I believe it does - it includes a patch to dlopen openh264, > https://src.fedoraproject.org/rpms/ffmpeg/blob/rawhide/f/ffmpeg-dlopen- > openh264.patch and the spec file passes --enable-libopenh264-dlopen to > configure, > https://src.fedoraproject.org/rpms/ffmpeg/blob/rawhide/f/ffmpeg.spec I just tested rawhide + firefox 110 + ffmpeg-free-6.0-1.fc39.x86_64 and H.264 decode works.
Ah, excellent!
It's because ffmpeg-free-6.0 is ignored by Firefox (due to missing 6.0 support) and falls back to OpenH264. Note that Firefox carries OpenH264 specific patches (https://bugzilla.mozilla.org/show_bug.cgi?id=1670333) as OpenH264 doesn't support to decode infra frames. If H.264 is decoded by ffmpeg and then directed to OpenH264, Firefox doesn't use the OpenH264 workarounds and seek in H.264 video stream may fails. (A root cause is OpenH264 bug indeed as ffmpeg H.264 decoders works fine). So actually when Firefox is updated to support ffmpeg-6.0 and ffmpeg-free-6.0+OpenH264 redirect is installed that will lead to H.264 decode bugs. I wonder if ffmpeg-free-6.0 should be ignored by Firefox somehow (but I don't know how).
OpenH264 ticket - https://github.com/cisco/openh264/issues/3350
You could check to see if "libopenh264" is the codec handler for h264 from libavcodec and then skip it.
-5 in https://pagure.io/fedora-qa/blocker-review/issue/1117 , marking rejected as a blocker. I won't propose as an FE given the 112 release date.
Noting report from Fedora Kinoite 38 user: https://pagure.io/fedora-kde/SIG/issue/324
Hello, I guess this bug can be closed now that it’s fixed.