Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSwitching quality leads to infinite buffering #464
Comments
|
If you're reporting a |
|
PR #496 should fix this. |
|
Same issue here, everything works fine until I switch quality. After few seconds DASH player freeze and displays loading. HLS is ok. It's really easy to reproduce:
|
|
@marceljager your issue is because we don't currently support live dash with |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
…oaded (#700) * Fix live startup failures when play happens before playlist is downloaded When joining a live stream, VHS starts playback at a time of 0, regardless of how long the stream has been playing. This means that the playlist will start with sync info of time 0 for the first media index. However, if the stream "played" (either via API, autoplay, etc.) before a playlist was downloaded, then after the playlist downloaded the loader would reset the sync info, erasing the assumed time 0 for first media index, and the player would request segments ad infinitum, never able to place them in the timeline and get a new sync point. This separates the notion of played between play initiation and playback of content (progress on the timeline), in order to ensure that the initial sync info is maintained. * Use segment loader's state to determine when to update sync info While using hasPlayedContent helped to alleviate most issues around when to update the sync info in segment loader when updating a live playlist, there still remained potential issues when a segment was requested and the sync info was changed for the in-flight segment. This change uses the segment loader's INIT state to determine if the sync info should be updated, meaning in-flight segment requests keep their sync info fixed. Fixes #464, closes #496, closes #500.
|
Fixed as part of #700. Release soon. |
Please do not delete the template, by filling out the required information we can investigate your issue more quickly.
Before opening an issue see if your problem can be resolved with the troubleshooting guide.
Description
Briefly describe the issue.
Include a reduced test case, we have a starter template on JSBin you can use.
If you change the quality level of the video before the first TS file loads, it puts VHS into a weird state where it continually downloads the first TS file in the playlist but never appends it to the source buffer or plays. Instead it just scraps the bytes and re-download them again, wasting tons of bandwidth.
The issue only seems to occur with certain video files (perhaps ones with very large first TS files?) -- I'm still investigating the root cause
Reduced test case (consistently reproduces the issue for me):
https://codepen.io/stevendesu/pen/gyWJep
As best as I can tell, the following seems to be what happens internally:
720pis selected as the default due to screen size.hasPlayed_()returns false, sonewPlaylist.syncInfois set.syncPoint_is set using thePlayliststrategy (pulling thesyncInfo)hasPlayed_gets replaced by a function that always returns truequalityLevels[i].enabled = false;for any qualities that don't match the desired bitrate (settingenabledtofalseon the720prendition which had been previously selected)fastQualityChange_which callsresetEverythingwith a callback to perform a seekresetEverything(or some method that it calls)processingAppend_is checked and, because it's false, the callback to perform the seek is never run - although manually performing the same seek myself does not fix infinite buffering, so I don't think this is the cause of the bugsyncPoint_is null soisSyncRequestis set to trueisSyncRequestis true, we triggersyncinfoupdateand then scrap the TS file without appending it to the buffermonitorBufferTick_runs, notices our buffer is empty, callsfillBuffer_, and re-downloads the same TS file. But becausesyncPoint_is null,isSyncRequestis set to trueisSyncRequestis true, we triggersyncinfoupdatethen scrap the TS file without appending it to the bufferSources
Is a certain source or a certain segment affected? please provide a public (accesible over the internet) link to it below.
https://vcloud.blueframetech.com/file/hls/126136.m3u8
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
videojs-contrib-quality-levelsautoplayenabledaddqualitylevelResults
Expected
The video should play at the specified resolution
Error output
The player displays a loading spinner and the developer console shows the first TS file being downloaded every half-second infinitely
Additional Information
Please include any additional information necessary here. Including the following:
videojs-http-streaming version
what version of videojs-http-streaming does this occur with?
videojs-http-streaming 1.5.1
videojs version
what version of videojs does this occur with?
video.js 7.4.1
Browsers
what browsers are affected? please include browser and version for each
Platforms
what platforms are affected? please include operating system and version or device and version for each
Other Plugins
are any other videojs plugins being used on the page? If so, please list them with version below.
Other JavaScript
are you using any other javascript libraries or frameworks on the page? if so please list them below.
None