Youtube Live video endless buffering
Categories
(Core :: Audio/Video: Playback, defect, P1)
Tracking
()
People
(Reporter: alice0775, Assigned: alwu)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files)
37.17 KB,
text/plain
|
Details | |
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
pascalc
:
approval-mozilla-release+
dmeehan
:
approval-mozilla-esr115+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Steps to reproduce:
- Open and play Live video (Not all but several live. It seems low latency live stream)
e.g. https://www.youtube.com/watch?v=jQaDDtiu05E w/ 1080p. Or other low latency video streams.
Actual Results:
Video stops after for a while. But audio is playing.
Profiler log: https://share.firefox.dev/4aEXK8R
When the buffer length reaches 0s, the image seems to stop without recovery.
![]() |
Reporter | |
Comment 1•9 months ago
|
||
![]() |
Reporter | |
Updated•9 months ago
|
Comment 2•9 months ago
|
||
Thank you for capturing the profile.
From 15.518s, there is a gap in video frame timestamps, with one video frame in the gap with a zero-length zero-start-time interval.
InsertFrames - Processing 2 video/vp9 frames(start:13654934000 end:13655000000)
4 * RequestDecode:V:720<h<=1080:hw,vp9,
InsertFrames - Processing 1 video/vp9 frames(start:0 end:0)
~16 * RequestDecode:V:720<h<=1080:hw,vp9,
RequestDecode:V:720<h<=1080:kf,hw,vp9,
<- 0.7s no vp9 activity ->
InsertFrames - Processing 5 video/vp9 frames(start:13656000000 end:13656168000)
The same gap is not present in the audio frame timestamps.
A [0, 0] frame was also seen in bug 1878510 comment 13, but the RemoveFrames
seen there is not happening here. The spinner seen there is also not here.
I'm not able to play the linked youtube stream from my location.
Assignee | ||
Comment 3•9 months ago
|
||
Would you mind to follow this instruction to capture a profiled result again? This allows us to capture debug logs. Thanks!
![]() |
Reporter | |
Comment 4•9 months ago
|
||
The video stream of comment #0 is not available now.
https://www.youtube.com/watch?v=gcimTLMOLQk, the video and audio will stop and spinning loading spinner forever.
Pofiler: https://share.firefox.dev/4b2lzHy
![]() |
Reporter | |
Updated•9 months ago
|
Assignee | ||
Comment 5•8 months ago
|
||
We've landed a fix in bug 1878510, could you help me try the latest Nightly to see if the issue still persists? If so, could you capture a profiled result for us again? Some people told me that bug 1878510 fixed the buffering problem for normal video, but the problem still happens on live stream video. Thanks!
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Comment 6•8 months ago
•
|
||
I can reproduce the infinite buffering issue on this video by switching resolution around.
Assignee | ||
Comment 7•8 months ago
•
|
||
This issue is still caused by incorrect webm sample's endtime, which triggered the discontinuity check so that Firefox skipped the samples which should have been appended to the buffered range. We need a better way to determine the webm sample's end time, that can be done in bug 1903466.
From the profiled result, here we can see the samples Youtube appended, but the first and the second samples have the wrong end time. As there is an unexpected gap appearing between them, a lot of samples were skipped unexpectedly.
And the reason of why we didn't set the correct timestamp for the first sample is because the appended buffer only contained one frame [46824993000, 46825009000]
(duration: 16000), and our webm demuxer doesn't know how to handle that case because we didn't know the duration and there was no previous timestamp.
Assignee | ||
Comment 8•8 months ago
|
||
Assignee | ||
Updated•8 months ago
|
Updated•8 months ago
|
Comment 10•8 months ago
|
||
Comment on attachment 9409034 [details]
Bug 1900191 - use default duration if exists.
Beta/Release Uplift Approval Request
- User impact if declined: YouTube live, especially when low latency is broken: video eventually stop playing, sometimes audio continues
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Attempt to play: https://www.youtube.com/watch?v=jQaDDtiu05E
https://www.youtube.com/watch?v=uXNU0XgGZhs
(depending on the location of the QA person). Other low-latency live stream can repro as well.
Please ping padenot (europe) alwu (west coast) if more streams are needed.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This brings Firefox closer to how Chrome handles WebM. The cause of the problem is well understood.
- String changes made/needed: none
- Is Android affected?: Yes
Updated•8 months ago
|
Comment 11•8 months ago
|
||
Comment 12•8 months ago
|
||
bugherder |
Comment 13•8 months ago
|
||
Comment on attachment 9409034 [details]
Bug 1900191 - use default duration if exists.
Approved for 128.0b8 and our 127.0.2 dot release
Comment 14•8 months ago
|
||
uplift |
Comment 15•8 months ago
|
||
uplift |
Updated•8 months ago
|
Comment 16•8 months ago
|
||
Note to testers: This patch is in the nightly BuildID 20240624144542
Comment 17•8 months ago
|
||
bugherder |
Comment 18•8 months ago
|
||
Reproduced the issue with Firefox 128.0b7 on Ubuntu 22.04, macOS 13 arm, Windows 10x64 using this Youtube video by changing the resolution of the video multiple times or by clicking on the seek bar. The video will stop and an endless spinning circle will be displayed with a video picture.
The issue is verified fixed with Firefox 129.0a1 (2024-06-24), 128.0b8 from comment 14, and 127.0.2 on macOS 13 ARM, Windows 10x64, Ubuntu 22.04. I tried multiple times to change the resolution of the video and click on the seek bar of the above video and no endless loading occurred.
Please note that sometimes it seems that when changing the resolution to 4k it shows a loading circle for like ~3-4s. This does not happen every time. From what I saw on Chrome the transition to change the video is much faster. This is present on macOS 13 ARM and Ubuntu 22 and not so visible on Windows 10x64. Please let me know if I should file something on this. Thank you!
![]() |
Reporter | |
Updated•8 months ago
|
Assignee | ||
Updated•8 months ago
|
Comment 19•8 months ago
|
||
You mentioned this in https://bugzilla.mozilla.org/show_bug.cgi?id=1878510#c144
It does not graft cleanly to ESR115. If this is also needed for ESR115, could you please attach a rebased patch and ESR115 uplift request?
Comment 20•8 months ago
|
||
Comment on attachment 9409034 [details]
Bug 1900191 - use default duration if exists.
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is a follow-up to 1878510 and is an important follow-up to really fix the issue. Both patches landed and release and are known to work well.
- User impact if declined: Regular YouTube and Youtube Live can appear to buffer endlessly under some circumstances.
- Fix Landed on Version: 127.0.2
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This is well understood and has received appropriate scrutiny by various groups (devs, QA, users reporting it works, etc.)
Comment 21•8 months ago
|
||
Updated•8 months ago
|
Updated•8 months ago
|
Comment 22•8 months ago
|
||
Done, let one of us know if something looks funny.
Updated•8 months ago
|
Comment 23•8 months ago
|
||
Comment on attachment 9409034 [details]
Bug 1900191 - use default duration if exists.
Approved for 115.13esr.
Comment 24•8 months ago
|
||
uplift |
Updated•8 months ago
|
Comment 25•8 months ago
|
||
https://hg.mozilla.org/releases/mozilla-esr115/rev/d80101c053542194d169cfb69802e650748c7f75
Backed out of ESR115 for causing build failures (also backed out Bug 1878510 and Bug 1904168)
Push: https://treeherder.mozilla.org/jobs?repo=mozilla-esr115&revision=50b824509129bc83debf5203ca0817163aa1074f
Example: https://treeherder.mozilla.org/logviewer?job_id=464303443&repo=mozilla-esr115&lineNumber=12291
Assignee | ||
Updated•8 months ago
|
Comment 26•8 months ago
|
||
uplift |
Updated•8 months ago
|
Comment 27•8 months ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Comment 28•8 months ago
|
||
The issue is verified fixed with Firefox 115.13.0esr on macOS 14 ARM, Windows 10x64, and Ubuntu 23 using this Youtube Video. I tried multiple times to change the resolution of the video and clicked on the seek bar multiple times and no endless loading occurred.
Description
•