Video playback stalls or desynchronizes when resuming if an AudioContext-based volume booster extension is active
Categories
(Core :: Audio/Video: Playback, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox146 | --- | unaffected |
| firefox147 | --- | verified |
| firefox148 | --- | verified |
People
(Reporter: k, Assigned: karlt)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:147.0) Gecko/20100101 Firefox/147.0
Steps to reproduce:
- Launch Firefox (I have reproduced this on 147 Beta and 148 Nightly).
- Install a volume booster add-on or userscript that likely utilizes the AudioContext (Web Audio API).
Examples include: - Visit a video streaming site (e.g., YouTube).
(Note: If using the "600% Sound Volume" add-on, adjust the slider to activate the effect.) - Play a video.
- Pause the video.
- Resume playback.
Actual results:
The video playback glitches for several seconds. Specifically, one of the following occurs:
- Audio plays, but the video frame remains frozen. After several seconds, the video frame suddenly jumps to the current audio position (skipping the frames in between).
- Both audio and video remain frozen, but the seekbar/timestamp continues to progress. After several seconds, playback starts normally from the current timestamp.
Expected results:
Playback should resume immediately and smoothly without any freezing or resynchronization.
Additional Information
- Regression: The issue appears to be a regression starting with Firefox 147 Beta.
- Works correctly: Firefox 146 (Release and Beta).
- Broken: Firefox 147 Beta and 148 Nightly.
Comment 1•1 month ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 2•29 days ago
|
||
Thank you for the report. Would you be able to use mozregression to bisect to find the change the triggered this, please?
mozregression --good 146 --bad 147 --profile-persistence reuse
| Assignee | ||
Updated•29 days ago
|
| Assignee | ||
Updated•29 days ago
|
Apologies for the delay. This was my first time using mozregression (it's a great tool!), so it took me a while to get set up.
I ran mozregression, but it failed to bisect the merge commit (Unable to exploit the merge commit).
However, the regression range is identified as:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8b434e72bd1e5995992c79398c5d4024c21383d4&tochange=88a09a47e50b681f0b673d5314113e2992f468e3
Looking at the pushlog, Bug 1771789 seems highly suspicious, as it involves changes to CubebInputStream and MediaStreamTrack, which could affect AudioContext behavior.
Suspected patches:
- Andreas Pehrson β Bug 1771789 - Pass CubebInputStream the same CubebHandle used to enumerate its device id. r=padenot
- Andreas Pehrson β Bug 1771789 - Make AudioInputProcessing::NumberOfChannels always valid. r=padenot,webrtc-reviewers,mjf
- Andreas Pehrson β Bug 1771789 - Add and use an API for MediaStreamTrackSource cloning. r=jib
| Assignee | ||
Comment 4•20 days ago
|
||
That's very helpful, thanks. Possibly bug 1771789, but bug 1931328 is about A/V synchronization.
Updated•17 days ago
|
Comment 5•16 days ago
|
||
Next week is RC week for Fx147.
:jimm, any concerns with prioritizing an investigation in time for Fx147?
Bug 1998839 is riding the train with Fx147
| Assignee | ||
Comment 6•15 days ago
|
||
It is as if the video position is advancing while paused, so the effect is more obvious for longer pauses. On resume the audio resumes, but the video playback jumps and then is paused or stuttery until the audio catches up.
| Assignee | ||
Comment 7•15 days ago
•
|
||
https://hg.mozilla.org/mozilla-central/rev/6151857e7ed8, which re-landed as https://hg.mozilla.org/mozilla-central/rev/f8c71c831710, changed the behavior.
| Assignee | ||
Comment 8•15 days ago
•
|
||
A logging profile is at https://share.firefox.dev/4jkeCYl
Looking at the MediaDecoderStateMachine thread, and searching the Marker Table for "odecoded,sink", both audio and video decoded frame times advance by the duration of the pause, but aClockTime passed to VideoSink::RenderVideoFrames() does not.
This bug would affect more situations that bug 1931328.
There would be risk in landing a fix for this, if we determine what the appropriate fix should be.
Given the time constraints, backing out https://hg.mozilla.org/mozilla-central/rev/f8c71c831710 and dependent changesets from bug 1931328 seems the best option at this stage.
https://treeherder.mozilla.org/jobs?repo=try&revision=2cdc18b26bcb764466a8b752656eb0886a2e3954
| Assignee | ||
Comment 9•15 days ago
|
||
due to skips and freezes when resuming after playback pause.
Revert "Bug 1931328 - Account for playback rate when setting frame timestamps in DecodedStream. r=padenot"
This reverts commit 5df6a99098033eac5a05134437d4393200c8652b.
Revert "Bug 1931328 - Test the interpolated GetPosition in DecodedStream. r=padenot"
This reverts commit a8c2ffa3f7c13ce6533bc06c5bbe7ecb0bc7f90f.
Revert "Bug 1931328 - Allow for deterministic output time testing of DecodedStream. r=padenot"
This reverts commit 1a970ccb483397c434bd9f2a3d566d72b2444c82.
Revert "Bug 1931328 - Interpolate DecodedStream position based on current system time. r=padenot,webidl,smaug"
This reverts commit 6bc5f33ade36f71c360721f04c77744d662ace1b.
Updated•15 days ago
|
Comment 10•15 days ago
|
||
:karlt could you also put up a beta uplift request when ready?
I know the patch is still pending review, but at least if we have a beta uplift we can take it once the patch hits firefox-main.
It's too late for 147 beta builds, but we can take it before 147 goes to release.
| Assignee | ||
Comment 11•15 days ago
|
||
An awkward workaround is to drag the playback position back over the portion that was skipped.
| Assignee | ||
Comment 12•15 days ago
|
||
due to skips and freezes when resuming after playback pause.
Revert "Bug 1931328 - Account for playback rate when setting frame timestamps in DecodedStream. r=padenot"
This reverts commit 5df6a99098033eac5a05134437d4393200c8652b.
Revert "Bug 1931328 - Test the interpolated GetPosition in DecodedStream. r=padenot"
This reverts commit a8c2ffa3f7c13ce6533bc06c5bbe7ecb0bc7f90f.
Revert "Bug 1931328 - Allow for deterministic output time testing of DecodedStream. r=padenot"
This reverts commit 1a970ccb483397c434bd9f2a3d566d72b2444c82.
Revert "Bug 1931328 - Interpolate DecodedStream position based on current system time. r=padenot,webidl,smaug"
This reverts commit 6bc5f33ade36f71c360721f04c77744d662ace1b.
Original Revision: https://phabricator.services.mozilla.com/D277683
Updated•15 days ago
|
Comment 13•15 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Regression: skips and freezes when attempting to resume playback after pause, in some less common a/v playback designs.
- Code covered by automated testing: no
- Fix verified in Nightly: no
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Reverts to a previous state.
- String changes made/needed: None
- Is Android affected?: yes
| Assignee | ||
Comment 14•15 days ago
|
||
The uplift request via Lando for D277683 fails with "source_revisions: Select a valid choice. 277683 is not one of the available choices."
moz-phab generated the uplift.
Updated•13 days ago
|
Comment 15•13 days ago
|
||
Comment 16•13 days ago
|
||
| bugherder | ||
Updated•12 days ago
|
Updated•12 days ago
|
Comment 17•12 days ago
|
||
| uplift | ||
| Reporter | ||
Comment 18•12 days ago
|
||
Verified fixed in the latest Nightly 148.0a1 on macOS.
The video glitch/desynchronization issue is resolved.
Updated•7 days ago
|
Comment 19•7 days ago
•
|
||
I was able to reproduce the issue on Mac12.6 using FF build 147.0b6.
Verified as fixed on Mac12.6/Win11 using FF builds 147.0 and 148.0a1(20260107160934).
Updated•6 days ago
|
Description
•