Closed Bug 1944207 Opened 9 months ago Closed 7 months ago

youtube.com - The audio keeps stuttering at a playback speed of more than 1x

Categories

(Web Compatibility :: Site Reports, defect, P2)

ARM
Android

Tracking

(Webcompat Priority:P2, Webcompat Score:5, firefox138 fixed)

RESOLVED FIXED
Webcompat Priority P2
Webcompat Score 5
Tracking Status
firefox138 --- fixed

People

(Reporter: railioaie, Unassigned)

References

()

Details

(Keywords: webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline])

User Story

platform:android
impact:feature-broken
configuration:general
affects:some
branch:release
diagnosis-team:javascript
user-impact-score:135

Environment:
Operating system: Android 15
Firefox version: Firefox Mobile 136.0

Preconditions:
Clean profile

Steps to reproduce:

  1. Navigate to: https://youtube.com
  2. Search for a video
  3. Play the video
  4. Change the speed to more than 1x
  5. Observe

Expected Behavior:
The audio is playing correctly

Actual Behavior:
The audio keeps stuttering and crackling

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in firefox-nightly, and firefox-release
  • Does not reproduce in chrome

Created from https://github.com/webcompat/web-bugs/issues/147674

Summary: youtube.com - The audio keeps stuttering at playback speed more than 1x → youtube.com - The audio keeps stuttering at a playback speed of more than 1x
Whiteboard: [webcompat-source:web-bugs] → [webcompat-source:web-bugs][webcompat:sightline]
Severity: -- → S4
User Story: (updated)
Webcompat Priority: --- → P2
Webcompat Score: --- → 5
Priority: -- → P2

I was unable to repro on my side with a Pixel 6a. I tried nightly and stable with a 4k video in various display modes. Slowing the video down seemed to work as intended as well without any crackle or stutter. Would you be able to provide a profile of the behavior with the media preset?

Flags: needinfo?(railioaie)

Hello! I've retested and here you can see the performance profile. Thanks!

Flags: needinfo?(railioaie)
Blocks: yt-playback

Thanks for the profile! It looks like we're getting some heavy jank on the JS side of things with a large amount of time spent handling async tasks. Focusing on the jank, we have ~70% of the samples inside a timeout handler. During the jank, we're also spending ~10% of our time in TimeStamp::Now() during calls, with a good chunk of that looking related to the creation of PromiseDebugInfo objects, which I think are being created here. We could in theory use a lower resolution timer to reduce the timer call overhead, but that would be a pretty major change. The call stack is deep with what appear to be many recursive JS calls, but I don't see anything else major from our side right now.

Blocks: media-triage

-> js team for heavy use of timestamping.

No longer blocks: media-triage, yt-playback
Severity: S4 → --
Priority: P2 → --
User Story: (updated)

Thanks to EventHorizon & Vladimir from the SUMO forums, I was able to get a regression range for when this audio stutter first appeared. Hopefully you guys can take it from here & pinpoint which patch introduced this regression. I forgot how to create a link to the bisection. It's been a while. Not sure if we can still use Mercurial (hg.mozilla.org) or if we must use TreeHerder.

But the last good build was Jan 9, 2025, the first bad build was Jan 10, 2025:
Good:
https://ftp.mozilla.org/pub/fenix/nightly/2025/01/2025-01-09-18-35-05-fenix-136.0a1-android-arm64-v8a/
Bad:
https://ftp.mozilla.org/pub/fenix/nightly/2025/01/2025-01-10-09-49-27-fenix-136.0a1-android-arm64-v8a/

Comment from tester Vladimir:
https://support.mozilla.org/questions/1492896#answer-1713470
The issue first appears for me in this nightly version from January 10:
https://ftp.mozilla.org/pub/fenix/nightly/2025/01/2025-01-10-09-49-27-fenix-136.0a1-android-arm64-v8a/

In the nightly versions from January 9, there is no issue.

Credit to both of them for using Nightly and noticing the breakage. EventHorizon actually noticed it very early on Jan 14. But I was not around to see that thread & catch it in time. Forum post: https://support.mozilla.org/questions/1486047

Flags: needinfo?(azebrowski)

This may be bug 1947917. If so, the latest Nightly would hopefully be better.

Thanks Karl! I was looking high and low for that exact bug. I informed the other users on the forums that you all got that issue fixed. But in the case of these 3 users, they specifically mentioned speeding up audio playback causes audio crackling & distortion:
https://support.mozilla.org/questions/1492896
https://support.mozilla.org/questions/1486047
https://support.mozilla.org/questions/1494243

But if fixing bug 1947917 fixes this bug, that's awesome. I'll ask Vladimir to test one of the latest nightlies to confirm if it cures this bug as well.

See Also: → 1947917

Vladimir confirmed it has been fixed, so marking as dependency of bug 1947917.

Depends on: 1947917
See Also: 1947917

Re-setting the severity flags here because I think they were removed by accident.

Calin, can you verify that this issue is fixed with Firefox 137 (currently in Nightly)?

Severity: -- → S4
Flags: needinfo?(azebrowski) → needinfo?(ctanase)
Priority: -- → P2

This was barely noticeable for me on one of my devices but only once when I've tried to increase the speed, if I didn't touch the speed afterwards, the rest of the video wouldn't make crackling sound even with the speed increased.

Radu could you check if its still reproducible to you?

Flags: needinfo?(ctanase) → needinfo?(railioaie)
See Also: → 1948480

Hello, I've retested and it's not reproducible anymore. Thank you!

Flags: needinfo?(railioaie)
See Also: 1948480
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED

Verified as FIXED using RC Build fenix android-arm64-v8a

Tested with:

Browser / Version: Firefox 138.0 Build 2016086490
Operating System: Samsung A51 (Android 11) -1080 × 2400 pixels 20:9 aspect ratio (~405 ppi density)

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