Bug 2095743 - Low video playback performance with Firefox 101
Summary: Low video playback performance with Firefox 101
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-10 12:12 UTC by Gurenko Alex
Modified: 2023-05-25 16:27 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-25 16:27:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
about:support output (40.00 KB, text/plain)
2022-06-10 12:57 UTC, Gurenko Alex
no flags Details
firefox output with env variable (676.85 KB, text/plain)
2022-06-10 12:58 UTC, Gurenko Alex
no flags Details

Description Gurenko Alex 2022-06-10 12:12:59 UTC
Description of problem: After upgrading the package from 
firefox-101.0.1.fc36 to 
firefox-101.0.1-1.fc36 (https://bodhi.fedoraproject.org/updates/FEDORA-2022-950e0f78c7) the video playback is restored (https://bugzilla.redhat.com/show_bug.cgi?id=2094319), but the playback performance on every site is very low.


Version-Release number of selected component (if applicable): firefox-101.0.1-1.fc36


How reproducible: 100%


Steps to Reproduce:
1. Install firefox-101.0.1-1.fc36
2. Open any site that contains video
3. Press play

Actual results: Video is played at only few FPS


Expected results: Video is played smoothly at desired FPS


Additional info:
Please see 60 FPS screen recording: https://drive.proton.me/urls/MJ2G4B6JRM#OGqrlXQmRZsf

Comment 1 Martin Stransky 2022-06-10 12:15:00 UTC
Thanks. Please run Firefox on terminal with MOZ_LOG="PlatformDecoderModule:5" env variable and attach the log here.

Comment 2 Martin Stransky 2022-06-10 12:15:25 UTC
Also please attach your about:support page.

Comment 3 Martin Stransky 2022-06-10 12:17:11 UTC
I suspect the recorded video is from OpenH264 decoder and it's not related to VA-API changes.

Comment 4 Gurenko Alex 2022-06-10 12:57:45 UTC
Created attachment 1888664 [details]
about:support output

Please find about:support output

Comment 5 Gurenko Alex 2022-06-10 12:58:35 UTC
Created attachment 1888665 [details]
firefox output with env variable

Opened firefox and played two videos

Comment 6 Gurenko Alex 2022-06-10 13:02:34 UTC
(In reply to Martin Stransky from comment #3)
> I suspect the recorded video is from OpenH264 decoder and it's not related
> to VA-API changes.

Probably, as installation of VLC brings some other libraries that fixes the playback and seems like it's not the ffmpeg-libs, but don't have time right now what exactly is "fixing" or "workarounding" the problem.

Comment 7 Martin Stransky 2022-06-11 06:54:46 UTC
Do you have ffmpeg from rpmfusion installed?
Please attach content of about:plugins.

Comment 8 Gurenko Alex 2022-06-11 16:41:24 UTC
(In reply to Martin Stransky from comment #7)
> Do you have ffmpeg from rpmfusion installed?
> Please attach content of about:plugins.

No, I do not have ffmpeg installed. Content of about:plugins:


OpenH264 Video Codec provided by Cisco Systems, Inc.

    File: system-installed
    Path: /home/agurenko/.mozilla/firefox/72w8miv5.default-release/gmp-gmpopenh264/system-installed
    Version: system-installed
    This plugin is automatically installed by Mozilla to comply with the WebRTC specification and to enable WebRTC calls with devices that require the H.264 video codec. Visit https://www.openh264.org/ to view the codec source code and learn more about the implementation.

Widevine Content Decryption Module provided by Google Inc.

    File: 4.10.2449.0
    Path: /home/agurenko/.mozilla/firefox/72w8miv5.default-release/gmp-widevinecdm/4.10.2449.0
    Version: 4.10.2449.0
    State: Enabled
    This plugin enables playback of encrypted media in compliance with the Encrypted Media Extensions specification. Encrypted media is typically used by sites to protect against copying of premium media content. Visit https://www.w3.org/TR/encrypted-media/ for more information on Encrypted Media Extensions.

Comment 9 Martin Stransky 2022-06-11 19:50:44 UTC
Thanks. It's a bit mystery to me how it's possible that firefox-101.0.1.fc36 worked fine for you - can you please downgrade to firefox-101.0.1.fc36 and run on terminal with 

MOZ_LOG="GMP:5, PlatformDecoderModule:5"

and attach the log here?
Thanks.

Comment 10 Gurenko Alex 2022-06-12 00:48:53 UTC
(In reply to Martin Stransky from comment #9)
> Thanks. It's a bit mystery to me how it's possible that firefox-101.0.1.fc36
> worked fine for you - can you please downgrade to firefox-101.0.1.fc36 and
> run on terminal with 
> 
> MOZ_LOG="GMP:5, PlatformDecoderModule:5"
> 
> and attach the log here?
> Thanks.

101.0.1 didn't work for me because it had a completely broken video (https://bugzilla.redhat.com/show_bug.cgi?id=2094319), so 101.0.1-1 has a video but it's not working as intended. Version 100 worked perfectly fine.

Comment 11 Martin Stransky 2022-06-13 08:04:31 UTC
You just need to install ffmpeg package from rmpfusion to fix that.

Comment 12 Martin Stransky 2022-06-13 08:05:06 UTC
See Fedora/Firefox howto:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration

Comment 13 Gurenko Alex 2022-06-13 09:03:43 UTC
(In reply to Martin Stransky from comment #11)
> You just need to install ffmpeg package from rmpfusion to fix that.

So, this only fixes the H264 playback. Interestingly the VP9 playback on YouTube was unimpaired, however even with libva and ffmpeg libs AV1 playback on YouTube is still broken (works fine in Chrome on a same machine though)

Comment 14 Martin Stransky 2022-06-13 09:09:24 UTC
If you see bad AV1 decoding performance by VA-API it's https://bugzilla.mozilla.org/show_bug.cgi?id=1758948
You may need to disable VA-API by media.hardware-video-decoding.enabled at about:config or use enhanced-h264ify extension to block AV1 format on youtube.

Comment 15 Gurenko Alex 2022-06-13 09:20:04 UTC
So what exactly changed in this version (of Firefox)? I still do not understand the root cause. Is that a combination of broken openh264 in firefox-101.0-1.fc36.x86_64 and poor AV1 performance in firefox-101.0.1-1.fc36.x86_64 due to enablement of VA-API?

With Firefox 100:

With no libva, ffmpeg-libs installed:

H264 worked fine out of the box
AV1 worked perfectly fine out of the box
VP9 worked fine out of the box

With firefox-101.0-1.fc36.x86_64:

With no libva, ffmpeg-libs installed:

H264 does not work at all
AV1 works fine out of the box
VP9 works out of the box

With ffmpeg-libs installed:

H264 works find
AV1 works fine
VP9 works fine

With firefox-101.0.1-1.fc36.x86_64:

With no libva, ffmpeg-libs installed:

H264 playback is slow
AV1 playback is slow
VP9 works out of the box

With libva, ffmpeg-libs installed:

H264 works fine
AV1 playback is slow
VP9 works fine

I would assume that not much changed between 101.0-1 and 101.0.1-1, so both should be affected by AV1 poor performance?

Comment 16 Martin Stransky 2022-06-13 10:36:11 UTC
(In reply to Gurenko Alex from comment #15)
> I would assume that not much changed between 101.0-1 and 101.0.1-1, so both
> should be affected by AV1 poor performance?

Yes, looks like so.

Comment 17 Ben Cotton 2023-04-25 17:24:06 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 18 Ludek Smid 2023-05-25 16:27:51 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.