Some useful acronyms:

  • PTS: Presentation time stamp; used to order frames for display. Wikipedia
  • DTS: Decoding time stamp; used to order frames for decoding
  • VBV: Video Buffering Verifier; used to prevent underflow/overflow of MPEG bit stream
  • PCR: Program Clock reference, base timme for PTS values. Wikipedia

FLV files have a CompositionTime field in the VideoData segment; this is PTS - DTS.

PTS and DTS should be 90Khz values. CTS is in units of milliseconds, so compositionTime = (PTS - DTS) / 90.0.

Reference

Tutorial 05: Synching Video

understanding DTS PTS

Timing and Buffer Control

MPEG transport stream

Video compression picture types

ISO/IEC 14496-12 Part 12: ISO base media file format

Information technology — Coding of audio-visual objects — Part 15: Advanced Video Coding (AVC) file format

MPEG-4

MPEG-4 Advanced Video Coding

Flash Video

Adobe Flash Video File Format Specification Version 10.1