Skip to content
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

Playback freezes when seeking back to time with EXT-X-GAPs #6814

Open
5 tasks done
luryus opened this issue Oct 28, 2024 · 2 comments
Open
5 tasks done

Playback freezes when seeking back to time with EXT-X-GAPs #6814

luryus opened this issue Oct 28, 2024 · 2 comments

Comments

@luryus
Copy link

luryus commented Oct 28, 2024

What version of Hls.js are you using?

1.5.17

What browser (including version) are you using?

Chrome 130.0.6723.70, Firefox 131.0.3

What OS (including version) are you using?

Windows 11 23H2

Test stream

https://hlsjs.video-dev.org/demo/?src=https%3A%2F%2Fgist.githubusercontent.com%2Fluryus%2Ff54bc840dbe29e69a07b43ca93d0eec9%2Fraw%2F752c23978cf885a36b1675f85cd42615057c5360%2Fbunny_gaps.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==

Configuration

{
  "debug": true,
  "enableWorker": true,
  "lowLatencyMode": true,
  "backBufferLength": 90
}

Additional player setup steps

No response

Checklist

Steps to reproduce

  1. Start playback of the linked test stream. The stream contains GAP segments from about 0:20 to 1:10
  2. Seek to a time after the gap such that the segment right after the gap is no longer buffered
  3. Seek back to the gap
  4. Observe the playback stall

See this screen capture:

screencap.mp4

Expected behaviour

The player skips forward to the segment after the gap, and continues playback.

We're trying to use EXT-X-GAPs to "fill" the playlist in case there are short outages in the video source (e.g. a camera reboot). Basically a similar use case to that in issue #6518 . Is this even the right approach here, or should we do something different instead on the server side?

What actually happened?

The playback stalls when seeking to a time with gaps. This issue happens on both Chrome and Firefox. Safari on macOS works fine.

Console output

...
 [log] > [transmuxer.ts]: Flushed fragment 14 of level 0
 [log] > [stream-controller]: PARSING->PARSED
 [log] > [stream-controller]: Buffered main sn: 14 of level 0 (frag:[139.993-150.023] > buffer:[70.023-150.001])
 [log] > [stream-controller]: PARSED->IDLE
 [log] > [stream-controller]: Loading fragment 15 cc: 0 of [0-63] level: 0, target: 150.001
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [log] > [stream-controller]: Loaded fragment 15 of level 0
 [log] > [stream-controller]: FRAG_LOADING->PARSING
 [log] > [transmuxer.ts]: Flushed fragment 15 of level 0
 [log] > [stream-controller]: PARSING->PARSED
 [log] > [stream-controller]: Buffered main sn: 15 of level 0 (frag:[150.001-160.023] > buffer:[70.023-160.009])
 [log] > [stream-controller]: PARSED->IDLE
 [log] > [stream-controller]: media seeking to 137.566, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 137.566, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 137.566, state: IDLE
 [log] > [stream-controller]: Loading fragment 16 cc: 0 of [0-63] level: 0, target: 160.009
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [log] > [stream-controller]: Loaded fragment 16 of level 0
 [log] > [stream-controller]: FRAG_LOADING->PARSING
 [log] > [transmuxer.ts]: Flushed fragment 16 of level 0
 [log] > [stream-controller]: PARSING->PARSED
 [log] > [stream-controller]: Buffered main sn: 16 of level 0 (frag:[160.009-170.023] > buffer:[70.023-169.993])
 [log] > [stream-controller]: PARSED->IDLE
 [log] > [stream-controller]: Media seeked to 137.566
 [log] > [stream-controller]: media seeking to 150.127, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 150.127, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 150.127, state: IDLE
 [log] > [stream-controller]: Loading fragment 17 cc: 0 of [0-63] level: 0, target: 169.993
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [log] > [stream-controller]: Media seeked to 150.127
 [log] > [stream-controller]: Loaded fragment 17 of level 0
 [log] > [stream-controller]: FRAG_LOADING->PARSING
 [log] > [transmuxer.ts]: Flushed fragment 17 of level 0
 [log] > [stream-controller]: PARSING->PARSED
 [log] > [stream-controller]: Buffered main sn: 17 of level 0 (frag:[169.993-180.023] > buffer:[70.023-180.001])
 [log] > [stream-controller]: PARSED->IDLE
 [log] > [stream-controller]: Loading fragment 18 cc: 0 of [0-63] level: 0, target: 180.001
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [log] > [stream-controller]: Loaded fragment 18 of level 0
 [log] > [stream-controller]: FRAG_LOADING->PARSING
 [log] > [transmuxer.ts]: Flushed fragment 18 of level 0
 [log] > [stream-controller]: PARSING->PARSED
 [log] > [stream-controller]: Buffered main sn: 18 of level 0 (frag:[180.001-190.023] > buffer:[70.023-190.009])
 [log] > [stream-controller]: PARSED->IDLE
 [log] > [stream-controller]: media seeking to 163.884, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 163.884, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 163.884, state: IDLE
 [log] > [stream-controller]: Loading fragment 19 cc: 0 of [0-63] level: 0, target: 190.009
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [log] > [stream-controller]: Loaded fragment 19 of level 0
 [log] > [stream-controller]: FRAG_LOADING->PARSING
 [log] > [transmuxer.ts]: Flushed fragment 19 of level 0
 [log] > [stream-controller]: PARSING->PARSED
 [log] > [stream-controller]: Buffered main sn: 19 of level 0 (frag:[190.009-200.023] > buffer:[70.023-199.993])
 [log] > [stream-controller]: PARSED->IDLE
 [log] > [stream-controller]: Media seeked to 163.884
 [log] > [stream-controller]: media seeking to 174.051, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 174.051, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 174.051, state: IDLE
 [log] > [stream-controller]: Loading fragment 20 cc: 0 of [0-63] level: 0, target: 199.993
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [log] > [stream-controller]: Media seeked to 174.051
 [log] > [buffer-controller] Removing [0,78.56562500000001] from the audio SourceBuffer
 [log] > [buffer-controller] Removing [0,78.56562500000001] from the video SourceBuffer
 [log] > [stream-controller]: Loaded fragment 20 of level 0
 [log] > [stream-controller]: FRAG_LOADING->PARSING
 [log] > [transmuxer.ts]: Flushed fragment 20 of level 0
 [log] > [stream-controller]: PARSING->PARSED
 [log] > [stream-controller]: Buffered main sn: 20 of level 0 (frag:[199.993-210.023] > buffer:[79.990-210.001])
 [log] > [stream-controller]: PARSED->IDLE
 [log] > [stream-controller]: media seeking to 35.887, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 35.887, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 35.887, state: IDLE
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 3 cc: 0 of [0-63] level: 0, target: 35.887
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 4 cc: 0 of [0-63] level: 0, target: 40.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 5 cc: 0 of [0-63] level: 0, target: 50.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 6 cc: 0 of [0-63] level: 0, target: 60.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: buffer full after gaps in "main" playlist starting at sn: 7
 [warn] > skipping hole, adjusting currentTime from 35.886899 to 80.0399
_trySkipBufferHole @ hls.js:27248
 [log] > [stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 80.040, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [stream-controller]: Media seeked to 80.040
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: buffer full after gaps in "main" playlist starting at sn: 7
 [log] > [stream-controller]: media seeking to 34.691, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 34.691, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 34.691, state: IDLE
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 3 cc: 0 of [0-63] level: 0, target: 34.691
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 4 cc: 0 of [0-63] level: 0, target: 40.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 5 cc: 0 of [0-63] level: 0, target: 50.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 6 cc: 0 of [0-63] level: 0, target: 60.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: buffer full after gaps in "main" playlist starting at sn: 7
 [warn] > skipping hole, adjusting currentTime from 34.690669 to 80.0399
_trySkipBufferHole @ hls.js:27248
 [log] > [stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 80.040, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [stream-controller]: Media seeked to 80.040
 [log] > [stream-controller]: media seeking to 40.074, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 40.074, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 40.074, state: IDLE
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 4 cc: 0 of [0-63] level: 0, target: 40.074
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 5 cc: 0 of [0-63] level: 0, target: 50.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 6 cc: 0 of [0-63] level: 0, target: 60.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: buffer full after gaps in "main" playlist starting at sn: 7
 [warn] > skipping hole, adjusting currentTime from 40.073704 to 80.0399
_trySkipBufferHole @ hls.js:27248
 [log] > [stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 80.040, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [stream-controller]: Media seeked to 80.040
 [log] > [stream-controller]: media seeking to 54.428, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 54.428, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 54.428, state: IDLE
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 5 cc: 0 of [0-63] level: 0, target: 54.428
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 6 cc: 0 of [0-63] level: 0, target: 60.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: buffer full after gaps in "main" playlist starting at sn: 7
 [warn] > skipping hole, adjusting currentTime from 54.428463 to 80.0399
_trySkipBufferHole @ hls.js:27248
 [log] > [stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 80.040, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [stream-controller]: Media seeked to 80.040
 [log] > [stream-controller]: media seeking to 28.710, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 28.710, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 28.710, state: IDLE
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 2 cc: 0 of [0-63] level: 0, target: 28.71
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 3 cc: 0 of [0-63] level: 0, target: 30.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 4 cc: 0 of [0-63] level: 0, target: 40.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 5 cc: 0 of [0-63] level: 0, target: 50.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: Loading fragment 6 cc: 0 of [0-63] level: 0, target: 60.008
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ hls.js:24928
 [log] > [stream-controller]: FRAG_LOADING->IDLE
 Error event: Object
(anonymous) @ hls-demo.js:24783
 [info] > [abr] buffer is empty, optimal quality level 0
 [log] > [stream-controller]: buffer full after gaps in "main" playlist starting at sn: 7
 [warn] > skipping hole, adjusting currentTime from 28.709519 to 80.0399
_trySkipBufferHole @ hls.js:27248
 [log] > [stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 80.040, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 80.040, state: IDLE
 [log] > [stream-controller]: Media seeked to 80.040
 [log] > [stream-controller]: media seeking to 198.574, state: IDLE
 [log] > [audio-stream-controller]: media seeking to 198.574, state: STOPPED
 [log] > [subtitle-stream-controller]: media seeking to 198.574, state: IDLE
 [log] > [stream-controller]: Loading fragment 21 cc: 0 of [0-63] level: 0, target: 210.001
 [log] > [stream-controller]: IDLE->FRAG_LOADING
 [log] > [stream-controller]: Loaded fragment 21 of level 0
 [log] > [stream-controller]: FRAG_LOADING->PARSING
transmuxer-interface.ts:394 [log] > [transmuxer.ts]: Flushed fragment 21 of level 0
base-stream-controller.ts:1801 [log] > [stream-controller]: PARSING->PARSED
level-controller.ts:549 [log] > [level-controller]: Resetting level error count of 18 on frag buffered
base-stream-controller.ts:570 [log] > [stream-controller]: Buffered main sn: 21 of level 0 (frag:[210.001-220.023] > buffer:[79.990-220.009])
base-stream-controller.ts:1801 [log] > [stream-controller]: PARSED->IDLE
base-stream-controller.ts:758 [log] > [stream-controller]: Loading fragment 22 cc: 0 of [0-63] level: 0, target: 220.009
base-stream-controller.ts:1801 [log] > [stream-controller]: IDLE->FRAG_LOADING
base-stream-controller.ts:389 [log] > [stream-controller]: Loaded fragment 22 of level 0
base-stream-controller.ts:1801 [log] > [stream-controller]: FRAG_LOADING->PARSING
transmuxer-interface.ts:394 [log] > [transmuxer.ts]: Flushed fragment 22 of level 0
base-stream-controller.ts:1801 [log] > [stream-controller]: PARSING->PARSED
stream-controller.ts:556 [log] > [stream-controller]: Media seeked to 198.575
base-stream-controller.ts:570 [log] > [stream-controller]: Buffered main sn: 22 of level 0 (frag:[220.009-230.023] > buffer:[79.990-229.994])
base-stream-controller.ts:1801 [log] > [stream-controller]: PARSED->IDLE
buffer-controller.ts:1096 [log] > [buffer-controller] Removing [0,108.3125] from the audio SourceBuffer
buffer-controller.ts:1096 [log] > [buffer-controller] Removing [0,108.3125] from the video SourceBuffer
base-stream-controller.ts:758 [log] > [stream-controller]: Loading fragment 23 cc: 0 of [0-63] level: 0, target: 229.994
base-stream-controller.ts:1801 [log] > [stream-controller]: IDLE->FRAG_LOADING
base-stream-controller.ts:389 [log] > [stream-controller]: Loaded fragment 23 of level 0
base-stream-controller.ts:1801 [log] > [stream-controller]: FRAG_LOADING->PARSING
transmuxer-interface.ts:394 [log] > [transmuxer.ts]: Flushed fragment 23 of level 0
base-stream-controller.ts:1801 [log] > [stream-controller]: PARSING->PARSED
base-stream-controller.ts:570 [log] > [stream-controller]: Buffered main sn: 23 of level 0 (frag:[229.994-240.023] > buffer:[108.357-240.001])
base-stream-controller.ts:1801 [log] > [stream-controller]: PARSED->IDLE
base-stream-controller.ts:241 [log] > [stream-controller]: media seeking to 35.289, state: IDLE
base-stream-controller.ts:241 [log] > [audio-stream-controller]: media seeking to 35.289, state: STOPPED
base-stream-controller.ts:241 [log] > [subtitle-stream-controller]: media seeking to 35.289, state: IDLE
abr-controller.ts:607 [info] > [abr] buffer is empty, optimal quality level 0
base-stream-controller.ts:758 [log] > [stream-controller]: Loading fragment 3 cc: 0 of [0-63] level: 0, target: 35.289
base-stream-controller.ts:1801 [log] > [stream-controller]: IDLE->FRAG_LOADING
content-steering-controller.ts:206 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ content-steering-controller.ts:206
base-stream-controller.ts:1801 [log] > [stream-controller]: FRAG_LOADING->IDLE
main.js:745 Error event: Object
(anonymous) @ main.js:745
abr-controller.ts:607 [info] > [abr] buffer is empty, optimal quality level 0
base-stream-controller.ts:758 [log] > [stream-controller]: Loading fragment 4 cc: 0 of [0-63] level: 0, target: 40.008
base-stream-controller.ts:1801 [log] > [stream-controller]: IDLE->FRAG_LOADING
content-steering-controller.ts:206 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ content-steering-controller.ts:206
base-stream-controller.ts:1801 [log] > [stream-controller]: FRAG_LOADING->IDLE
main.js:745 Error event: Object
(anonymous) @ main.js:745
abr-controller.ts:607 [info] > [abr] buffer is empty, optimal quality level 0
base-stream-controller.ts:758 [log] > [stream-controller]: Loading fragment 5 cc: 0 of [0-63] level: 0, target: 50.008
base-stream-controller.ts:1801 [log] > [stream-controller]: IDLE->FRAG_LOADING
content-steering-controller.ts:206 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ content-steering-controller.ts:206
base-stream-controller.ts:1801 [log] > [stream-controller]: FRAG_LOADING->IDLE
main.js:745 Error event: Object
(anonymous) @ main.js:745
abr-controller.ts:607 [info] > [abr] buffer is empty, optimal quality level 0
base-stream-controller.ts:758 [log] > [stream-controller]: Loading fragment 6 cc: 0 of [0-63] level: 0, target: 60.008
base-stream-controller.ts:1801 [log] > [stream-controller]: IDLE->FRAG_LOADING
content-steering-controller.ts:206 [warn] > Could not resolve fragGap ("GAP tag found") with content-steering for Pathway: . levels: 1 priorities: ["."] penalized: {".":461.10000002384186}
onError @ content-steering-controller.ts:206
base-stream-controller.ts:1801 [log] > [stream-controller]: FRAG_LOADING->IDLE
main.js:745 Error event: Object
(anonymous) @ main.js:745
abr-controller.ts:607 [info] > [abr] buffer is empty, optimal quality level 0
base-stream-controller.ts:1155 [log] > [stream-controller]: buffer full after gaps in "main" playlist starting at sn: 7
abr-controller.ts:607 [info] > [abr] buffer is empty, optimal quality level 0
base-stream-controller.ts:1155 [log] > [stream-controller]: buffer full after gaps in "main" playlist starting at sn: 7
abr-controller.ts:607 [info] > [abr] buffer is empty, optimal quality level 0
base-stream-controller.ts:1155 [log] > [stream-controller]: buffer full after gaps in "main" playlist starting at sn: 7

Chrome media internals output

No response

@luryus luryus added Bug Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Oct 28, 2024
@robwalch robwalch added Confirmed and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Nov 16, 2024
@robwalch robwalch added this to the 1.6.0 milestone Nov 16, 2024
@robwalch
Copy link
Collaborator

Hi @luryus,

Sorry for for the delay in responding. I was able to reproduce the issue. It looks like the gap-controller is exiting here, waiting for more to load:

if (!startGap) {
const startProvisioned =
partial ||
fragmentTracker.getAppendedFrag(
currentTime,
PlaylistLevelType.MAIN,
);
if (startProvisioned) {
let moreToLoad = false;
let pos = startProvisioned.end;
while (pos < startTime) {
const provisioned = fragmentTracker.getPartialFragment(pos);
if (provisioned) {
pos += provisioned.duration;
} else {
moreToLoad = true;
break;
}
}
if (moreToLoad) {
return 0;

however, the stream-controller is not loading more. It is exiting here:

// Stay idle if we are still with buffer margins
if (bufferLen >= maxBufLen) {
return;

because this code is no reporting the buffer length as required. This needs some work as it should not report buffered length if there are non-gap segments between the target position and the next buffered range:

// Workaround flaw in getting forward buffer when maxBufferHole is smaller than gap at current pos
if (bufferInfo.len === 0 && bufferInfo.nextStart !== undefined) {
const bufferedFragAtPos = this.fragmentTracker.getBufferedFrag(pos, type);
if (
bufferedFragAtPos &&
(bufferInfo.nextStart <= bufferedFragAtPos.end || bufferedFragAtPos.gap)
) {
return BufferHelper.bufferInfo(
bufferable,
pos,
Math.max(bufferInfo.nextStart, maxBufferHole),

@robwalch
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants