PES is a packaged es. PTS and DTs have been inserted. Generally, a PES package is used as an image.
PES package format:
PES is then packaged into ts streams or PS streams. a pes is often stored in multiple ts packages,
Start_code: 0x00 00 01
Stream_id:
PES header length:
Information Zone: includes additional information and PTS and DTS
PS stream:
Each PES header contains PTS and DTS. During decoding, PES --> es, audio and video synchronization, in addition to PTS and DTS, SCR (system clock reference) is also used ), during encoding, it is all generated by the STC (system time clock ).
The PS package length is variable.
Ts is also composed of multiple PES. The TS packet consists of two parts: the packet header and the packet data. The length is fixed and the packet header length is 4 bytes. The packet data and self-use Zone account for 184 bytes.