Skip to content

UTCTiming Clock synchronization

dsilhavy edited this page Feb 11, 2021 · 8 revisions

Description

During playback of dynamic presentations, a wall wall clock is used as the timing reference for DASH client decisions. This is a synchronized clock shared by the DASH client and service [1].

It is critical to synchronize the clocks of the DASH client and service when using a dynamic presentation because the MPD timeline of a dynamic presentation is mapped to wall clock time and many playback decisions are clock driven and assume a common understanding of time by the DASH client and service [1].

Clock synchronization mechanisms are described by UTCTiming elements in the MPD ([DASH] 5.8.4.11) [1].

For further information please check the References [1] and [2].

Clock synchronization in dash.js

dash.js supports multiple schemeIdUri and value combinations for clock synchronization:

    'urn:mpeg:dash:utc:http-head:2014': _httpHeadHandler,
    'urn:mpeg:dash:utc:http-xsdate:2014': _httpHandler.bind(null, _xsdatetimeDecoder),
    'urn:mpeg:dash:utc:http-iso:2014': _httpHandler.bind(null, _iso8601Decoder),
    'urn:mpeg:dash:utc:direct:2014': _directHandler,

    // some specs referencing early ISO23009-1 drafts incorrectly use
    // 2012 in the URI, rather than 2014. support these for now.
    'urn:mpeg:dash:utc:http-head:2012': _httpHeadHandler,
    'urn:mpeg:dash:utc:http-xsdate:2012': _httpHandler.bind(null, _xsdatetimeDecoder),
    'urn:mpeg:dash:utc:http-iso:2012': _httpHandler.bind(null, _iso8601Decoder),
    'urn:mpeg:dash:utc:direct:2012': _directHandler,

The default timing source in dash.js uses the following schemeIdUri/value combination:

 defaultTimingSource: {
   scheme: 'urn:mpeg:dash:utc:http-xsdate:2014',
   value: 'http://time.akamai.com/?iso&ms'
}

UTCTiming elements in the MPD take precedence over the default timing source specified in the settings.

Default synchronization

By default, dash.js performs a clock synchronization at playback start and after each MPD update.

Startup synchronization

At playback start an initial request to the timing server is issued. The offset between the client and the server clock is calculated as described in Section Offset calculation.

In addition, dash.js performs a predefined number of background requests to verify the initially calculated offset. The number of background attempts can be adjusted in the settings:

player.updateSettings({
  streaming: {
    utcSynchronization: {
      backgroundAttempts: 2
    }
  }
})

For further details on background synchronization check the Section Background synchronization

Error synchronization

Background synchronization

Offset calculation

Complete Configuration

References

Clone this wiki locally