constant bufferStalledError
and audio/video drops
#6767
Replies: 6 comments 2 replies
-
I have managed to improve the playback situation with the following config values: initialLiveManifestSize: 3,
backBufferLength: 2,
maxBufferLength: 40,
frontBufferFlushThreshold: 60,
maxFragLookUpTolerance: 1, I suspect that |
Beta Was this translation helpful? Give feedback.
-
Hi @chrisdeely, I would start by looking at your HTMLMediaElement's Next does performance improve if you prevent adaptation to the higher bitrates ( And last, can you try v1.6.0-beta.1?
Are the attached logs all for one single session? I see a lot of player instance creation and destroy > detachMedia > attachMedia. Can you isolate a single session with frequent stalls? |
Beta Was this translation helpful? Give feedback.
-
The more I look at this, the more I think the
Is it possible that the |
Beta Was this translation helpful? Give feedback.
-
Here is an updated set of logs for a single track being played using this config: new Hls({
debug: true,
initialLiveManifestSize: 3,
backBufferLength: 6, // 3x target segment duration
maxBufferLength: 40,
maxMaxBufferLength: 40, // set to equal the `maxBufferLength` - I was unclear if the recommendation was for them to be the same?
frontBufferFlushThreshold: 60,
maxFragLookUpTolerance: 1
}); Despite the frequent stall warnings, I did not actually notice any playback failures with this config.
|
Beta Was this translation helpful? Give feedback.
-
Is the user or your app doing anything to cause these buffer removal operations (like setting
This is probably the result of currentTime not updating for over 250ms while playback is active with media in the buffer. On a legacy platform or browsers that throttle currentTime updates this can occur thanks to some shortcomings of stall detection in the gap-controller (tracked under gap-controller ). |
Beta Was this translation helpful? Give feedback.
-
Can you provide steps to reproduce? What legacy platform is this on?
No. They can be ignored. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I am encountering some severe playback issues on a finicky legacy platform which do not occur on any modern desktop browsers. I believe this to be much more a platform issue and unlikely to be a defect in hls.js itself. I am hoping some of the experts here can help me fine tune my implementation in order to get this to function properly.
I have tested this using the latest hls.js version (1.5.16 as of writing) with the default configuration other than adding
debug: true
.The problem I am encountering is that I see continual
bufferStalledError
s reported and have audio and video stalls/drops. Playback recovers each time, but the result is unwatchable for a consumer.I have played with higher and lower buffer size settings, but have had no real improvement. Seeking/scrubbing back and forth through the video is not a priority for this implementation, so having a back buffer is not important.
I have attempted to debug this issue by adding an HTML textarea displaying the same metrics as shown on the hls.js demo page under "Buffer state". When the
bufferStalledError
events are thrown, theBuffered
time range does appear to cover the current playhead and next segment.I have attached a long log file which covers the playback of 3-4 tracks back-to-back, all exhibiting the same behavior.
hls-buffer-stalls.txt
The videos in question are all rather "uncomplicated" - very low motion, mostly text with background audio. The file segments are regularly partitioned at ~2 seconds.
Are there any tips on how I can collect other useful telemetry?
Any settings to try?
Sample video (I cannot share actual test streams as they are under license restrictions)
Sample audio manifest
Sample video playlist
Beta Was this translation helpful? Give feedback.
All reactions