Applies to: Protocol and format interpretation for developers inspecting authorized media delivery.
The useful distinctions
- TimestampScale expresses the duration of a Segment tick in nanoseconds.
- A block timestamp is relative to its Cluster timestamp.
- TrackTimestampScale participates in the block timestamp conversion.
Write down the units
Suppose a cluster begins at tick 3200 and a block is positioned fifty ticks after that cluster. With a one-million-nanosecond Segment tick and track scale one, the combined position is 3250 ticks. Multiplying once gives 3,250,000,000 nanoseconds; dividing by one billion gives 3.25 seconds. The order matters because adding fifty directly to 3.2 seconds would mix incompatible units. Keep both raw fields in the worksheet so rounding cannot hide the source of a discrepancy.
Record what the small example leaves out
The example assumes no codec-delay adjustment and uses a unit track scale. Those assumptions make it a timestamp exercise rather than a complete playback model. Real blocks also identify a track and carry flags and frame data, while duration and ordering may require additional information. Negative relative timestamps are possible, so parsing the block offset as unsigned can produce a spectacularly wrong position. A reviewer can test the arithmetic with a second row using offset minus fifty: that produces 3.15 seconds under the same assumptions. Neither calculation establishes that a decoder should begin at that block or that the block is independently decodable.
Worked example · synthetic
This valid Cluster Timestamp element contains unsigned value 0x0C80 = 3200. For a separately supplied block offset +50, TimestampScale=1000000 and TrackTimestampScale=1, (3200 + 50) × 1000000 = 3250000000 ns. The block itself is intentionally not fabricated.
One valid Cluster child element and a separate synthetic arithmetic scenario; not a complete block or file.
E7 82 0C 80
Check the interpretation
- Read the block-relative value as signed.
- Apply scale factors exactly once.
- Include CodecDelay when the relevant timestamp interpretation requires it.