The decode timestamp (DTS) tells the player when a frame must be decoded, which can differ from when it is presented (PTS). The reason is B-frames in video: a bidirectionally-predicted frame depends on a later frame, so the decoder must receive and decode that reference out of display order. DTS captures that decode order while PTS captures display order, and the gap between them sizes the decoder's reorder buffer. Audio frames don't reference each other this way, so for audio DTS and PTS are normally equal. One frequent confusion worth flagging: this DTS, the decode timestamp, has nothing to do with the DTS surround-sound codec from DTS, Inc.

Book cover: Audio for Video, Volume 5 of the Fora Soft Video Engineering Handbook

The book · Volume 5 of 7

Audio for Video: A Complete Guide to Sound in Video Products: From Jitter Buffers and Lip Sync to Atmos, Quality Metrics, and Neural Codecs

Decode timestamps are why a stream with B-frames can play smoothly in one player and stutter or drift in another. This volume explains DTS and PTS in depth together with clock domains, lip sync and drift correction, giving you a clear model for debugging timing bugs in muxers and players. Written by Nikolay Sapunov, CEO at Fora Soft.

Read it on Amazon →Kindle & paperback · Fora Soft Video Engineering Handbook

Seeing timing glitches in streams with B-frames and suspect broken DTS or PTS values?

Send us a problem file or stream and we will trace the DTS and PTS chain, find where timing breaks and give you a concrete fix list. 250+ video products shipped since 2005.

Book a 30-min call →WhatsApp →Email us →