Firefox 149 regression: HLS playback starts only after manual seeking
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox149 | --- | wontfix |
| firefox150 | --- | verified |
| firefox151 | --- | verified |
People
(Reporter: antonytomasiny456, Assigned: alwu)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files, 9 obsolete files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:149.0) Gecko/20100101 Firefox/149.0
Steps to reproduce:
-
Update Firefox from version 148 to 149 on Windows 10.
-
Open an affected HLS video page.
-
Click Play.
-
Observe that the video buffers and .ts segments load, but playback does not start.
-
Manually seek the timeline.
-
Observe that playback starts only after seeking.
Actual results:
The video buffers normally and .ts segments are downloaded, but playback does not start after pressing Play. It only starts after I manually seek the timeline.
Expected results:
The video should start playing immediately after pressing Play, without requiring manual seeking.
Comment 1•4 months 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.
Comment 2•4 months ago
|
||
I have the same issue on Linux and Windows with a fresh profile.
After the upgrade to Firefox 149 watching video from Jellyfin with the official jellyfin-web interface, both version 10.11.6.
Some videos stall immediately and start playing ~6 seconds in. Some stall immediately start playing ~6 seconds in and then stall again about 6 seconds later. Then I can wait about 3 minutes and it will continue playing or I can seek manually. Some videos work.
Comment 3•4 months ago
|
||
Comment 4•4 months ago
|
||
Comment on attachment 9559296 [details]
media-playback.log
Log of a video stalling immediately and starting playback about 6 seconds in and then stalling again
Comment 5•4 months ago
|
||
Could you help us out by trying to capture a Firefox performance profile when this happens?
Visit https://profiler.firefox.com/ for more information and to enable the profiling toolbar button. When capturing a profile, please follow these steps -
- Navigate to about:logging
- In the logging preset drop down, select 'Media playback' and then click 'Set Log Modules'
- Click 'Start Logging' and conduct your testing. Keep this part short. Capture the issue well.
- Upload the resulting performance profile and post the url provided to this bug.
Thanks!
Comment 6•4 months ago
|
||
https://share.firefox.dev/4vdQdcH
This captures the skipping of the first 6 seconds, playing for 6 seconds and then stalling again.
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Reproduced in a clean separate Firefox profile.
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 8•4 months ago
|
||
The guard added by bug 2014888 to prevent a diagnostic assert was too broad:
it suppressed legitimate data requests needed after WAITING_FOR_DATA retries
in HLS/MSE slow-network scenarios, causing seeks to stall until a subsequent
data notification re-drove the pipeline.
SKIP_BMO_CHECK
| Assignee | ||
Comment 9•4 months ago
|
||
| Assignee | ||
Comment 10•4 months ago
|
||
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
| Assignee | ||
Comment 11•4 months ago
|
||
Can anyone try these builds to see if it fixes the problem or not? Thanks!
Windows : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/LhOE5QmLTjKXFeLvr5JEgQ/runs/0/artifacts/public/build/target.zip
Linux : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/cZ2YR7LsQ4WZ3IK9MZOTZg/runs/0/artifacts/public/build/target.tar.xz
MacOS : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/RqoX382ITe2ap8qeN_nHPQ/runs/0/artifacts/public/build/target.dmg
Comment 12•4 months ago
|
||
I tested the Linux build with a fresh profile and it has the same behavior as before.
It skips the first 6 seconds, plays for 6 seconds and then stalls. Manually seeking past that point by 3 seconds continues playback.
| Reporter | ||
Comment 13•4 months ago
|
||
I tried the Windows try build, but I could not properly test playback because the build crashes on my system before I can complete the reproduction steps.
So at the moment I cannot confirm whether the fix works in this build.
Relevant warnings before the crash:
[Parent 15396, Main Thread] WARNING: IPC message 'PContent::Msg_NotifyProcessPriorityChanged' discarded: actor cannot send
[Parent 15396, IPC I/O Parent] WARNING: Dropping message '<null>'; no connection to unknown peer ...
[Parent 15396, IPC I/O Parent] WARNING: Rejecting introduction request ... for unknown peer ...
[Parent 15396, WindowsVsyncThread] WARNING: DwmComposition dynamically disabled, falling back to software timers
If needed, I can provide the full log output.
| Assignee | ||
Comment 14•4 months ago
|
||
Could anyone provide a video link that would help me debug this issue more deeply? Thanks!
Updated•4 months ago
|
Comment 15•4 months ago
|
||
This video from the Jellyfin demo instance works normally on firefox <149, but in Firefox 149, seeking to before 0:08 is not possible, and if you wait and let it play for a bit, it will freeze.
| Assignee | ||
Comment 16•4 months ago
|
||
(In reply to Kyle Scheuing from comment #15)
This video from the Jellyfin demo instance works normally on firefox <149, but in Firefox 149, seeking to before 0:08 is not possible, and if you wait and let it play for a bit, it will freeze.
This requires login, do you have any other open example I can try with? Thanks!
Comment 17•4 months ago
|
||
(In reply to Alastor Wu [:alwu] from comment #16)
(In reply to Kyle Scheuing from comment #15)
This video from the Jellyfin demo instance works normally on firefox <149, but in Firefox 149, seeking to before 0:08 is not possible, and if you wait and let it play for a bit, it will freeze.
This requires login, do you have any other open example I can try with? Thanks!
I have only experienced the problem with Jellyfin, so I don't have any other examples. There's no password for the demo account, so you should be able to use that. If the login barrier is a hindrance to debugging, let me know and I'll see what I can do.
Comment 19•4 months ago
•
|
||
I can't get a jellyfin stream to play. Just sits there. Note this is on a Mac. I'll check windows 11.
Updated•4 months ago
|
Comment 20•4 months ago
|
||
Same on win11. js console -
[MediaSessionSubscriber] ignoring local player update main.jellyfin.bundle.js:2:182999
Requesting url without automatic networking: https://demo.jellyfin.org/stable/Sessions/Playing/Progress node_modules.jellyfin-apiclient.bundle.js:2:14622
[MediaSessionSubscriber] ignoring local player update main.jellyfin.bundle.js:2:182999
Requesting url without automatic networking: https://demo.jellyfin.org/stable/Sessions/Playing/Progress node_modules.jellyfin-apiclient.bundle.js:2:14622
Uncaught (in promise) DOMException: The fetching process for the media resource was aborted by the user agent at the user's request. [MediaSessionSubscriber] ignoring local player update main.jellyfin.bundle.js:2:182999
Requesting url without automatic networking: https://demo.jellyfin.org/stable/Sessions/Playing/Progress node_modules.jellyfin-apiclient.bundle.js:2:14622
[MediaSessionSubscriber] ignoring local player update main.jellyfin.bundle.js:2:182999
Requesting url without automatic networking: https://demo.jellyfin.org/stable/Sessions/Playing/Progress node_modules.jellyfin-apiclient.bundle.js:2:14622
Uncaught (in promise) DOMException: The fetching process for the media resource was aborted by the user agent at the user's request.
Comment 21•4 months ago
|
||
Same issue in Plex using "alternate streaming protocol for video playback" in the Plex Web Application (app.plex.tv) Debug settings, which forces HLS streaming (instead of DASH). Can reproduce with OTA Live TV streaming which requires transcoding from MPEG2 to h264 for browser playback. The possible delay introduced by the transcoder may be causing the stall, but the video will not begin playback on initial load. The firefox developer window reports "[Player] A non-critical HLSjs error occurred: bufferStalledError". Manually seeking back a few seconds will allow the video to play (typically). Also affects DVR recordings in Plex, as they too are stored in MPEG2 and must be transcoded.
| Assignee | ||
Comment 22•4 months ago
|
||
Ok, now I can reproduce the error, keep my NI, I will report back what I found later.
| Assignee | ||
Updated•4 months ago
|
Updated•4 months ago
|
Comment 24•4 months ago
|
||
Same issue on Windows 11 in Firefox 149.0.
Comment 25•4 months ago
|
||
First 10 seconds skipped of any video in my case. Seek is also broken.
| Assignee | ||
Comment 26•4 months ago
|
||
Can anyone try these builds to see if it fixes the problem or not? Thanks!
Windows : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Iizn6jpHSn24InId2lXCUQ/runs/0/artifacts/public/build/target.zip
Linux : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/GOJFp2zPTMyLfKI1XQJSiA/runs/0/artifacts/public/build/target.tar.xz
MacOS : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/BFxgSDAWRwOB94iK5naacg/runs/0/artifacts/public/build/target.dmg
Comment 27•4 months ago
|
||
Unfortunately this doesn't seem to help for me, the first 6-10s segment always gets skipped, even when trying to seek back to the start, with the same error as mentioned above: bufferStalledError
| Assignee | ||
Comment 28•4 months ago
|
||
Could you help to capture a media profile by following this instruction? Thanks!
Comment 29•4 months ago
|
||
Absolutely, here it is: https://share.firefox.dev/4crGyHS
I tried seeking to the start a few times to trigger the error.
Also I'm on Linux (CachyOS / Arch), if that's relevant
| Assignee | ||
Comment 30•4 months ago
•
|
||
Does this happen on every video, or only on specific ones? Also, when the video gets stuck, have you tried seeking forward to a later timestamp (not the start)? Thanks!
Comment 31•4 months ago
|
||
After trying out some videos in my Jellyfin library, it does seem like some videos aren't affected, but I cannot find any commonalities between those. It's not one specific codec that doesn't work, or something like that.
Specifically the video from above, from the demo jellyfin instance has the same problem, even on the new build.
And this one actually works fine, very odd...
| Assignee | ||
Comment 32•4 months ago
|
||
It looks like your issue may be different. Based on your profile, playback does start, but Jellyfin appears to repeatedly perform seeks, interrupting playback multiple times. Have you only encountered this issue on Jellyfin, or can you reproduce it on other websites as well?
Comment 33•4 months ago
|
||
(In reply to Alastor Wu [:alwu] from comment #26)
Can anyone try these builds to see if it fixes the problem or not? Thanks!
Windows : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Iizn6jpHSn24InId2lXCUQ/runs/0/artifacts/public/build/target.zip
Linux : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/GOJFp2zPTMyLfKI1XQJSiA/runs/0/artifacts/public/build/target.tar.xz
MacOS : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/BFxgSDAWRwOB94iK5naacg/runs/0/artifacts/public/build/target.dmg
I'm seeing an improvement on the Linux build, it still skips the first 3 seconds but seems to play ok after that (at least for a minute which is way further than it did before)
Comment 34•4 months ago
|
||
I do think this is the same issue, or at least part of it. It also started happening in this version and is also connected to HLS.
For me, I have only seen this with jellyfin, however that is also the only video platform I use, besides youtube.
And for me, on videos that have such problems, it's been 2 specific issues:
- playback starts at the 6-10s mark, seeking back to the very start does not work, it just keeps restarting at that same mark.
- sometimes, not always, the video will then halt at around the 16-20s mark and will not continue, unless I seek forwards and it will keep going at around the 40-50s mark
So basically, that first segment is always unreachable, and sometimes a second segment is also unseekable.
As for the repeated seeks in my trace: I manually seemed back to the very start of the video, to trigger that first issue, where it wouldn't go to the very start.
In this instance, I did not get the 2nd issue, of the playback stopping at around the 16-20s mark
| Assignee | ||
Comment 35•4 months ago
|
||
How about this build? Could anyone help me try it again? Thanks!
Linux : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Sw1O59MmRpmsxyVzdfdW3w/runs/0/artifacts/public/build/target.tar.xz
MacOS : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/cwTaO30MQ1yjT3mB3pftGA/runs/0/artifacts/public/build/target.dmg
Windows : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/EYPqP__CSPmAYtkLhtpaRQ/runs/0/artifacts/public/build/target.zip
Comment 36•4 months ago
|
||
That latest build fixed it for me. Thanks.
Comment 37•4 months ago
|
||
(In reply to Alastor Wu [:alwu] from comment #35)
How about this build? Could anyone help me try it again? Thanks!
Linux : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Sw1O59MmRpmsxyVzdfdW3w/runs/0/artifacts/public/build/target.tar.xz
MacOS : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/cwTaO30MQ1yjT3mB3pftGA/runs/0/artifacts/public/build/target.dmg
Windows : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/EYPqP__CSPmAYtkLhtpaRQ/runs/0/artifacts/public/build/target.zip
This build fixes it for me too
Comment 38•4 months ago
|
||
Yuup, for me too, thanks for the amazing work!
Comment 39•4 months ago
|
||
(In reply to Alastor Wu [:alwu] from comment #35)
How about this build? Could anyone help me try it again? Thanks!
Linux : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Sw1O59MmRpmsxyVzdfdW3w/runs/0/artifacts/public/build/target.tar.xz
MacOS : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/cwTaO30MQ1yjT3mB3pftGA/runs/0/artifacts/public/build/target.dmg
Windows : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/EYPqP__CSPmAYtkLhtpaRQ/runs/0/artifacts/public/build/target.zip
This build fixes the issue for me too on Windows 11.
Note that the issue affects Firefox 149 too, not sure why it is tagged unaffected. Requesting uplift and 149.0.1 if possible.
| Assignee | ||
Comment 40•4 months ago
|
||
Thanks, I’ll submit my patches later. Since this issue is quite complex, I don’t expect them to be uplifted to 149 right away. They’ll need some time to ensure there’s no breakage, but I will aim to uplift them to 150.
Comment 41•4 months ago
|
||
(In reply to Alastor Wu [:alwu] from comment #35)
How about this build? Could anyone help me try it again? Thanks!
Linux : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Sw1O59MmRpmsxyVzdfdW3w/runs/0/artifacts/public/build/target.tar.xz
MacOS : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/cwTaO30MQ1yjT3mB3pftGA/runs/0/artifacts/public/build/target.dmg
Windows : https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/EYPqP__CSPmAYtkLhtpaRQ/runs/0/artifacts/public/build/target.zip
Can confirm this fixes the issue - Windows 10 - Jellyfin.
| Assignee | ||
Comment 42•4 months ago
|
||
On HLS streams where the buffered range starts at a non-zero timestamp,
a seek can stall indefinitely. When data is not yet available at the
seek target, MFR issues an internal seek to re-prime the decoder from
the nearest keyframe, decoding and dropping frames until it reaches the
target. MFR correctly identifies when the target frame arrives, but
fails to notify MDSM that the data it was waiting for is now available,
leaving the player stuck.
This patch clears the waiting state and resolves the pending WaitForData
promise when the frame-drop loop reaches its target.
| Assignee | ||
Comment 43•4 months ago
|
||
When the MSE buffer starts at a non-zero timestamp, MDSM's BufferingState
calls RequestVideoData with time=0. The MSE demuxer has no data at t=0 and
returns WAITING_FOR_DATA immediately, causing a permanent stall.
Pass GetMediaTime() to RequestVideoData so MFR seeks to and decodes from
the actual playback position.
| Assignee | ||
Comment 44•4 months ago
|
||
When MSE coded-frame processing removes frames from a previous segment
(spec-correct behaviour), the next available sample can be far ahead of
the expected timestamp. GetSample treats this as a missing-data gap and
returns nullptr, causing WAITING_FOR_DATA even though the data is buffered.
Add aAllowGapCrossing parameter to the private GetSample; when true, return
the sample if it falls within the sanitized buffered ranges instead of
treating the gap as missing data.
| Assignee | ||
Comment 45•4 months ago
|
||
When filling silence before a time-gapped audio frame, the cap on
missingFrames was computed in output-rate frames, but missingFrames is
in input-rate frames. On a 2x resampling path this made the silence
buffer twice the ring-buffer capacity; the overflow was silently dropped,
writing only half the required silence, draining the ring buffer and
causing MDSM to enter BUFFERING permanently.
| Assignee | ||
Comment 46•4 months ago
|
||
Some encoders encode the AAC pre-roll delay as 2^64-N in the tfdt
baseMediaDecodeTime field (e.g. 2^64-2048 for a 2048-sample delay).
Firefox's CheckedInt rejects this as out-of-range for int64_t, causing
ParseTrun to return Err and the entire audio moof to be skipped.
Reinterpret the unsigned tfdt as a signed int64_t before assigning to
CheckedInt so that 2^64-N becomes -N (a small negative value). The
existing edit-list mechanism then subtracts mMediaStart to compute the
correct presentation timestamps for the pre-roll frames, matching the
behaviour of Chromium's track_run_iterator.cc.
Accumulation overflow during per-sample decode time computation is still
caught by the isValid() check in the loop below.
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
| Assignee | ||
Comment 47•4 months ago
|
||
| Assignee | ||
Comment 48•4 months ago
|
||
Updated•4 months ago
|
Updated•4 months ago
|
Comment 49•4 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: HLS playback on some websites may stall, requiring users to manually seek to start playback.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: no
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: 1. Go to https://demo.jellyfin.org/stable/web/#/details?id=f717d85df782816c2ab75423e32f740b&serverId=f0b3381645f04afb9a0e392e74b6a1b0
- Click the image above demo, which will leads you to a video selection page
- Click any episode to start playback
- Video should start playing successfuly
- Risk associated with taking this patch: low
- Explanation of risk level: Only a value conversion from unsigned to signed, it doesn't introduce any behavior/structural change.
- String changes made/needed?: No.
- Is Android affected?: unknown
| Assignee | ||
Comment 50•4 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D292537
Comment 51•4 months ago
|
||
Comment 52•4 months ago
|
||
| bugherder | ||
| Assignee | ||
Updated•4 months ago
|
Updated•4 months ago
|
Comment 55•3 months ago
|
||
Thanks for fixing the issue.
I was working on a fix for this as part of bug 2028504 and realized this got fixed recently.
Bug 2004835 introduced the issue. It's my change, sorry for introducing a regression: I didn't realized this could happen.
I agree this should be fixed, since we had several reports from the fields about media files which become non playable after that change, which are furthermore playable in other browsers.
For the record, just to give a bit of background on why I thought my change initially made sense (quoting what I said in bug 2027232 comment 4 and 6.
Those files don't seem to be spec compliant, since the spec requires unsigned integers:
Quoting ISO/IEC 14496-12:
8.8.12.2 Syntax
aligned(8) class TrackFragmentBaseMediaDecodeTimeBox
extends FullBox(‘tfdt’, version, 0) {
if (version==1) {
unsigned int(64) baseMediaDecodeTime;
} else { // version==0
unsigned int(32) baseMediaDecodeTime;
}
}
I think it works on Chrome because it has the same behavior as before bug 2004835 was fixed in Firefox: it does an implicit conversion from uint64_t to int64_t when parsing those boxes.
With definition of the function here (which takes an int64_t and perform implicit conversion):
https://chromium.googlesource.com/chromium/src/media/+/0cdde77f5a42025c4dfac9802607f2e632e4c7d6/mp4/track_run_iterator.cc#15
And definition of the variables here (which is uint64_t as specified in the specification):
https://chromium.googlesource.com/chromium/src/+/88d5fa137b3569d0297719f7def757731fb37b87/media/formats/mp4/box_definitions.h#456
Updated•3 months ago
|
Updated•3 months ago
|
Comment 56•3 months ago
|
||
| uplift | ||
Comment 57•3 months ago
|
||
Reproduced the issue in Release 149.0.2
Verified - Fixed in Beta 150.0b9(build id: 20260413090345) and Nightly 151.0a1(build id: 20260413220854). The Jellyfin videos are playing accordingly in the mentioned Fx versions.
Description
•