Closed Bug 1640901 Opened 4 months ago Closed 3 months ago

Video playback stops when the tab is detached from window

Categories

(Core :: Graphics, defect)

76 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla79
Tracking Status
firefox-esr68 --- wontfix
firefox-esr78 --- wontfix
firefox77 --- wontfix
firefox78 --- wontfix
firefox79 --- fixed

People

(Reporter: CoolCmd, Assigned: sotaro)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

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

Steps to reproduce:

  1. open a blank tab
  2. open another tab with URL https://www.youtube.com/watch?v=LXb3EKWsInQ
  3. drag and drop active tab to the center of browser window to open it into a new window

Actual results:

after 5 seconds video stops updating, audio is OK .
on https://twitch.tv video starts "breaking" immediately.

Expected results:

video should play

Hi,
I wonder if disabling the pref media.suspend-bkgnd-video.enabled helps?
Because I'm not able to reproduce this issue, can you help me get the profiler result via Firefox profiler [1] (with Media preset) while you are encoutering this issue again?
Thank you.

[1] https://profiler.firefox.com/

Flags: needinfo?(CoolCmd)

media.suspend-bkgnd-video.enabled does not help.

profiler:
https://share.firefox.dev/2M4QgDd
5 s - detach tab
15 s - video freeze
25 s - video unfreeze (move the mouse cursor over web page)

how to reproduce:
media.webm.enabled=false
media.hardware-video-decoding.enabled=true
now browser plays H.264 using hardware decoding. in other configurations this bug not occur. i see this bug on Twitch.tv because it uses H.264.
if video does not freeze, move the mouse cursor to another place, switch to another application, wait 30 seconds.

video adapter: built-in intel cpu

Flags: needinfo?(CoolCmd)

Did this issue only happen on h264 video with hardware decoding? does it happen on h264 with software decoding or on vp9 with/without hardware decoding?
If you don't move your cursor over the page, would the video keep frozen?


From the profiled result, video kept playing all the time (even if during 15s to 25s), so I wonder if it's a graphic issue.

Flags: needinfo?(CoolCmd)

Did this issue only happen on h264 video with hardware decoding?

yes

does it happen on h264 with software decoding or on vp9 with/without hardware decoding?

no. but my hardware does not support VP9 decoding.

If you don't move your cursor over the page, would the video keep frozen?

yes

Flags: needinfo?(CoolCmd)

From the profiled result, video kept playing all the time
yes, as i said in comment #3, audio is still playing.

From the profiled result in comment2, we can observe that during 15s to ~23.5s the callstacks in the compositer thread are lower comparing with the callstacks outside this time frame. So I guess this issue might be related with gfx, move this bug to gfx to see if they can find any insight.

Component: Audio/Video: Playback → Graphics

(In reply to CoolCmd from comment #0)

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

Steps to reproduce:

  1. open a blank tab
  2. open another tab with URL https://www.youtube.com/watch?v=LXb3EKWsInQ
  3. drag and drop active tab to the center of browser window to open it into a new window

Hmm, I could not reproduce the problem. https://www.youtube.com/watch?v=LXb3EKWsInQ used vp9 from "stats for nerd" for me. How do you conformed that the video decoding uses h264 video with hardware decoding?

Actual results:

after 5 seconds video stops updating, audio is OK .
on https://twitch.tv video starts "breaking" immediately.

Can you explain more about https://twitch.tv ? Do you mean it does not needs the above STR to cause the problem?

:CoolCmd, can you provide about:support? Thank you.

Flags: needinfo?(CoolCmd)

:alwu, can you reproduce the problem?

Flags: needinfo?(alwu)
Severity: -- → S3

(In reply to Sotaro Ikeda [:sotaro] from comment #7)

Hmm, I could not reproduce the problem. https://www.youtube.com/watch?v=LXb3EKWsInQ used vp9 from "stats for nerd" for me. How do you conformed that the video decoding uses h264 video with hardware decoding?

see my comment #2:
media.webm.enabled=false
media.hardware-video-decoding.enabled=true

try to playback any live broadcast here: https://www.twitch.tv/directory/game/Fortnite
how to show codecs: click the gear button on video-->advanced-->video stats

Flags: needinfo?(CoolCmd)

(In reply to CoolCmd from comment #2)

media.suspend-bkgnd-video.enabled does not help.

profiler:
https://share.firefox.dev/2M4QgDd
5 s - detach tab
15 s - video freeze
25 s - video unfreeze (move the mouse cursor over web page)

Profiler had D3D9DXVA2Manager functions. It might be related. Gecko uses D3D11DXVA2Manager if possible. D3D9DXVA2Manager is a fallback from D3D11DXVA2Manager.

:CoolCmd, thank you. And can you also provide about:support?

Flags: needinfo?(CoolCmd)
Attached file about:support

about:support in attachment

Flags: needinfo?(CoolCmd)

Sorry, I can't reproduce it.

Flags: needinfo?(alwu)

on the same machine i tested a different configuration: windows 10, firefox 78 DE
no issue was found in this configuration
here about:support...

It seems that I could reproduce the problem. I take a look.

Assignee: nobody → sotaro.ikeda.g
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Regressed by: 858914

By looking into it, ScheduleComposition() in CompositableParentManager::ReceiveCompositableUpdate() did not trigger correct CompositorBridgeParent's composition. It is a regression of Bug 858914.

Even when the above ScheduleComposition() does not work, video rendering could happen correctly if ImageHost owns enough future video frames. But when D3D9DXVA2Manage is used, there is a case that ImageHost doe not have enough future frames.

Video stop could happen with Tab moving to different window on any non-WebRender composition. And non necessary composition happen on original window.

Severity: S3 → S1
Severity: S1 → S2
Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6343210ca911
Update CompositorBridgeID when ImageHost is async in ImageLayerComposite::SetLayerManager() r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Flags: qe-verify+

Could not reproduce the issue either.
Dropping the QE+ flag, as a safety check checked with 79.0b5(Win10/macOS 10.15.5) and still no issues up.

@CoolCmd could you check with this build if the issue still manifests for you?
Thank you in advance!

Flags: qe-verify+ → needinfo?(CoolCmd)

(In reply to Cristian Fogel, QA [:cfogel] from comment #23)

@CoolCmd could you check with this build if the issue still manifests for you?
the bug has been fixed

Flags: needinfo?(CoolCmd)

Thank you for the reply!
Updating status based on previous comment.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.