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 url anchor time #3453

Merged

Conversation

bbert
Copy link
Contributor

@bbert bbert commented Nov 12, 2020

This PR is fixing anchor time management in case of multiple periods
Anchor time shall be relative to 1st period but currently anchor time is computed as being relative to targeted (from anchor time) period start time

@bbert
Copy link
Contributor Author

bbert commented Nov 12, 2020

Before going ahead we need to agree on specs and use cases.
For static streams:

  • #t : time shall be relative to 0 (or 1st period start? Can we have a 1st period that does not start from 0?)

For dynamic streams:

  • #t : time relative to DVR window start ?
  • #t=posix : UTC time

@dsilhavy
Copy link
Collaborator

My thoughts + relevant part of the MPEG spec:

  • t: signifies the time since the beginning of the period indicated by the period parameter. If period parameter is not present, the default Period is the first period of the presentation.

  • In my opinion a static MPD can have a period@start greater than 0 which is then offset by the presentationTimeOffset.

  • For dynamic streams I would expect the same behavior, #t relative to period@start (using the period with the earliest start time). We should make sure that the target time is included in the DVR window. On the other hand, this requires the application to know the current first period in the MPD. Might make more sense to use the AST instead of the first period if no period id is given?

@bbert
Copy link
Contributor Author

bbert commented Nov 17, 2020

My thoughts + relevant part of the MPEG spec:

  • t: signifies the time since the beginning of the period indicated by the period parameter. If period parameter is not present, the default Period is the first period of the presentation.
  • In my opinion a static MPD can have a period@start greater than 0 which is then offset by the presentationTimeOffset.

OK, but while thinking to use cases, that would be more relevant to consider #t as the absolute time from 0.
For example, one use case is for playback replay/resume of a content you previously watched. Thus the application could store the reached position, in order to restart playback from this position.

  • For dynamic streams I would expect the same behavior, #t relative to period@start (using the period with the earliest start time). We should make sure that the target time is included in the DVR window. On the other hand, this requires the application to know the current first period in the MPD. Might make more sense to use the AST instead of the first period if no period id is given?

But you don't know more about AST than period start time at application level.
#t should be relative to period@start

@dsilhavy
Copy link
Collaborator

My thoughts + relevant part of the MPEG spec:

  • t: signifies the time since the beginning of the period indicated by the period parameter. If period parameter is not present, the default Period is the first period of the presentation.
  • In my opinion a static MPD can have a period@start greater than 0 which is then offset by the presentationTimeOffset.

OK, but while thinking to use cases, that would be more relevant to consider #t as the absolute time from 0.
For example, one use case is for playback replay/resume of a content you previously watched. Thus the application could store the reached position, in order to restart playback from this position.

But this should also be possible if Period@start is greater than zero. I simply save the current playback position and add that as an offset to the start. If we use Period@start as an anchor this also covers the case in which period@start is 0.

  • For dynamic streams I would expect the same behavior, #t relative to period@start (using the period with the earliest start time). We should make sure that the target time is included in the DVR window. On the other hand, this requires the application to know the current first period in the MPD. Might make more sense to use the AST instead of the first period if no period id is given?

But you don't know more about AST than period start time at application level.
#t should be relative to period@start

Not sure I agree on this. The AST does not change, but periods disappear over time. There might even be outdated periods in the MPD. Or a period is removed by the time the application is initializing the player. However, the spec clearly states that the first/earliest period should be used if no period attribute is specified in the MPD anchor:

Period: Value of a Period parameter Period@id. If period parameter is not present, the default value of the @id attribute value of the Period with the earliest PeriodStart.

So I think we should stick to the behavior you described.

@dsilhavy dsilhavy added this to the 3.2.0 milestone Dec 4, 2020
@dsilhavy dsilhavy self-requested a review December 4, 2020 07:59
@dsilhavy dsilhavy merged commit e2c0023 into Dash-Industry-Forum:development Dec 7, 2020
@bbert bbert deleted the fix-anchor-time branch December 28, 2020 08:35
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.

None yet

2 participants