Packetized elementary stream

[3] The elementary stream is packetized by encapsulating sequential data bytes from the elementary stream inside PES packet headers.

A typical method of transmitting elementary stream data from a video or audio encoder is to first create PES packets from the elementary stream data and then to encapsulate these PES packets inside Transport Stream (TS) packets or Program Stream (PS) packets.

The TS packets can then be multiplexed and transmitted using broadcasting techniques, such as those used in an ATSC and DVB.

In some cases the PES packets need not be modified when performing such conversions.

While above flags indicate that values are appended into variable length optional fields, they are not just simply written out.