Skip to content

stream.dash: opt publishTime/availabilityStartTime #6324

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

Conversation

bastimeyer
Copy link
Member

Remove requirement from publishTime and availabilityStartTime in dynamic DASH manifests and simply default to UNIX Epoch.


Resolves #6322

According to ISO/IEC 23009-1:2022 section 5.3.1.2, MPD@publishTime is an optional attribute with a default value, and it "shall be present" in dynamic manifests, same as the MPD@availabilityStartTime attribute. For static manifests, we've already set these attributes to optional in the parser, as they are not important in this case.

For dynamic manifests however, defaulting to UNIX Epoch can be problematic, depending on whether segment timelines include at least one timestamp anchor or not. If they don't, as the SegmentTimeline.S@t attribute is optional (section 5.3.9.6.2), then their anchor is the manifest's publishTime. Defaulting to 1970-01-01T00:00:00Z in dynamic manifests and using that as the anchor doesn't make sense, hence why MPD@publishTime was previously set as a required attribute.

Parsers however should always be more lenient with data that's not 100% valid, so let's fix the attribute requirement.

The MPD@availabilityStartTime changes don't have any tests here, but that should be fine.

Remove requirement from `publishTime` and `availabilityStartTime`
in dynamic DASH manifests and simply default to UNIX Epoch.
@bastimeyer bastimeyer merged commit c70cf8c into streamlink:master Dec 4, 2024
23 checks passed
@bastimeyer bastimeyer deleted the stream/dash/optional-publishTime-and-availabilityStartTime branch December 4, 2024 08:05
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.

stream.dash: can`t play live DASH with no MPD@publishTime attribute
1 participant