Applies to: Protocol and format interpretation for developers inspecting authorized media delivery.

The useful distinctions

  • presentationTimeOffset relates media timing to a Period.
  • timescale determines the duration of timing units.
  • Period start contributes to the presentation-time mapping.

Write all three quantities with units

The invented Period begins thirty seconds into a presentation. The first segment's timeline start and the presentation offset are both 90000 units, with 1000 units per second. Subtracting the offset gives zero units relative to the Period, then dividing gives zero seconds. Adding the Period start yields presentation time thirty seconds. Writing the units at every step is more valuable than memorizing an unexplained formula.

Do not rewrite media names while explaining the mapping

The reference containing 90000 can remain a valid media address even though the segment maps to the Period's beginning. Presentation mapping does not instruct an origin to rename that object to zero or thirty. In a review, keep native media time, Period-relative time, and presentation time in separate columns. For a full timing analysis, sample composition timestamps and addressing details still need to be examined against the applicable profile. The simple excerpt demonstrates one arithmetic mapping only. It does not imply every segment starts exactly on a Period boundary or that changing an offset field will repair incorrectly timestamped media. Store both sample time 90000 and mapped presentation time thirty in the same row. Replacing the former with the latter in the media template would silently change the referenced resource's name.

Worked example · synthetic

The simple mapping is 30 + (90000 − 90000) ÷ 1000 = 30 seconds. The media-reference substitution remains 90000; presentation time is a separate coordinate.

Valid DASH Period excerpt and simplified timing calculation; not a complete profile conformance example.

<Period xmlns="urn:mpeg:dash:schema:mpd:2011" start="PT30S">
  <AdaptationSet mimeType="video/mp4">
    <Representation id="v1" bandwidth="1000000" codecs="avc1.4d401f">
      <SegmentTemplate timescale="1000" presentationTimeOffset="90000"
       initialization="init.mp4" media="s-$Time$.m4s">
        <SegmentTimeline><S t="90000" d="4000"/></SegmentTimeline>
      </SegmentTemplate>
    </Representation>
  </AdaptationSet>
</Period>

Check the interpretation

  • Label units before subtraction.
  • Add the Period start after conversion.
  • Check actual sample timing before changing offsets.