Dash-Industry-Forum / Guidelines-TimingModel

DASH-IF implementation guidelines: the DASH timing model
9 stars 1 forks source link

Clarify timestamp handling in dynamic->static transition #56

Open sandersaares opened 4 years ago

sandersaares commented 4 years ago

See https://github.com/google/shaka-player/issues/2581

A dynamic MPD may be anchored at Unix epoch. At some point it is transformed to a static MPD - but this is anchored at the start of the actual content, not at the start of the MPD timeline in the dynamic MPD.

What is the right way for the player to know where the playhead now lies in the static MPD?

Alternative phrasing: what does the dynamic MPD timeline position equivalent to "now" on the wall clock map to in the static MPD?

sandersaares commented 4 years ago

First thoughts:

  1. MPDs must contain a period overlapping "now" (DASH-IF 1).
  2. Content within time shift buffer (in fact slightly beyond, considering availability, as well) is not permitted to be removed by MPD updates, therefore the period containing "now" must also exist in static MPD (DASH-IF 2).
  3. Period IDs must remain consistent after MPD updates, so the player can identify this period by ID (DASH 5.4.1).
  4. Even though the MPD timeline may transform during dynamic->static transition (as AvailabilityTimeStart is removed from calculations), the sample timeline remains consistent (i.e. the contents of segments do not change).
  5. The MPD must accurately reflect the actual sample timeline used in the segments (DASH-IF 3).
  6. Therefore, the player can calculate the equivalent MPD timeline position in the same period by working backwards from the sample timeline.
TobbeEdgeware commented 4 years ago

The following "startover URL" from DASH-IF live simulator should have the right behaviour, and be compatible with the text above:

https://livesim.dashif.org/livesim/startrel_-20/stoprel_20/timeoffset_0/testpic_2s/Manifest.mpd

It will redirect to a URL with absolute time interval corresponding to the live time interval [now - 20s, now + 20s], and the MPD will become static approximately 20s after the initial call. At the transition the segments will stay the same, but AST will go away.

stevemayhew commented 5 months ago

First thoughts: @sandersaares I'm working this issue with a couple of different origin vendors as well as our own origin in order to properly support SoCu.

  1. MPDs must contain a period overlapping "now" (DASH-IF 1).
  2. Content within time shift buffer (in fact slightly beyond, considering availability, as well) is not permitted to be removed by MPD updates, therefore the period containing "now" must also exist in static MPD (DASH-IF 2).
  3. Period IDs must remain consistent after MPD updates, so the player can identify this period by ID (DASH 5.4.1).

Are you proposing the former live period would convert to fixed duration with non change to the Period@startTime (as required by the MPD Updates section?

  1. The MPD must accurately reflect the actual sample timeline used in the segments (DASH-IF 3).
  2. Therefore, the player can calculate the equivalent MPD timeline position in the same period by working backwards from the sample timeline.

So this would require changing the Period@startTime to 0 potentially and updating the presentationTimeOffset in order to have the position be equivalent?