Skip to main content

πŸ“ˆ 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_indicator on 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.

PTS/DTS Monotonicity chart

Test file​

  • mpegts-pts-dts-monotonicity.ts