About: MPEG Transport Stream (MPEG-TS) is a widely used digital container format specifically designed for Digital Video Broadcasting (DVB) applications. It consists of small individual packets and is used for the transmission and storage of audio, video, and metadata-related information.
A MPEG transport stream includes a number of elementary streams (ES) coming from the encoder, which is first turned into packetized elementary streams (PES). These packets are stored in 188-byte chunks and have a Packet Identification Number (PID) which is a user-defined number, ranging from 0 to 8,192 (it is stored in the first 13 bytes). The list of these identifiers is stored in the Program Mapping Table (PMT), which essentially is a description of the stream content.
Terminology
PSI: Program Specific Information is the metadata that identifies what parts of the transport stream belong to a particular program. This information is carried in a number of PSI tables: (source1)(source2)
- PAT: Program Association Table
- PMT: Program Map Table
- CAT: Conditional Access Table
- NIT: Network Information Table
PAT: Program Association Table is the entry point for the PSI tables. It is always carried in packets with PID = 0. For each assigned program number, the PAT lists the PID for packets containing that program's PMT. (source)
PMT: Program Map Table lists all the PIDs for packets containing elements of a particular program (audio, video, aux data, and Program Clock Reference (PCR)). (source)
CAT: Conditional Access Table
NIT: Network Information Table
ES: Elementary Stream is the output of an encoder, containing only one kind of data (e.g. audio, video, or closed caption). Will often carry a common header when packetized into a packetized elementary stream (PES). (source1)(source2)
PES: Packetized Elementary Stream, which consists of a single ES which has been made into packets, each starting with an added packet identifier (PID).
PID: Each table or elementary stream in a transport stream is identified by a 13-bit packet identifier number, between 1 and 8192 (as 0 is reserved for the PAT). (source)
MUX: A multiplex, or MUX, is a grouping of program services as interleaved data packets for broadcast over a network or modulated multiplexed medium. (source1)(source2)