-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Milestone
Description
What version of Hls.js are you using?
v1.6.15
What browser (including version) are you using?
Chrome
What OS (including version) are you using?
macOS
Test stream
Can be shared privately
Configuration
{
"debug": true,
"enableWorker": true,
"lowLatencyMode": true,
"backBufferLength": 90,
"startPosition": -1,
"startLevel": -1,
"defaultAudioCodec": "mp4a.40.2",
"abrEwmaDefaultEstimate": 10000000,
"playlistLoadPolicy": {
"default": {
"maxTimeToFirstByteMs": 20000,
"maxLoadTimeMs": 30000,
"timeoutRetry": {
"maxNumRetry": 10,
"retryDelayMs": 200,
"maxRetryDelayMs": 1000,
"backoff": "exponential"
},
"errorRetry": {
"maxNumRetry": 25,
"retryDelayMs": 1000,
"maxRetryDelayMs": 8000,
"backoff": "exponential"
}
}
},
"fragLoadPolicy": {
"default": {
"maxTimeToFirstByteMs": 20000,
"maxLoadTimeMs": 120000,
"timeoutRetry": {
"maxNumRetry": 10,
"retryDelayMs": 200,
"maxRetryDelayMs": 1000,
"backoff": "exponential"
},
"errorRetry": {
"maxNumRetry": 25,
"retryDelayMs": 1000,
"maxRetryDelayMs": 8000,
"backoff": "exponential"
}
}
}
}Additional player setup steps
No response
Checklist
- The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues
- The issue occurs in the stable client (latest release) on https://hlsjs.video-dev.org/demo and not just on my page
- The issue occurs in the latest client (main branch) on https://hlsjs-dev.video-dev.org/demo and not just on my page
- The stream has correct Access-Control-Allow-Origin headers (CORS)
- There are no network errors such as 404s in the browser console when trying to play the stream
Steps to reproduce
- Load the URL with the broken video
- Press play
- Immediate browser hang
Expected behaviour
Browser should not hang
What actually happened?
Browser hangs, from my naive debugging it seems to spend a lot of time in _trySkipBufferHole specifically here:
while (pos < startTime) {
const provisioned = appendedFragAtPosition(pos, fragmentTracker);
if (provisioned) {
pos += provisioned.duration;
} else {
moreToLoad = true;
break;
}
}
But that might just be a fluke.
Console output
buffer-controller.ts:952 [log] > [buffer-controller]: queuing "video" append sn: 2 of level 0 cc: 0
14:27:05.405 transmuxer-interface.ts:396 [log] > [transmuxer.ts]: Flushed main sn: 2 of level 0
14:27:05.408 base-stream-controller.ts:2235 [log] > [stream-controller]: PARSING->PARSED
14:27:05.408 base-stream-controller.ts:2182 [log] > [stream-controller]: Parsed main sn: 2 of level 0 (frag:[2.680-2.680])
14:27:05.413 base-stream-controller.ts:768 [log] > [stream-controller]: Buffered main sn: 2 of level 0 (frag:[2.680-2.680] > buffer:[0.000-1.340][2.680-4.020])
14:27:05.413 base-stream-controller.ts:2235 [log] > [stream-controller]: PARSED->IDLE
14:27:07.114 installHook.js:1 [warn] > [gap-controller]: Playback stalling at @0 due to low buffer ({"len":0,"start":0,"end":0,"nextStart":3.329656,"buffered":[{"start":3.329656,"end":4.020161}],"bufferedIndex":-1})
overrideMethod @ installHook.js:1
_reportStall @ gap-controller.ts:520
poll @ gap-controller.ts:317
tick @ gap-controller.ts:147
GapController._this.onMediaWaiting @ gap-controller.ts:124Understand this warning
14:27:07.114 interstitials-controller.ts:2888 [log] > [interstitials]: Primary player stall @0 bufferedPos: 0
14:27:07.114 installHook.js:1 Error event: {type: 'mediaError', details: 'bufferStalledError', fatal: false, error: Error: Playback stalling at @0 due to low buffer ({"len":0,"start":0,"end":0,"nextStart":3.329656,"…, buffer: 0, …}
overrideMethod @ installHook.js:1
(anonymous) @ main.js:745
emit @ index.js:203
emit @ hls.ts:386
trigger @ hls.ts:394
_reportStall @ gap-controller.ts:521
poll @ gap-controller.ts:317
tick @ gap-controller.ts:147
GapController._this.onMediaWaiting @ gap-controller.ts:124Understand this warningChrome media internals output
{
"properties": {
"render_id": 5566,
"player_id": 1,
"created": "2025-11-19 13:27:05.107286 UTC",
"origin_url": "https://hlsjs.video-dev.org/",
"kFrameUrl": "https://hlsjs.video-dev.org/demo/",
"kFrameTitle": "hls.js demo",
"url": "blob:https://hlsjs.video-dev.org/cee7b1e5-1c94-4bfd-87c2-6fbbc033ed90",
"info": "Effective playback rate changed from 0 to 1",
"kRendererName": "RendererImpl",
"pipeline_state": "kPlaying",
"kVideoTracks": [
{
"alpha mode": "is_opaque",
"codec": "h264",
"coded size": "3840x2160",
"color space": {
"matrix": "RGB",
"primaries": "BT709",
"range": "FULL",
"transfer": "IEC61966_2_1"
},
"encryption scheme": "Unencrypted",
"has extra data": false,
"hdr metadata": "unset",
"natural size": "3840x2160",
"orientation": "0°",
"profile": "h264 baseline",
"visible rect": "0,0 3840x2160"
}
],
"kAudioTracks": [
{
"bytes per channel": 2,
"bytes per frame": 4,
"channel layout": "STEREO",
"channels": 2,
"codec": "aac",
"codec delay": 0,
"discard decoder delay": false,
"encryption scheme": "Unencrypted",
"has extra data": true,
"profile": "unknown",
"sample format": "Signed 16-bit",
"samples per second": 48000,
"seek preroll": "0us"
}
],
"kIsAudioDecryptingDemuxerStream": false,
"kAudioDecoderName": "FFmpegAudioDecoder",
"kIsPlatformAudioDecoder": false,
"debug": "Partial append window trimming dropping unused audio preroll buffer with PTS -10430927us that ends too far (-13739229us) from next buffer with PTS 3329656us",
"kIsVideoDecryptingDemuxerStream": false,
"kVideoDecoderName": "VideoToolboxVideoDecoder",
"kIsPlatformVideoDecoder": true,
"dimensions": "3840x2160",
"kResolution": "3840x2160",
"duration": 6096.605953,
"video_buffering_state": {
"state": "BUFFERING_HAVE_ENOUGH"
},
"event": "kPlay"
},
"events": [
{
"time": 0,
"key": "created",
"value": "2025-11-19 13:27:05.107286 UTC"
},
{
"time": 0.06000000238418579,
"key": "origin_url",
"value": "https://hlsjs.video-dev.org/"
},
{
"time": 0.062000006437301636,
"key": "kFrameUrl",
"value": "https://hlsjs.video-dev.org/demo/"
},
{
"time": 0.06299999356269836,
"key": "kFrameTitle",
"value": "hls.js demo"
},
{
"time": 0.09400001168251038,
"key": "url",
"value": "blob:https://hlsjs.video-dev.org/cee7b1e5-1c94-4bfd-87c2-6fbbc033ed90"
},
{
"time": 0.10700002312660217,
"key": "info",
"value": "ChunkDemuxer"
},
{
"time": 0.11400002241134644,
"key": "kRendererName",
"value": "RendererImpl"
},
{
"time": 0.16100001335144043,
"key": "pipeline_state",
"value": "kStarting"
},
{
"time": 238.48900002241135,
"key": "kVideoTracks",
"value": [
{
"alpha mode": "is_opaque",
"codec": "h264",
"coded size": "3840x2160",
"color space": {
"matrix": "RGB",
"primaries": "BT709",
"range": "FULL",
"transfer": "IEC61966_2_1"
},
"encryption scheme": "Unencrypted",
"has extra data": false,
"hdr metadata": "unset",
"natural size": "3840x2160",
"orientation": "0°",
"profile": "h264 baseline",
"visible rect": "0,0 3840x2160"
}
]
},
{
"time": 238.5310000181198,
"key": "kAudioTracks",
"value": [
{
"bytes per channel": 2,
"bytes per frame": 4,
"channel layout": "STEREO",
"channels": 2,
"codec": "aac",
"codec delay": 0,
"discard decoder delay": false,
"encryption scheme": "Unencrypted",
"has extra data": true,
"profile": "unknown",
"sample format": "Signed 16-bit",
"samples per second": 48000,
"seek preroll": "0us"
}
]
},
{
"time": 239.1870000064373,
"key": "info",
"value": "Dropping audio frame (DTS -74311240us PTS -74311240us,-74289907us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 239.1879999935627,
"key": "info",
"value": "Dropping audio frame (DTS -74289907us PTS -74289907us,-73236678us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 239.18900001049042,
"key": "info",
"value": "Dropping audio frame (DTS -73236677us PTS -73236677us,-73214927us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 239.1899999976158,
"key": "info",
"value": "Dropping audio frame (DTS -73214927us PTS -73214927us,-73193594us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 239.1899999976158,
"key": "info",
"value": "Dropping audio frame (DTS -73193594us PTS -73193594us,-73171844us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 239.19100001454353,
"key": "info",
"value": "Dropping audio frame (DTS -73171844us PTS -73171844us,-73150511us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 239.19200000166893,
"key": "info",
"value": "Dropping audio frame (DTS -73150511us PTS -73150511us,-73129178us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 239.19800001382828,
"key": "info",
"value": "Dropping audio frame (DTS -73129177us PTS -73129177us,-73107448us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 239.19800001382828,
"key": "info",
"value": "Dropping audio frame (DTS -73107448us PTS -73107448us,-73086115us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 239.19900000095367,
"key": "info",
"value": "(Log limit reached. Further similar entries may be suppressed): Dropping audio frame (DTS -73086115us PTS -73086115us,-73064782us) that is outside append window [0us,9223372036854775807us)."
},
{
"time": 261.5620000064373,
"key": "kIsAudioDecryptingDemuxerStream",
"value": false
},
{
"time": 261.5640000104904,
"key": "kAudioDecoderName",
"value": "FFmpegAudioDecoder"
},
{
"time": 261.5649999976158,
"key": "kIsPlatformAudioDecoder",
"value": false
},
{
"time": 261.57000002264977,
"key": "info",
"value": "Selected FFmpegAudioDecoder for audio decoding, config: codec: aac, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 48000, sample_format: Signed 16-bit, bytes_per_frame: 4, seek_preroll: 0us, codec_delay: 0, has extra data: true, encryption scheme: Unencrypted, discard decoder delay: false, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format"
},
{
"time": 261.5929999947548,
"key": "debug",
"value": "Video rendering in low delay mode."
},
{
"time": 261.6050000190735,
"key": "info",
"value": "Cannot select DecryptingVideoDecoder for video decoding"
},
{
"time": 262.25,
"key": "kIsVideoDecryptingDemuxerStream",
"value": false
},
{
"time": 262.2510000169277,
"key": "kVideoDecoderName",
"value": "VideoToolboxVideoDecoder"
},
{
"time": 262.2520000040531,
"key": "kIsPlatformVideoDecoder",
"value": true
},
{
"time": 262.25800001621246,
"key": "info",
"value": "Selected VideoToolboxVideoDecoder for video decoding, config: codec: h264, profile: h264 baseline, level: not available, alpha_mode: is_opaque, coded size: [3840,2160], visible rect: [0,0,3840,2160], natural size: [3840,2160], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:SRGB, matrix:GBR, range:FULL}"
},
{
"time": 262.2670000195503,
"key": "pipeline_state",
"value": "kPlaying"
},
{
"time": 283.5900000035763,
"key": "debug",
"value": "Partial append window trimming dropping unused audio preroll buffer with PTS -10430927us that ends too far (-13739229us) from next buffer with PTS 3329656us"
},
{
"time": 285.3140000104904,
"key": "dimensions",
"value": "3840x2160"
},
{
"time": 285.33799999952316,
"key": "kResolution",
"value": "3840x2160"
},
{
"time": 143.29399999976158,
"key": "duration",
"value": 6096.605953
},
{
"time": 285.1560000181198,
"key": "video_buffering_state",
"value": {
"state": "BUFFERING_HAVE_ENOUGH"
}
},
{
"time": 1997.552000015974,
"key": "info",
"value": "Effective playback rate changed from 0 to 1"
},
{
"time": 1997.6229999959469,
"key": "event",
"value": "kPlay"
}
]
}Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Top priorities