Skip to content

stream.dash: fix segment availability times #5213

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

Merged

Conversation

bastimeyer
Copy link
Member

The segment availability "anchor time" depends on the sum of the manifest's availabilityStartTime and the period's start attribute, for both static and dynamic manifests.

Fix segment availability times:

  • Set the correct available_at value for static manifests with segment templates and segment timelines instead of using the current time
  • Set the available_at value for SegmentList segments instead of defaulting to EPOCH_START
  • Set the available_at value for all initialization segments

Fix segment numbers:

  • The number offset now also takes the period start into consideration

Also:

  • Allow passing keywords to child node constructors
  • Keep the Period reference on SegmentList, SegmentTemplate and Representation
  • Check segment availability times in certain tests
  • Rename DASH manifest fixture files of updated tests

These are just minor fixes because the period start time of the first period (which we only support anyway) is zero most of the time.

The segment number fix is a "side-effect" of this PR. However, it's not a full fix and there's still something wrong with the offset calculation.

The segment availability "anchor time" depends on the sum of the
manifest's `availabilityStartTime` and the period's `start` attribute,
for both static and dynamic manifests.

Fix segment availability times:
- Set the correct `available_at` value for static manifests with segment
  templates and segment timelines instead of using the current time
- Set the `available_at` value for `SegmentList` segments instead of
  defaulting to `EPOCH_START`
- Set the `available_at` value for all initialization segments

Fix segment numbers:
- The number offset now also takes the period start into consideration

Also:
- Allow passing keywords to child node constructors
- Keep the `Period` reference on `SegmentList`, `SegmentTemplate`
  and `Representation`
- Check segment availability times in certain tests
- Rename DASH manifest fixture files of updated tests
@gravyboat gravyboat merged commit 651739f into streamlink:master Mar 2, 2023
@bastimeyer bastimeyer deleted the stream/dash/segment-availability branch March 2, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants