hls.js
hls.js copied to clipboard
Buffer stalled error but only in Chrome 96 + hls.js 1.1.2
What version of Hls.js are you using?
1.1.2
What browser (including version) are you using?
Chrome/96.0.4664.110 Safari/537.36
What OS (including version) are you using?
Mac OS 12.1
Test stream
https://h4ahsm.cfeucdn.com/test/1/test.mp4.m3u8
Configuration
{ "debug": true,
"enableWorker": true,
"lowLatencyMode": true,
"backBufferLength": 90
}
Additional player setup steps
https://hls-js.netlify.app/demo/?src=https%3A%2F%2Fh4ahsm.cfeucdn.com%2Ftest%2F1%2Ftest.mp4.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==
Checklist
- [X] The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues
- [X] The issue occurs in the stable client (latest release) on https://hls-js.netlify.com/demo and not just on my page
- [X] The issue occurs in the latest client (main branch) on https://hls-js-dev.netlify.com/demo and not just on my page
- [X] The stream has correct Access-Control-Allow-Origin headers (CORS)
- [X] There are no network errors such as 404s in the browser console when trying to play the stream
Steps to reproduce
- Start play stream in Chrome on hls 1.1.2 and wait till 1:40 on this time video will freeze and stop for a some secs
- Buffer staled error happen only in Chrome, no such error in Firefox, no such error in other hls players like Clappr, Flowplayer, Videojs-Contrib-hls
Expected behaviour
What actually happened?
Console output
gap-controller.ts:208 [warn] > Playback stalling at @102.944047 due to low buffer (buffer=37.072278)
_reportStall @ gap-controller.ts:208
poll @ gap-controller.ts:145
checkBuffer @ stream-controller.ts:919
onTickEnd @ stream-controller.ts:201
doTick @ stream-controller.ts:196
tick @ task-loop.ts:110
00:09:53.484 latency-controller.ts:185 [warn] > [playback-rate-controller]: Stall detected, adjusting target latency
onError @ latency-controller.ts:185
emit @ index.js:203
emit @ hls.ts:250
trigger @ hls.ts:258
_reportStall @ gap-controller.ts:211
poll @ gap-controller.ts:145
checkBuffer @ stream-controller.ts:919
onTickEnd @ stream-controller.ts:201
doTick @ stream-controller.ts:196
tick @ task-loop.ts:110
00:09:53.485 main.js:725 Error event: {type: 'mediaError', details: 'bufferStalledError', fatal: false, buffer: 37.072278}
(анонимная) @ main.js:725
emit @ index.js:203
emit @ hls.ts:250
trigger @ hls.ts:258
_reportStall @ gap-controller.ts:211
poll @ gap-controller.ts:145
checkBuffer @ stream-controller.ts:919
onTickEnd @ stream-controller.ts:201
doTick @ stream-controller.ts:196
tick @ task-loop.ts:110
00:09:55.284 gap-controller.ts:189 [warn] > Trying to nudge playhead over buffer-hole
_tryFixBufferStall @ gap-controller.ts:189
poll @ gap-controller.ts:153
checkBuffer @ stream-controller.ts:919
onTickEnd @ stream-controller.ts:201
doTick @ stream-controller.ts:196
tick @ task-loop.ts:110
00:09:55.285 gap-controller.ts:276 [warn] > Nudging 'currentTime' from 102.944047 to 103.04404699999999
_tryNudgeBuffer @ gap-controller.ts:276
_tryFixBufferStall @ gap-controller.ts:194
poll @ gap-controller.ts:153
checkBuffer @ stream-controller.ts:919
onTickEnd @ stream-controller.ts:201
doTick @ stream-controller.ts:196
tick @ task-loop.ts:110
00:09:55.285 main.js:725 Error event: {type: 'mediaError', details: 'bufferNudgeOnStall', fatal: false}
(анонимная) @ main.js:725
emit @ index.js:203
emit @ hls.ts:250
trigger @ hls.ts:258
_tryNudgeBuffer @ gap-controller.ts:278
_tryFixBufferStall @ gap-controller.ts:194
poll @ gap-controller.ts:153
checkBuffer @ stream-controller.ts:919
onTickEnd @ stream-controller.ts:201
doTick @ stream-controller.ts:196
tick @ task-loop.ts:110
00:09:55.286 base-stream-controller.ts:199 [log] > [stream-controller]: media seeking to 103.044, state: IDLE
00:09:55.286 base-stream-controller.ts:199 [log] > [audio-stream-controller]: media seeking to 103.044, state: STOPPED
00:09:55.287 base-stream-controller.ts:199 [log] > [subtitle-stream-controller]: media seeking to 103.044, state: IDLE
00:09:55.359 stream-controller.ts:530 [log] > [stream-controller]: Media seeked to 103.044
00:09:55.383 gap-controller.ts:60 [warn] > playback not stuck anymore @103.06282, after 24ms
Chrome media internals output
No response
Also experiencing this -- works fine in Firefox and Safari.
Also seeing this. Believe it's tied to #4342, #3905. Have a test stream that reproduces this as well. Confirmed that this problem was not present in 0.1.4, but occurs starting in 1.0.0.
@cmcfadden you mean only downgrade can be fix that problem
@longcharmroeun as far as I've been able to find right now, yes.
Start play stream in Chrome on hls 1.1.2 and wait till 1:40 on this time video will freeze and stop for a some secs
HLS.js produces a gap at 1:40 using this stream. You can see it clearly in the demo page timeline chart. Chrome appears to play through the gap, but stalls 1 second after at which point HLS.js reports the stall at currentTime which is in a buffered range, one second after the problematic gap. This is likely an issue with the media encoder and or segmenter producing segment that the player has difficultly appending seemlessly.
I think I have another reproduction here. Happy to open another issue if it's different
https://hls-js.netlify.app/demo/?src=https%3A%2F%2Fdescriptusercontent.com%2Fpublished%2F7915b9ed-e84b-4687-a489-061a535b4e16%2Fplaylist.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==
I think I have another reproduction here. Happy to open another issue if it's different
Please do. Thanks!
Hi @Vladislavik, cc @colinricardo @cmcfadden @longcharmroeun @hipstersmoothie,
Let me know if #5805 resolves this issue for you. If should prevent the gap in Chrome without introducing new regressions in buffering.
https://bugfix-chrome-avc-overlap-m2.hls-js-4zn.pages.dev/
Working for me in dev. Will verify again in next prerelease.
Closing as fixed in v1.5.0-beta.1