Presentation timestamp
lastmod 2024-05-24created 2022-10-117 edits
Timestamp for display order.
Used together with the Presentation Time Stamp (PTS) is the Deconding Time Stamp (DTS; timestamp for decoding order).
PTS vs DTS
Suppose we have a video, and the frames are displayed as follows.
Now, we need to know the information in the P frame before we can display the B frames. Because of this, the frames will probably be stored as follows.
This is why each frame needs both a DTS and a PTS. The DTS tells us when to decode, and the PTS tells us when to display. So in this case, our stream looks like this.
How PTS is calculated in FFmpeg
See AVPacket for details.
See also
- FFmpeg
- MPEG
- Group of pictures (GOP)
- Presentation timestamp (Presentation Time Stamp; PTS)
- Decompression timestamp (Deconding Time Stamp; DTS)