General MPEG-2 transport stream structure

Transport stream segmentation is performed based on the presentation time stamps (PTSs) in the transport stream. The difference between the first (earliest) PTS in segment n and segment n + 1 is less than or equal to the segment duration indicated by the #EXT-X-TARGETDURATION attribute.

PES packet data is not split between segments. Because A/V streams consist of interleaved PES packet data in most cases, reorganizing transport stream packet data may be required.1

Because random access is limited to segment boundaries in HTTP Live Streaming, a single Program Association Table (PAT) and Program Map Table (PMT) table occurs only in the beginning of each segment, with a PAT followed by a PMT for media decoding. There is no table repetition inside the segment in order to save bandwidth.

For optimal bandwidth efficiency, variable bit-rate transport stream segments are used more often than constant bit-rate segments. The conversion of constant bit-rate transport stream segments to variable bit-rate segments is realized by removing any null packets present in the transport stream segment.

1 In a variable bit-rate transport stream, this can be achieved relatively easily by moving the transport stream packets of the corresponding PES packet from segment n + 1 to the end of the segment n.