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
First segment loaded in infinite loop #2438
Comments
Noticing that in the latest build (v0.13.0-beta.2) we still get the logs that say the first fragment is loading (even though it is only loaded and buffered once). That log statement is placed a little early, or we need to change how the stream controller interacts with the fragment tracker on idle. Then, playback stalls at the end of the first fragment and recovers after something (nudging?) prompts the second fragment to be loaded. There's a couple of issues with hls.js that I think are causing this:
I'll see if we can do something about the second issue for the next release or patch (v0.13.0-1). The PTS/DTS issue is much larger and I will probably focus efforts on addressing that in feature/v1.0.0. |
Turns out this is caused by aborting the loader for the second fragment as result of "seeking" triggered by setting currentTime to -1 in |
* upstream/master: (81 commits) Prevent seeking to 0 when startPosition is -1 Fixes #2438 Prevent RangeError exception when parsing incomplete PES Fixes #2415 Relates to #2109 Log license key size (DRM functional test troubleshooting) Improve functional test assertion feedback Handle stalls when seeking into buffer gaps Update gap controller to observe buffer gaps regardless of max buffer hole Update gap-controller comments Add seek back to start functional test Fix start gap jumping with partial fragments and when seeking back to start Reset stall time after seeked and fix logger statments Fix partial and large start gap jumping Do not jump gaps larger than JUMP_THRESHOLD_SECONDS Update gap-controller comments Avoid jumping gaps that Chrome will jump Prevent reporting stalls right after "seeked" Jump start gap in Safari fixes #2436 Update gap-controller to match v1 branch gap-controller: add handling for audio-only autoplay issues in Chrome gap-controller: improve some log lines gap-controller: add unit tests for initial gap skipping + paused/hasPlayed cases gap-controller: documentation/comments improvements ... # Conflicts: # package-lock.json # scripts/travis.sh # src/controller/audio-stream-controller.js # src/controller/audio-track-controller.ts # src/controller/buffer-controller.ts # src/controller/gap-controller.js # src/controller/id3-track-controller.js # src/controller/stream-controller.js # src/controller/subtitle-stream-controller.ts # src/controller/subtitle-track-controller.ts # src/controller/timeline-controller.ts # src/demux/tsdemuxer.ts # src/events.js # src/loader/m3u8-parser.ts # src/utils/buffer-helper.ts # tests/functional/auto/setup.js # tests/test-streams.js # tests/unit/controller/ewma-bandwidth-estimator.js # tests/unit/controller/gap-controller.js # tests/unit/controller/subtitle-stream-controller.js
* upstream/master: (81 commits) Prevent seeking to 0 when startPosition is -1 Fixes #2438 Prevent RangeError exception when parsing incomplete PES Fixes #2415 Relates to #2109 Log license key size (DRM functional test troubleshooting) Improve functional test assertion feedback Handle stalls when seeking into buffer gaps Update gap controller to observe buffer gaps regardless of max buffer hole Update gap-controller comments Add seek back to start functional test Fix start gap jumping with partial fragments and when seeking back to start Reset stall time after seeked and fix logger statments Fix partial and large start gap jumping Do not jump gaps larger than JUMP_THRESHOLD_SECONDS Update gap-controller comments Avoid jumping gaps that Chrome will jump Prevent reporting stalls right after "seeked" Jump start gap in Safari fixes #2436 Update gap-controller to match v1 branch gap-controller: add handling for audio-only autoplay issues in Chrome gap-controller: improve some log lines gap-controller: add unit tests for initial gap skipping + paused/hasPlayed cases gap-controller: documentation/comments improvements ... # Conflicts: # package-lock.json # scripts/travis.sh # src/controller/audio-stream-controller.js # src/controller/audio-track-controller.ts # src/controller/buffer-controller.ts # src/controller/gap-controller.js # src/controller/id3-track-controller.js # src/controller/stream-controller.js # src/controller/subtitle-stream-controller.ts # src/controller/subtitle-track-controller.ts # src/controller/timeline-controller.ts # src/demux/tsdemuxer.ts # src/events.js # src/loader/m3u8-parser.ts # src/utils/buffer-helper.ts # tests/functional/auto/setup.js # tests/test-streams.js # tests/unit/controller/ewma-bandwidth-estimator.js # tests/unit/controller/gap-controller.js # tests/unit/controller/subtitle-stream-controller.js
* upstream/master: (81 commits) Prevent seeking to 0 when startPosition is -1 Fixes #2438 Prevent RangeError exception when parsing incomplete PES Fixes #2415 Relates to #2109 Log license key size (DRM functional test troubleshooting) Improve functional test assertion feedback Handle stalls when seeking into buffer gaps Update gap controller to observe buffer gaps regardless of max buffer hole Update gap-controller comments Add seek back to start functional test Fix start gap jumping with partial fragments and when seeking back to start Reset stall time after seeked and fix logger statments Fix partial and large start gap jumping Do not jump gaps larger than JUMP_THRESHOLD_SECONDS Update gap-controller comments Avoid jumping gaps that Chrome will jump Prevent reporting stalls right after "seeked" Jump start gap in Safari fixes #2436 Update gap-controller to match v1 branch gap-controller: add handling for audio-only autoplay issues in Chrome gap-controller: improve some log lines gap-controller: add unit tests for initial gap skipping + paused/hasPlayed cases gap-controller: documentation/comments improvements ... # Conflicts: # package-lock.json # scripts/travis.sh # src/controller/audio-stream-controller.js # src/controller/audio-track-controller.ts # src/controller/buffer-controller.ts # src/controller/gap-controller.js # src/controller/id3-track-controller.js # src/controller/stream-controller.js # src/controller/subtitle-stream-controller.ts # src/controller/subtitle-track-controller.ts # src/controller/timeline-controller.ts # src/demux/tsdemuxer.ts # src/events.js # src/loader/m3u8-parser.ts # src/utils/buffer-helper.ts # tests/functional/auto/setup.js # tests/test-streams.js # tests/unit/controller/ewma-bandwidth-estimator.js # tests/unit/controller/gap-controller.js # tests/unit/controller/subtitle-stream-controller.js
* upstream/master: (92 commits) Update package-lock Update TypeScript and run `npm audit fix` Add a lint rule to disallow use of SourceBuffer global Fix `isSupported` check in browser missing `SourceBuffer` global Fixes #2430 #2476 https add code of conduct Remove build:types from release job. Remove TypeScript types build step only include js files in release Prevent seeking to 0 when startPosition is -1 Fixes #2438 Prevent RangeError exception when parsing incomplete PES Fixes #2415 Relates to #2109 Log license key size (DRM functional test troubleshooting) Improve functional test assertion feedback Handle stalls when seeking into buffer gaps Update gap controller to observe buffer gaps regardless of max buffer hole Update gap-controller comments Add seek back to start functional test Fix start gap jumping with partial fragments and when seeking back to start Reset stall time after seeked and fix logger statments Fix partial and large start gap jumping ... # Conflicts: # package-lock.json # package.json # scripts/travis.sh # src/controller/audio-stream-controller.js # src/controller/buffer-controller.ts # src/controller/gap-controller.js # src/controller/id3-track-controller.js # src/controller/stream-controller.js # src/controller/subtitle-stream-controller.ts # src/controller/subtitle-track-controller.ts # src/controller/timeline-controller.ts # src/demux/tsdemuxer.ts # src/events.js # src/loader/m3u8-parser.ts # src/utils/buffer-helper.ts # tests/functional/auto/setup.js # tests/test-streams.js # tests/unit/controller/ewma-bandwidth-estimator.js # tests/unit/controller/gap-controller.js # tests/unit/controller/subtitle-stream-controller.js
* feature/v1.0.0: (95 commits) Enforce no-case-declarations Cleanup timeout calls Enforce 'no-unused-vars' lint rule Update package-lock Update TypeScript and run `npm audit fix` Add a lint rule to disallow use of SourceBuffer global Fix `isSupported` check in browser missing `SourceBuffer` global Fixes video-dev#2430 video-dev#2476 https add code of conduct Remove build:types from release job. Remove TypeScript types build step only include js files in release Prevent seeking to 0 when startPosition is -1 Fixes video-dev#2438 Prevent RangeError exception when parsing incomplete PES Fixes video-dev#2415 Relates to video-dev#2109 Log license key size (DRM functional test troubleshooting) Improve functional test assertion feedback Handle stalls when seeking into buffer gaps Update gap controller to observe buffer gaps regardless of max buffer hole Update gap-controller comments Add seek back to start functional test ...
* feature/v1.0.0: (96 commits) Fix audio gaps introduced by changes in remuxer continuity tracking Enforce no-case-declarations Cleanup timeout calls Enforce 'no-unused-vars' lint rule Update package-lock Update TypeScript and run `npm audit fix` Add a lint rule to disallow use of SourceBuffer global Fix `isSupported` check in browser missing `SourceBuffer` global Fixes video-dev#2430 video-dev#2476 https add code of conduct Remove build:types from release job. Remove TypeScript types build step only include js files in release Prevent seeking to 0 when startPosition is -1 Fixes video-dev#2438 Prevent RangeError exception when parsing incomplete PES Fixes video-dev#2415 Relates to video-dev#2109 Log license key size (DRM functional test troubleshooting) Improve functional test assertion feedback Handle stalls when seeking into buffer gaps Update gap controller to observe buffer gaps regardless of max buffer hole Update gap-controller comments ...
What version of Hls.js are you using?
v0.12.4
What browser and OS are you using?
Ubuntu18.04 with Firefox70.0 (64-bit).
Test stream:
https://hls-js-latest.netlify.com/demo/?src=https%3A%2F%2Ftest-streams.mux.dev%2Fx36xhzz%2Furl_6%2F193039199_mp4_h264_aac_hq_7.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsImR1bXBmTVA0IjpmYWxzZSwibGV2ZWxDYXBwaW5nIjotMSwibGltaXRNZXRyaWNzIjotMX0=
Checklist
Steps to reproduce
maxFragLookUpTolerance": 0
and"maxBufferHole": 0
so that the final result is:Expected behavior
I would expect the video to load and play normally.
Actual behavior
The first segment loads in a loop. The following message is repeated in the console:
[log] > Loading 0 of [0 ,7],level 0, currentTime:0.000,bufferEnd:0.000
.Console output
Comments
This appears to be related to these two (closed) issues:
In both those issues the person reporting the problem managed to overcome it by setting
maxSeekHole
to a higher value. However in our application we need to be able to seek accurately to specific frames, and if we don't setmaxSeekHole
to zero, then hls.js doesn't always load the correct fragments when seeking.The loop loading appears to be caused by the fact that the video starts at around
0.021
(note that the audio does start at0
as expected). In test files with no audio, the video pts starts at zero so this doesn't happen.The text was updated successfully, but these errors were encountered: