π PTS/DTS Monotonicity
Presentation Time Stamps (PTS) and Decode Time Stamps (DTS) should not jump backward unexpectedly within the same PES PID.
What it checksβ
The checker inspects PES packets and records an error when:
- a PTS value goes backward compared with the previous observed PTS on the same PID
- a DTS value goes backward compared with the previous observed DTS on the same PID
Backward PTS is tolerated on PES packets that show timestamp reordering typical of B-frames.
Discontinuity indicator handlingβ
If the transport packet carrying the PES start also sets the adaptation-field discontinuity_indicator, the finding is still recorded, but the validation result is downgraded to a warning.
β Pass conditionβ
The test passes when no unsupported backward PTS or DTS steps are detected.
β Fail conditionβ
The test fails when one or more PES timestamps move backward without a matching discontinuity indicator.
β οΈ Warning conditionβ
If all detected regressions are covered by discontinuity_indicator, the test reports a warning instead of a failure.
Exampleβ
Here is a chart that shows two backward timestamp events on the same PES PID.
- The first point is an error because the timestamp moves backward without a matching
discontinuity_indicator. - The second point is a warning because the backward step is covered by
discontinuity_indicatoron the PES-start packet.
This makes it easier to see the difference between an undeclared timestamp regression and a declared transport discontinuity such as a splice, restart, or timestamp reset.

Test fileβ
- mpegts-pts-dts-monotonicity.ts