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

Seeking breaks stream with DISCONTINUITY #4905

Closed
5 tasks done
periman2 opened this issue Sep 14, 2022 · 6 comments · Fixed by #6591
Closed
5 tasks done

Seeking breaks stream with DISCONTINUITY #4905

periman2 opened this issue Sep 14, 2022 · 6 comments · Fixed by #6591
Labels
browser: Chrome Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Bug Confirmed Bug report confirmed or reproduced. Stream Issue Verify Fixed An unreleased bug fix has been merged and should be verified before closing.
Milestone

Comments

@periman2
Copy link

What version of Hls.js are you using?

1.2.3

What browser (including version) are you using?

Chrome 105.0.5195.102 (Official Build) (64-bit)

What OS (including version) are you using?

Windows 10

Test stream

https://pz-73dff7e9-79c9-e911-bcd0-0003ff297dea.vitrinabox.com/vvpvideo-d26d4978-0834-ed11-ae83-281878660f2f/74dff7e9-79c9-e911-bcd0-0003ff297dea/r.m3u8?sv=2018-03-28&si=23e4f150-6d3c-4d30-95ad-b72a32715bed&sr=c&sig=G7HkpkIjWd%2F%2F%2BRfpBLDpmoUvqrcUZGBCJdsE8AgoLH4%3D

Configuration

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

Additional player setup steps

No response

Checklist

Steps to reproduce

  1. Immediately when the video starts, seek to the end and then start seeking backwards in small increments (ex: going to second 50 then 48 then 46 manually). If you playback after that, the stream will lag significantly in those seconds that it was seeked)

Expected behaviour

Playback after seeking should move smoothly

What actually happened?

Playback lags significantly in the segments that it was seeked to.

Console output

034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loading fragment 7 cc: 8 of [0-27] level: 2, target: 11.94
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->FRAG_LOADING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer-interface, main]: Starting new transmux session for sn: 7 p: -1 level: 2 id: 1
        discontinuity: true
        trackSwitch: false
        contiguous: true
        accurateTimeOffset: true
        timeOffset: 11.93998888888889
        initSegmentChange: false
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loaded fragment 7 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: FRAG_LOADING->PARSING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.640028/avc1.640028]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: InitPTS for cc: 8 found from main: -941399
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer.ts]: Flushed fragment 7 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSING->PARSED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Buffered main sn: 7 of level 2 [0.000,13.660]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loading fragment 8 cc: 9 of [0-27] level: 2, target: 13.66
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->FRAG_LOADING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer-interface, main]: Starting new transmux session for sn: 8 p: -1 level: 2 id: 1
        discontinuity: true
        trackSwitch: false
        contiguous: true
        accurateTimeOffset: true
        timeOffset: 13.659988888888888
        initSegmentChange: false
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loaded fragment 8 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: FRAG_LOADING->PARSING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.640028/avc1.640028]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: InitPTS for cc: 9 found from main: -1096199
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer.ts]: Flushed fragment 8 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSING->PARSED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Buffered main sn: 8 of level 2 [0.000,17.020]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loading fragment 9 cc: 10 of [0-27] level: 2, target: 17.02
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->FRAG_LOADING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: media seeking to 54.440, state: FRAG_LOADING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: seeking outside of buffer while fragment load in progress, cancel fragment load
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: FRAG_LOADING->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [warn] > [stream-controller]: Fragment 9 of level 2 was aborted
handleFragLoadAborted @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
handleFragLoadError @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
(anonymous) @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
Promise.catch (async)
_doFragLoad @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
_loadFragForPlayback @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
loadFragment @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
loadFragment @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
doTickIdle @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
doTick @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
tick @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
fragBufferedComplete @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
onFragBuffered @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
emit @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
emit @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
trigger @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
onUnblocked @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
(anonymous) @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
Promise.then (async)
blockBuffers @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
onFragParsed @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
emit @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
emit @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
trigger @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
updateLevelTiming @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
_handleTransmuxerFlush @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
onWorkerMessage @ 034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: media seeking to 54.440, state: STOPPED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [subtitle-stream-controller]: media seeking to 54.440, state: IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loading fragment 27 cc: 28 of [0-27] level: 2, target: 54.44
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->FRAG_LOADING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer-interface, main]: Starting new transmux session for sn: 27 p: -1 level: 2 id: 1
        discontinuity: true
        trackSwitch: false
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 52.019644888888905
        initSegmentChange: false
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loaded fragment 27 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: reset next timestamp
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: FRAG_LOADING->PARSING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.640028/avc1.640028]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: InitPTS for cc: 28 found from main: -4548568
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer.ts]: Flushed fragment 27 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSING->PARSED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Buffered main sn: 27 of level 2 [0.000,17.020][52.020,55.380]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [buffer-controller]: video sourceBuffer now EOS
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->ENDED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [buffer-controller]: Media source ended
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Media seeked to 54.441
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: media seeking to 52.670, state: ENDED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: ENDED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: media seeking to 52.670, state: STOPPED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [subtitle-stream-controller]: media seeking to 52.670, state: IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Media seeked to 52.671
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->ENDED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: media seeking to 51.261, state: ENDED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: ENDED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: media seeking to 51.261, state: STOPPED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [subtitle-stream-controller]: media seeking to 51.261, state: IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loading fragment 26 cc: 27 of [0-27] level: 2, target: 51.261
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->FRAG_LOADING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer-interface, main]: Starting new transmux session for sn: 26 p: -1 level: 2 id: 1
        discontinuity: true
        trackSwitch: false
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 50.35298844444444
        initSegmentChange: false
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loaded fragment 26 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: reset next timestamp
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: FRAG_LOADING->PARSING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.640028/avc1.640028]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: InitPTS for cc: 27 found from main: -4398569
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer.ts]: Flushed fragment 26 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSING->PARSED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Buffered main sn: 26 of level 2 [0.000,17.020][50.353,55.380]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Media seeked to 51.262
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [buffer-controller]: video sourceBuffer now EOS
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->ENDED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [buffer-controller]: Media source ended
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: media seeking to 49.636, state: ENDED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: ENDED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: media seeking to 49.636, state: STOPPED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [subtitle-stream-controller]: media seeking to 49.636, state: IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loading fragment 25 cc: 26 of [0-27] level: 2, target: 49.636
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->FRAG_LOADING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer-interface, main]: Starting new transmux session for sn: 25 p: -1 level: 2 id: 1
        discontinuity: true
        trackSwitch: false
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 48.68634488888889
        initSegmentChange: false
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loaded fragment 25 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: reset next timestamp
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: FRAG_LOADING->PARSING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.640028/avc1.640028]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: InitPTS for cc: 26 found from main: -4248571
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer.ts]: Flushed fragment 25 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSING->PARSED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Buffered main sn: 25 of level 2 [0.000,17.020][48.686,55.380]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [buffer-controller]: video sourceBuffer now EOS
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->ENDED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Media seeked to 49.640
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [buffer-controller]: Media source ended
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: media seeking to 48.281, state: ENDED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: ENDED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: media seeking to 48.281, state: STOPPED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [subtitle-stream-controller]: media seeking to 48.281, state: IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loading fragment 24 cc: 25 of [0-27] level: 2, target: 48.281
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->FRAG_LOADING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer-interface, main]: Starting new transmux session for sn: 24 p: -1 level: 2 id: 1
        discontinuity: true
        trackSwitch: false
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 47.01968844444444
        initSegmentChange: false
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Loaded fragment 24 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: reset next timestamp
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: ISGenerated flag reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [mp4-remuxer]: initPTS & initDTS reset
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: FRAG_LOADING->PARSING
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.640028/avc1.640028]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [audio-stream-controller]: InitPTS for cc: 25 found from main: -4098572
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [transmuxer.ts]: Flushed fragment 24 of level 2
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSING->PARSED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Buffered main sn: 24 of level 2 [0.000,17.020][47.020,55.380]
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: PARSED->IDLE
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: Media seeked to 48.281
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [buffer-controller]: video sourceBuffer now EOS
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [stream-controller]: IDLE->ENDED
034fc5cbc93012ad2b1da2c4fec023ab6dd4bd79.js:1 [log] > [buffer-controller]: Media source ended

Chrome media internals output

No response

@periman2 periman2 added Bug Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Sep 14, 2022
@robwalch robwalch added cannot reproduce and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Sep 14, 2022
@robwalch
Copy link
Collaborator

Hi @periman2,

Can you provide a screen capture with voice over or comments with timestamps that point to the issue you are seeing? I am able to play the stream in backwards seeking increments. The media is loaded and appended as expected. Your logs also indicate hls.js is behaving as expected.

I do not see lag or breaking of the stream other than the time needed to retrieve and append segments from the HLS stream provided.

@periman2
Copy link
Author

Hello @robwalch . I'd like to first thank you for the fast response!

I'm sorry about the logs, github asked me to lower the data of the issue's submition and I accidentaly cut the logs that displayed the problem.

I also failed to mention that you need to be quite agressive with the seeking in order for the issue to be reproduced. This is however related to a feature I'm trying to create, in my app I'm not doing the seeking by hand of course but sadly it does break the whole stream afterwards.

I'm sending you now the screen capture reproduction as you asked. I hope this helps to show the issue more clearly.
https://vbgithubissues.b-cdn.net/Video_2022-09-15_103010.wmv

@periman2
Copy link
Author

Hello again. We re-encoded the streams and reset the pts in order to remove the DISCONTINUITY tag. This way the new streams we make work perfectly well. However, I believe this is a bug on hls.js side still so I think it's best to leave that issue open since it has technically not being resolved for streams with DISCONTINUITY and more people might have this issue. The stream in the issue will stay online for a very long time in order for the team here to debug and perhaps resolve the issue.

@robwalch robwalch added Confirmed Bug report confirmed or reproduced. and removed cannot reproduce labels Sep 16, 2022
@robwalch
Copy link
Collaborator

Thanks @periman2,

From the screen capture it looks like while we produce a seamless buffer, video is frozen while playing over one of the appends. This suggests that we appended over a keyframe, or did not aligns appends across discontinuities (when appending backwards) in such a way that preserved the decode timeline.

@robwalch robwalch added browser: Chrome Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Stream Issue labels Feb 15, 2024
@robwalch
Copy link
Collaborator

robwalch commented Feb 15, 2024

We can look into flushing forward media when seeking back into a previously unparsed Discontinuity domain or sequence.

@robwalch robwalch added this to the 1.6.0 milestone Jun 28, 2024
@robwalch
Copy link
Collaborator

This issue should be resolved in v1.6.0 with #6524. You can try it here https://bugfix-backward-seek-near-en.hls-js-4zn.pages.dev/demo/

@robwalch robwalch added the Verify Fixed An unreleased bug fix has been merged and should be verified before closing. label Jul 1, 2024
@robwalch robwalch mentioned this issue Aug 2, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: Chrome Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Bug Confirmed Bug report confirmed or reproduced. Stream Issue Verify Fixed An unreleased bug fix has been merged and should be verified before closing.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants