Sync in video streams
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
Video compression picture types