Closed Bug 1749159 Opened 2 years ago Closed 11 months ago

choppy video when the video tab isn't the main focus.

Categories

(Core :: Audio/Video: Playback, defect)

Firefox 95
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: rikusirane, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

i have a video/stream open on firefox and then click on anything that isn't another firefox window - notepad, a game, steam, anything that makes the video not the main focus. if i click back to the video, its fixed until i click away from it. it doesn't matter if its all on the same monitor or not.

Actual results:

the video gets choppy and stutters every few seconds, but the audio is fine. it doesn't matter what service i'm using for the video and happens every single time without fail until i make firefox the main focus again.

https://share.firefox.dev/3r26ssJ

this is a profiler link of about 50 seconds of it happening with twitch - but as stated it happens with any service/website.

Expected results:

the video should be smooth.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

Thanks for the report.

I'm not making super much sense of the profile, it feels like this is a media playback thing. Jean-Yves, should this be in Media Playback instead?

Flags: needinfo?(jya-moz)
Component: DOM: UI Events & Focus Handling → Audio/Video: Playback
Flags: needinfo?(jya-moz)

Hi,

I wasn't able to reproduce this issue on my end, could you please check if it occurs to you while watching a stream in troubleshooting mode?
Here is a link that can help: https://support.mozilla.org/en-US/kb/troubleshoot-extensions-themes-to-fix-problems

Thanks!

Flags: needinfo?(rikusirane)

Hi sorry for the late response - it does still happen in troubleshoot mode and in a new profile. I've noticed as well and don't know if its relevant, but even as the main focus videos seem to have a minor stutter or fps loss not present in other browsers.

Flags: needinfo?(rikusirane)

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Flags: needinfo?(jmathies)

Reporter, would you mind attempting to reproduce this, and taking a performance profile, so we can determine whether it's our fault, or maybe a driver, or something else?

Text + video instructions are here: https://blog.paul.cx/post/profiling-firefox-media-workloads/#the-media-preset. You can either paste the profile URL here (please tick the box "request information from other" so we're notified), or send it to <padenot@mozilla.com> (i.e. privately).

Flags: needinfo?(rikusirane)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:jimm, since the bug has recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(rikusirane) → needinfo?(jmathies)

Sorry I completely forgot.

https://share.firefox.dev/3hdhg68

Its a bit more random than it was before but happens closer to the end.

Flags: needinfo?(jmathies) → needinfo?(padenot)

(In reply to rikusirane from comment #8)

Sorry I completely forgot.

https://share.firefox.dev/3hdhg68

Its a bit more random than it was before but happens closer to the end.

Can you please use the "Media" profiler preset? Thanks!

Flags: needinfo?(padenot) → needinfo?(rikusirane)

https://share.firefox.dev/3XpyZrR

Sorry about that, I think that should be good.

Flags: needinfo?(rikusirane)

Yes, perfect, thank you very much.

In this view of the profile with the MediaDecoderStateMachine and the main thread view active, we see that somehow requestAnimationFrame / refresh driver ticks are not being called repeatedly, there are big pauses.

Jeff, do you know what the cause could be? This only happen when the window isn't focused, it's weird. The videos/audio decoding is behaving appropriately, this isn't a large video (<720p).

Flags: needinfo?(jmuizelaar)

Refresh driver ticks in the child process are not needed for video playback. i.e if you just open a raw video in Firefox we only get refresh driver ticks every 500ms

Flags: needinfo?(jmuizelaar)
Status: UNCONFIRMED → RESOLVED
Closed: 11 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.