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​

Passing sample result​

Passing PTS/DTS Monotonicity chart showing PTS and DTS increasing over PES packet order

In this passing example, both timestamp timelines move forward for the selected PES PID. No unsupported backward PTS or DTS step is present, so the rule passes.

The application chart for this rule focuses on detected regressions, so a real passing result may have no error points to display. This sample illustrates the expected timestamp behavior: PTS and DTS progress monotonically, allowing normal frame presentation and decode ordering.

Failing sample result​

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