Applies to: Protocol and format interpretation for developers inspecting authorized media delivery.
The useful distinctions
- SegmentTemplate can use a Number substitution.
- startNumber gives the initial segment number.
- duration and timescale express the segment cadence.
Calculate time and name independently
The synthetic template gives a duration of 4000 units and a timescale of 1000 units per second. Dividing produces a four-second cadence. Separately, startNumber eleven determines the first numeric resource identifier. The next two identifiers are twelve and thirteen. Keeping these two calculations apart prevents a common mistake: using eleven as eleven seconds or using the duration value as a filename number.
Limit what a template expansion proves
A resource ledger can show that the first three media references expand to s-11, s-12, and s-13 under the illustrated naming convention. It cannot establish that any object has been published or that the actual samples meet the declared cadence. A complete dynamic presentation would need additional timing and availability information; a static presentation would need its enclosing duration and addressing context. The excerpt intentionally does not claim either. If using vendor documentation as a companion reference, keep vendor endpoint restrictions separate from the general syntax. This article uses the documented naming idea and arithmetic without importing an implementation's performance promises or configuration limitations into the base format. A number substitution worksheet should record eleven as the first requested token and twelve as the next. The four-second interval is a calculated timeline spacing, not the character count of either filename.
Worked example · synthetic
The first three expanded media references are s-11.m4s, s-12.m4s, and s-13.m4s. The declared cadence is 4000 ÷ 1000 = 4 seconds, independently of those identifiers.
Valid DASH SegmentTemplate excerpt; enclosing MPD timing and media omitted.
<SegmentTemplate xmlns="urn:mpeg:dash:schema:mpd:2011"
timescale="1000" duration="4000" startNumber="11"
initialization="init.mp4" media="s-$Number$.m4s"/>Check the interpretation
- Divide duration by timescale.
- Increment numbers from startNumber.
- Validate publication and actual sample timing separately.