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

Fix multiperiod #3360

Merged

Conversation

dsilhavy
Copy link
Collaborator

This PR aims to fix multiple issues with multiperiod streams. The changes are mainly based on test content specified in #2946. #2946 also contains comments on the changes included in this PR. To summarize:

  • Prebuffering of the new period now starts when audio and video of the previous period are finished buffering
  • dash.js now prebuffers multiple upcoming periods. The problem before was that dash.js was only prebuffering a single period which lead to problems and playback stalling for short periods
  • While prebuffering the new period the Sourcebuffer.timestampOffset was overwritten by the current period. This is fixed now.
  • Use appendWindowStart and appendWindowEnd to set buffer ranges according to Period@start and period durations.
  • Improve gap handling: Do not wait for playback to stall but instead actively jump over gaps in the timeline prior to reaching them
  • Adjusted the InsufficientBufferRule in order to set the same buffer target for audio and video. This enables us to prebuffer multiple periods as we wait for all buffers to be filled before starting the prebuffering.
  • Added support for period switch when the upcoming periods can not be prebuffered. In this case stream will stall and the gap handler will jump to the end of the current period, initiating a period switch to the upcoming period. Transition will not be as smooth as when the content is prebuffered
  • Added gap jump at playback start
  • Avoid endless loop if no live edge could be calculated because of a missing DVR window for ad periods.
  • Fixed various minor issues for instance related to rounding of values

…ause audio buffering is handled different than video buffering
…tuations in which the upcoming periods are not prebuffered. Period switch is now performed by jumping to the beginning of the upcoming period.
… of the next period to avoid small timing errors
@dsilhavy dsilhavy added this to the 3.1.3 milestone Aug 11, 2020
@dsilhavy dsilhavy merged commit 92b3f69 into Dash-Industry-Forum:development Aug 12, 2020
@dsilhavy dsilhavy deleted the fix-multiperiod branch August 20, 2020 08:27
dsilhavy added a commit that referenced this pull request Aug 25, 2020
* Move handling for non initial stream start time to getStreamForTime

* Remove unused period switch handler from BolaRule

* Fix type in variable

* Check for manifest duration before assigning it to the media source

* WiP: Multiperiod gap handling

* WiP: Multiperiod gap handling

* WiP: Multiperiod gap handling

* DashIF multiperiod sample working again

* Elemental stream worked for a single testrun and video only

* Video only prebuffering multiple streams instead of a single one

* Only update timestampOffset if buffering is not completed

* First working version with audio in Chrome

* Prebuffering with audio should work now. Adjusted BufferLevelRule because audio buffering is handled different than video buffering

* Add appendWindow update again and improve logic to calculate next streams

* Potential fix for VoD streams not starting at 0

* Remove console logs

* Do not deactivate stream when next stream is prebuffered

* Use global setting for appendWindow

* Add try catch for Sourcebuffer appendWindow reset

* Fix a bug in which the DashHandler was stuck when no liveEdge was found

* Add support for gap jumping when playback has stalled. This covers situations in which the upcoming periods are not prebuffered. Period switch is now performed by jumping to the beginning of the upcoming period.

* Instead of jumping to the end of the current period jump to the start of the next period to avoid small timing errors

* Gap jumping before moving to a separate GapController

* Move gap handling to GapController.js

* Change buffer level rule for audio

* Specific event for gap caused playback seek

* Deactivate postponeTimePeriod for multiperiod, need to understand the implications for multiperiod though

* Fix an error for the bitrate metric in the ref client when playing multiperiod streams

* Fix linting errors

* Move setting of availabilityWindow to BufferController.js

* Fix BufferLevelRule unit test

* Add availabilityWindow to TextBufferController.js

* Check if interval handler already exist

* Small changes in the GapController.js

* Change log level for ref client

* Fix wrong JSDoc in Settings.js

* Rename useAppendWindow in index.d.ts

* Add jumpLargeGaps to JsDoc and index.d.ts

* Fix JsDoc description for gap caused playback seek

* Remove unnecessary reference to streamInfo

* Check for stalls using settings wallclock time parameter

* Remove streamInfo parameter from TextBufferController.js

* Use constants for interval handler
@bbert bbert mentioned this pull request Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant