Skip to content

Timeline and multiperiod optimizations

Created by: dsilhavy

This PR encapsulates various rewrites and optimizations in the dash.js timing model:

  • Provide a separation of DVR window and availability window.
    • The DVR window is no longer bound to period boundaries. This enables seeking in between the periods for live multiperiod streams and avoids incorrect seeks when the player checks if the playtime is in the DVR window. The latter happened quite a lot for very short periods.
    • The availabilityTimeOffset is now used correctly. We can prebuffer content according to the availabilityTimeOffset. This can be checked with the following streams of the Live Sim
    • The DVR window is calculated on wallclock updates as it moves over time and is not bound to segment buffering.
    • The calculation of the AST and AET is fixed and done according to IOP v 4.3
    • The buffer level is not limited to period boundaries and takes the maximum allowed gap size into consideration
    • It is possible to use the t attributes in SegmentTimeline as anchor for DVRwindow.end. Calculation is done for all periods within the timeshiftbuffer
    • Add additional unit tests for the timeline calculation
  • Do not limit the starttime to segment boundaries. Instead allow starting in within a segment to be closer to the target live delay
  • Reinitialize source buffers when switching from non DRM periods to DRM periods for the first time. Otherwise we encounter buffer errors.
  • Reuse of sourcebuffers can be controlled via settings flag
  • Fixed a bug in the start time calculation for MPD anchors and multiperiod streams

This is still ongoing work and the PR is still updated

Merge request reports