A compressed video unit can arrive later and have an earlier presentation time. Some pictures depend on a reference that is presented later but decoded earlier. Verify acquisition time, decoder input order, and presentation order separately.
Three clocks or orders can describe one frame
Capture timestamps can refer to exposure or frame delivery, and a stream may not expose either directly. DTS gives decode time. PTS gives presentation time. A decoder can hold a later reference while producing an earlier display picture. Some formats do not reorder or expose both timestamps. Network arrival, file position, and name do not substitute for either field. Work from owned offline clips.
Worked example: a 40 ms reversal in decode order
Assume 25 pictures per second, 40 ms apart, with two frame intervals of display buffering. Pictures A, B, and C are presented in order, but B depends on A and C.
| Decode input | DTS | PTS | Picture |
|---|---|---|---|
| A | 0 ms | 80 ms | First reference |
| C | 40 ms | 160 ms | Later reference |
| B | 80 ms | 120 ms | Depends on both references |
Decode-order PTS is 80, 160, 120 ms. Presentation order is 80, 120, 160 ms. Moving the buffer origin shifts times without reconciling the two orders. Actual streams can omit DTS or have nonzero origins, edits, and discontinuities.
With a time base of 1/90000 second per tick, 40 ms is 3,600 ticks. PTS values of 7,200, 14,400, and 10,800 convert to the table values. Preserve raw ticks and converted time. Treating ticks as milliseconds creates a separate scale error.
Investigate the 27 MHz reference when real timing differs
For a compatible 27 MHz, 1.2 V single-ended CMOS active input, SCTF SX2M27.000E20F30THN is an example. Confirm receiving level, supply, load, temperature, routing, and board revision. Its nominal period is about 37.04 ns. If it drives the timestamp timebase, reference error can accumulate against independent time. It does not remove coding dependencies.
Investigate capture cadence, timing sources, and conversions if presentation intervals also fail or actual capture drifts. Resets and timeline changes can also cause real discontinuities.
Preserve capture, container, and actual display evidence
Use a short synthetic pattern with frame IDs. Preserve the original container, input order, DTS, PTS, timebase, and decoded output. Compare an approved non-reordered mode and note any other differences. Check capture logs and frame IDs for actual loss or repeats.
| Check | Keep | Use |
|---|---|---|
| Acquisition | Picture ID, capture origin, and conversion | Check exposure or capture order |
| Codec and container | Decode order, timebase, and available DTS/PTS | Identify order-dependent reversals |
| Display | Reordered output and scene boundaries | Check actual presentation gaps or repeats |
| Reference | Part code, supply, route, and point | Qualify timing independently |
Specify allowed reordering, maximum buffering, and required time fields for algorithmic use. A 25 fps requirement alone does not limit first-frame latency or establish that a reader can use packet order. Retain software version, units, and origin across exports, and keep player-relative values separate from raw timestamp counts.
Frequently asked questions
Can we sort all compressed input by PTS? Doing so can break decode dependencies. Inspect both orders and use a format-aware decoder for presentation.
Does a one-frame reversal prove reordering? Verify the dependency and display sequence and rule out edits, conversion, missing fields, or incorrect markers.
