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

Same fragments loaded multiple times #6535

Closed
5 tasks done
mbUSC opened this issue Jul 3, 2024 · 2 comments · Fixed by anime-vsub/app#107, anime-vsub/app#108 or Tisankan/bemusic-spotify_clone#22 · May be fixed by anime-vsub/app#109
Closed
5 tasks done

Same fragments loaded multiple times #6535

mbUSC opened this issue Jul 3, 2024 · 2 comments · Fixed by anime-vsub/app#107, anime-vsub/app#108 or Tisankan/bemusic-spotify_clone#22 · May be fixed by anime-vsub/app#109

Comments

@mbUSC
Copy link

mbUSC commented Jul 3, 2024

What version of Hls.js are you using?

1.5.11

What browser (including version) are you using?

Chrome 126.0.6478.127 (Mac M2)

What OS (including version) are you using?

MacOS

Test stream

http://djsso3aok5lkq.cloudfront.net/test.html

Configuration

{
      debug: true
}

Additional player setup steps

No response

Checklist

Steps to reproduce

  1. Open http://djsso3aok5lkq.cloudfront.net/test.html with Chrome / Firefox

It seems like the problem is worse if the connection is fast (e.g. when hosting on localhost).
The problem does not happen with Safari.

Expected behaviour

Each segment downloaded only once

What actually happened?

Same segments downloaded many times
image

Console output

The following output is repeated over and over:

[log] > [transmuxer-interface, main]: Starting new transmux session for sn: 2 p: -1 level: 2 id: 1
        discontinuity: false
        trackSwitch: false
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 20.138666666666666
        initSegmentChange: false
hls.js@1:1 [log] > [stream-controller]: Loaded fragment 2 of level 2
hls.js@1:1 [log] > [mp4-remuxer]: reset next timestamp
hls.js@1:1 [log] > [stream-controller]: FRAG_LOADING->PARSING
hls.js@1:1 [warn] > [buffer-operation-queue]: Exception executing "video" SourceBuffer operation: QuotaExceededError: Failed to execute 'appendBuffer' on 'SourceBuffer': The SourceBuffer is full, and cannot free space to append additional buffers.
e.executeNext @ hls.js@1:1
e.append @ hls.js@1:1
e.onBufferAppending @ hls.js@1:1
o.emit @ hls.js@1:1
e.emit @ hls.js@1:1
e.trigger @ hls.js@1:1
r.bufferFragmentData @ hls.js@1:1
r._handleTransmuxComplete @ hls.js@1:1
r.handleTransmuxComplete @ hls.js@1:1
r.onWorkerMessage @ hls.js@1:1
onwmsg @ hls.js@1:1
hls.js@1:1 [log] > [stream-controller]: Reset loading state
hls.js@1:1 [log] > [stream-controller]: PARSING->IDLE
hls.js@1:1 [log] > [transmuxer.ts]: Flushed fragment 2 of level 2
hls.js@1:1 [log] > [stream-controller]: Loading fragment 2 cc: 0 of [0-63] level: 2, target: 20.139
hls.js@1:1 [log] > [stream-controller]: IDLE->FRAG_LOADING
hls.js@1:1 [log] > [transmuxer-interface, main]: Starting new transmux session for sn: 2 p: -1 level: 2 id: 1
        discontinuity: false
        trackSwitch: false
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 20.138666666666666
        initSegmentChange: false
hls.js@1:1 [log] > [stream-controller]: Loaded fragment 2 of level 2
hls.js@1:1 [log] > [mp4-remuxer]: reset next timestamp
hls.js@1:1 [log] > [stream-controller]: FRAG_LOADING->PARSING
hls.js@1:1 [warn] > [buffer-operation-queue]: Exception executing "video" SourceBuffer operation: QuotaExceededError: Failed to execute 'appendBuffer' on 'SourceBuffer': The SourceBuffer is full, and cannot free space to append additional buffers.
e.executeNext @ hls.js@1:1
e.append @ hls.js@1:1
e.onBufferAppending @ hls.js@1:1
o.emit @ hls.js@1:1
e.emit @ hls.js@1:1
e.trigger @ hls.js@1:1
r.bufferFragmentData @ hls.js@1:1
r._handleTransmuxComplete @ hls.js@1:1
r.handleTransmuxComplete @ hls.js@1:1
r.onWorkerMessage @ hls.js@1:1
onwmsg @ hls.js@1:1
hls.js@1:1 [log] > [stream-controller]: Reset loading state
hls.js@1:1 [log] > [stream-controller]: PARSING->IDLE
hls.js@1:1 [log] > [transmuxer.ts]: Flushed fragment 2 of level 2
hls.js@1:1 [log] > [stream-controller]: Loading fragment 2 cc: 0 of [0-63] level: 2, target: 20.139
hls.js@1:1 [log] > [stream-controller]: IDLE->FRAG_LOADING
hls.js@1:1

Chrome media internals output

No response

@mbUSC mbUSC added Bug Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Jul 3, 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 Jul 3, 2024
@robwalch robwalch added this to the 1.5.13 milestone Jul 3, 2024
@robwalch
Copy link
Collaborator

robwalch commented Jul 3, 2024

This is reproducing in v1.5.12 with the fix for #6537. Limiting the max buffer length to the current forward length isn't enough to stop streaming while paused.

@robwalch
Copy link
Collaborator

robwalch commented Jul 3, 2024

It's worth noting that the peak bitrate for the highest tier in the reproduction vector is vastly under reported:

$ curl https://[...]/playlist.m3u8
[...]
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280x720
big_buck_bunny_43000k.m3u8
[...]

$ mediastreamvalidator https://[...]/playlist.m3u8
[...]
Error: Measured peak bitrate compared to multivariant playlist declared value exceeds error tolerance
--> Detail:  Measured: 97473.55 kb/s, Multivariant playlist: 2800.00 kb/s, Error: 3381.20%
--> Source:  https://djsso3aok5lkq.cloudfront.net/playlist.m3u8
--> Compare: big_buck_bunny_43000k.m3u8
[...]

Correcting this or adding abrMaxWithRealBitrate: true to the config prevents this issue from reproducing.

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