A transport stream has no index and no fixed duration: time is carried by clocks inside it. The program clock reference says what time it is at the moment a packet is sent; the presentation and decoding time stamps in PES headers say when each piece of audio and video is to be shown and decoded, measured on that same clock.
The clocks
| Value | Where | Size and rate |
|---|---|---|
| PCR | Adaptation field of packets on the PID the PMT names as PCR_PID. At least every 100 ms. | A 33-bit base at 90 kHz, 6 reserved bits and a 9-bit extension counting 0 to 299. The value in ticks of 27 MHz is base × 300 + extension. It wraps after 233 × 300 ticks, about 26.5 hours. |
| OPCR | Adaptation field, optional | The same form: the PCR of the original stream before re-multiplexing. |
| PTS | PES header | 33 bits at 90 kHz (wraps after 26.5 hours). When to present the access unit. |
| DTS | PES header, when it differs from the PTS (frames reordered) | 33 bits at 90 kHz. When to decode. |
| ESCR | PES header, rare | 27 MHz, like the PCR. |
| DTS_next_AU | Adaptation field extension, seamless splice | 33 bits at 90 kHz: the decoding time of the first access unit after a splice point. |
| arrival_time_stamp | Before each packet of a BDAV file | 30 bits at 27 MHz: when the packet arrived. It wraps every 39.8 seconds. |
A receiver sets its 27 MHz clock from the PCRs and decodes each unit when the clock reaches its DTS. The PTS of the first frame comes some time after its PCR: that lead is the buffering delay. The explorer shows it as “First PTS − PCR”.
What the explorer measures
Everything on the Timing tab covers the scanned window.
- PCR PID – the PID with most PCRs, and its first and last value as ticks and as
h:mm:ss.ffffff. - Duration and transport rate – the PCR span, unwrapped across a 33-bit wrap; the rate is the bytes between the first and last PCR packet (counting 188 bytes a packet) divided by that span.
- PCR interval – the least, mean and greatest gap between PCRs, and a note when one exceeds 100 ms.
- PCR against byte position – how far each PCR is from the straight line through the first and last one, as the worst and RMS error in nanoseconds. For a constant-rate multiplex that is the PCR accuracy (the limit is 500 ns); a variable-rate stream shows its rate changes.
- Discontinuity indicators – packets of the PCR PID that set the flag, after which the PCR may jump.
- Presentation time stamps by PID – first and last PTS, span, wraps, and the lead of the first PTS over the nearest earlier PCR.
- Every PCR – a paged list with the packet number, value, time, step from the previous PCR on the same PID, and the rate over that step. Each row selects its packet in the tree.
The Start time option moves the window to a number of seconds after the first PCR of the file by binary search over the file, so a long recording can be opened at a chosen time.
Not described
Known, not yet covered
- Viewer: timing is measured within the window only; a PCR discontinuity inside it is listed but the time after it is not re-based, and the Start time option assumes the clock does not jump between the first PCR and the point asked for.
- Viewer: the STD buffer model (whether the stream would overflow a decoder's buffers) and the T-STD and P-STD checks are not run.