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

abr-controller stops sampling throughput at download boundaries #3789

Closed
3 of 5 tasks
InanisV opened this issue Apr 16, 2021 · 4 comments · Fixed by #3801
Closed
3 of 5 tasks

abr-controller stops sampling throughput at download boundaries #3789

InanisV opened this issue Apr 16, 2021 · 4 comments · Fixed by #3801
Labels
Milestone

Comments

@InanisV
Copy link

InanisV commented Apr 16, 2021

What version of Hls.js are you using?

v1.0.0 and v1.0.1

What browser and OS (including versions) are you using?

Google Chrome 89.0.4389.114
macOS 10.15.6

Test stream:

BBB: https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8
Akamai: https://ll-hls-test-apple.akamaized.net/cmaf/master.m3u8

Configuration:

const hlsjsDefaults = {
  debug: true,
  enableWorker: true,
  lowLatencyMode: true,
  progressive: true,
  testBandwidth: true,
  capLevelOnFPSDrop: true,
  maxLiveSyncPlaybackRate: 1.3,
  backBufferLength: 60 * 1.5,
};

Checklist

  • 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

  1. Just play the video with test stream

Expected behavior

In abr-controller, each time Events.FRAG_BUFFERED is triggered, the onFragBuffered function should sample and update throughput by calling this.bwEstimator.sample.

Actual behavior

Most time Events.FRAG_BUFFERED is triggered, the onFragBuffered function directly returns due to stats.aborted == True.

Temporary Solution

I used v1.0.0-rc.4 before and it works well.
So I compared all files manipulating flag stats.aborted with those from rc.4.
Then I found that this bug can be solved by removing line 265 loader.destroy(); in src/loader/fragment-loader.ts.

@InanisV InanisV changed the title abr-controller stop sampling throughput at download boundary abr-controller stops sampling throughput at download boundary Apr 16, 2021
@InanisV InanisV changed the title abr-controller stops sampling throughput at download boundary abr-controller stops sampling throughput at download boundaries Apr 16, 2021
@robwalch
Copy link
Collaborator

Does this issue only present when progressive: true, is enabled?

@robwalch
Copy link
Collaborator

Akamai: https://ll-hls-test-apple.akamaized.net/cmaf/master.m3u8

You absolutely should not enable progressive with LL-HLS streams. Note that this option is labeled "experimental" in the release notes. That means it is not intended for production. It also is counterintuitive to the design of LL-HLS, as it was meant to be enabled for HTTP chunked transfer encoding (CTE) streams, not LL-HLS streams which take advantage of CDN caching and delivery of assets at line speed, not encoding speed.

@robwalch robwalch added Bug and removed Need info labels Apr 19, 2021
@robwalch robwalch added this to the 1.0.2 milestone Apr 19, 2021
@robwalch
Copy link
Collaborator

Does this issue only present when progressive: true, is enabled?

Reproduced the issue and can see that this is an issue with the fetch loader which is selected by default when progressive is set to true. The bug however impacts the fetch loader either way, as the stats for all destroyed loaders get marked as aborted even after they retrieved a response successfully.

@InanisV
Copy link
Author

InanisV commented Apr 20, 2021

Akamai: https://ll-hls-test-apple.akamaized.net/cmaf/master.m3u8

You absolutely should not enable progressive with LL-HLS streams. Note that this option is labeled "experimental" in the release notes. That means it is not intended for production. It also is counterintuitive to the design of LL-HLS, as it was meant to be enabled for HTTP chunked transfer encoding (CTE) streams, not LL-HLS streams which take advantage of CDN caching and delivery of assets at line speed, not encoding speed.

Hi Rob,

Thank you for the explanation. It really helps. :)

amiznikov added a commit to amiznikov/hls.js that referenced this issue Apr 24, 2021
* 'master' of https://github.com/video-dev/hls.js: (327 commits)
  [skip netlify] Update dependency netlify-cli to v3.21.9
  [skip netlify] Update dependency netlify-cli to v3.21.8
  [skip netlify] Update dependency eslint to v7.25.0
  [skip netlify] Update dependency netlify-cli to v3.21.7
  [skip netlify] Update dependency netlify-cli to v3.21.5
  [skip netlify] Update dependency netlify-cli to v3.21.3
  [skip netlify] Update dependency netlify-cli to v3.21.2
  [skip netlify] Update actions/github-script action to v4 (video-dev#3809)
  [skip netlify] Update dependency netlify-cli to v3.21.1
  [skip netlify] Update dependency netlify-cli to v3.21.0
  [skip netlify] Update babel monorepo to v7.13.16
  [skip netlify] Update dependency netlify-cli to v3.20.1
  [skip netlify] Update dependency netlify-cli to v3.19.1
  [skip netlify] Update dependency @microsoft/api-extractor to v7.14.0
  Fix fetch loader stats marked as aborted after loaded Fixes video-dev#3789
  Evict unbuffered audio and main fragments from the tracker on BUFFER_FLUSHED Resolves video-dev#3770
  Fix setInterval/Timer regression in fps-controller Fixes video-dev#3790
  [skip netlify] Update dependency netlify-cli to v3.19.0
  [skip netlify] Lock file maintenance
  [skip netlify] Lock file maintenance
  ...

# Conflicts:
#	.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants