-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hls.js stalls shortly on audio buffer gap #6169
Comments
There may be enhancements to gap jumping that seek pre-emptively (before or stall). That is needed more for video gaps where, in Chrome, the stall occurs after playing through the gap. With audio, the stall happens at or before the gap. The other possible enhancement is to fill audio gaps at discontinuities with silent audio. Eliminating the gaps in your media would eliminate the stall. |
That is browser behavior, not HLS.js. HLS.js is recognizing that playback in the browser stopped advancing with a gap, and followed up with a seek "nudge" to restore playback. Marking with "Works as expected" and "Stream Issue" labels because the stall is only temporary (resolved by the player) and it is a result of jagged start or end times between segments (AV start and end do not align). Removing "Bug" and adding "Enhancement" as there are things hls.js could do to fill this type or gap, or seek over it when playback doesn't advance smoothly over it. |
Thanks @robwalch, just to be certain: when you say |
Note that the same stream actually plays smoothly with shaka player in the same browser despite the gap: AVPlayer in safari also plays it smoothly. Shouldn't hls.js behave the same way as other video players? |
Shaka-player logs that it is seeking over the gap:
An enhancement to seek proactively over gaps has not been implemented in HLS.js. See related issue #5631. It relates more to video buffer gaps which stall differently depending on audio availability. In either case, HLS.js needs to seek over gaps in SourceBuffers that would otherwise result in a stall. |
What version of Hls.js are you using?
v1.5.3,v1.4.14,v1.3.5
What browser (including version) are you using?
Chrome Version 121.0.6167.85 (Official Build) (x86_64)
What OS (including version) are you using?
Mac OS Sonoma 14.3
Test stream
https://storage.googleapis.com/trumantest-public/audio_gap/index.m3u8
Configuration
Additional player setup steps
No response
Checklist
Steps to reproduce
Expected behaviour
No loading spinner before returning to content, smooth playback.
Other players like safari shows no issue.
What actually happened?
Ad the end of the ad before returning to content, the player shows a loading spinner.
Console shows the folowing error:
type: 'mediaError', details: 'bufferStalledError', fatal: false, error: Error: Playback stalling at @31.719066 due to low buffer ({"len":0.05159999999999698,"start":0.12,"…, buffer: 0.05159999999999698, …}
Then bufferNudgeOnStall makes the player resume playing normally.
A gap in audio content shouldn't cause a bufferStalledError, in fact the next media content is there it's just that there is no audio to play for a brief amount of time (<0.07s) before playing the next segment.
Console output
Chrome media internals output
No response
The text was updated successfully, but these errors were encountered: