Program-specific information


Program-specific information is metadata about a program and part of an MPEG transport stream.
The PSI data as defined by ISO/IEC 13818-1 includes four tables:
The MPEG-2 specification does not specify the format of the CAT and NIT.
PSI is carried in the form of a table structure. Each table structure is broken into sections. Each section can span multiple transport stream packets. On the other hand, a transport stream packet can also contain multiple sections with same PID. Adaptation field also occurs in TS packets carrying PSI data. The PSI data will never be scrambled so that the decoder at the receiving end can easily identify the properties of the stream.
The sections comprising the PAT and CAT tables are associated with predefined PIDs as explained in their respective descriptions below. There may be multiple independent PMT sections in a stream; each section is given a unique user-defined PID and maps a program number to the metadata describing that program and the streams within it. PMT section PIDs are defined in the PAT, and are the only PIDs defined there. The streams themselves are contained in PES packets with user-defined PIDs specified in the PMT.

PSI structure

Table Sections

NameNumber
of bits
Description
Table ID8Table Identifier, that defines the structure of the syntax section and other contained data. As an exception, if this is the byte that immediately follow previous table section and is set to 0xFF, then it indicates that the repeat of table section end here and the rest of TS packet payload shall be stuffed with 0xFF. Consequently, the value 0xFF shall not be used for the Table Identifier.
Section syntax indicator1A flag that indicates if the syntax section follows the section length. The PAT, PMT, and CAT all set this to 1.
Private bit1The PAT, PMT, and CAT all set this to 0. Other tables set this to 1.
Reserved bits2Set to 0x03
Section length unused bits2Set to 0
Section length10The number of bytes that follow for the syntax section and/or table data. These bytes must not exceed a value of 1021.
Syntax section/Table dataN*8When the section length is non-zero, this is the section length number of syntax and data bytes.

Descriptor

PAT

The program association table lists all programs available in the transport stream. Each of the listed programs is identified by a 16-bit value called program_number. Each of the programs listed in PAT has an associated value of PID for its PMT.
The value 0x0000 for program_number is reserved to specify the PID where to look for network information table. If such a program is not present in PAT the default PID value shall be used for NIT.
TS packets containing PAT information always have PID 0x0000.
NameNumber
of bits
Description
Program num16Relates to the Table ID extension in the associated PMT. A value of 0 is reserved for a NIT packet identifier.
Reserved bits3Set to 0x07
Program map PID13The packet identifier that contains the associated PMT

The PAT is assigned PID 0x0000 and table id of 0x00. The transport stream contains at least one or more TS packets with PID 0x0000. Some of these consecutive packets form the PAT.
At the decoder side the PSI listens to the incoming TS packets. After the filter identifies the PAT table they assemble the packet and decode it.
A PAT has information about all the programs contained in the TS. The PAT contains information showing the association of Program Map Table PID and Program Number.
The PAT should end with a 32-bit CRC

PMT (Program map specific data)

PMTs contain information about programs. For each program, there is one PMT. While the MPEG-2 standard permits more than one PMT section to be transmitted on a single PID, most MPEG-2 "users" such as ATSC and SCTE require each PMT to be transmitted on a separate PID that is not used for any other packets.
The PMTs provide information on each program present in the transport stream, including the program_number, and list the elementary streams that comprise the described MPEG-2 program. There are also locations for optional descriptors that describe the entire MPEG-2 program, as well as an optional descriptor for each elementary stream. Each elementary stream is labeled with a stream_type value.
NameNumber
of bits
Description
Reserved bits3Set to 0x07
PCR PID13The packet identifier that contains the program clock reference used to improve the random access accuracy of the stream's timing that is derived from the program timestamp. If this is unused. then it is set to 0x1FFF.
Reserved bits4Set to 0x0F
Program info length unused bits2Set to 0
Program info length10The number of bytes that follow for the program descriptors.
Program descriptorsN*8When the program info length is non-zero, this is the program info length number of program descriptor bytes.
Elementary stream info dataN*8The streams used in this program map.

NameNumber
of bits
Description
stream type8This defines the structure of the data contained within the elementary packet identifier.
Reserved bits3Set to 0x07
Elementary PID13The packet identifier that contains the stream type data.
Reserved bits4Set to 0x0F
ES Info length unused bits2Set to 0
ES Info length length10The number of bytes that follow for the elementary stream descriptors.
Elementary stream descriptorsN*8When the ES info length is non-zero, this is the ES info length number of elementary stream descriptor bytes.

This table contains PID numbers of elementary streams associated with the program and it has information about the type of these elementary streams.
In addition it may also contain an ECM stream for any other stream that is encrypted. These messages provide the information used in the cipher key selection stage.

CAT (Conditional access specific data)

This table is used for conditional access management of the cypher keys used for decryption of restricted streams. This table contains privately defined descriptors of the system used and the associated EMM PID. It is used by a network provider to maintain regular key updates.

NIT (network information specific data)

This optional table may group transport stream identifiers into a network, providing access parameters and other details. ITU-T Rec. H.222 and ISO/IEC 13818-1 do not define the NIT structure. The European Broadcasting Union DVB specification ETSI EN 300 468 does. The purpose of mentioning but not defining this table in H.222 is that it has reserved program number 0 in the PAT. The Table ID extension is used to identify the local network together with a directory listing of transport streams. Descriptors are used to list the modulation, source of those streams and programs. The original network identifier is meant to allow transport streams and programs on foreign networks to be included in the local network which allows no remapping of transport and program IDs that may be duplicated between networks. The DVB specification defines the transport packet identifier as 16 and the table identifier of the local network of transports as 64. A table identifier of 65 is for a foreign network of transports. The network identifiers are maintained via who have separated the identifiers into two unique, yet unnecessary groupings of Network_ID and Original_Network_ID. The two groupings have a large number of overlapping entries.

PSI labels

Table Identifiers

Each table in a transport stream is identified by an 8-bit table identifier.
DecimalHexadecimalDescription
00x00Program Association section contains a directory listing of all Program Map Tables
10x01Conditional Access section contains a directory listing of all EMM streams
20x02Program Map section contains a directory listing of all elementary streams.
30x03Transport Stream Description section.
40x04ISO/IEC 14496 scene description section.
50x05ISO/IEC 14496 object description section.
60x06Metadata section.
70x07ISO/IEC 13818-11 IPMP control information.
8 - 570x08 - 0x39Reserved.
580x3AISO/IEC 13818-6 DSM CC multiprotocol encapsulated.
590x3BISO/IEC 13818-6 DSM CC U-N messages.
600x3CISO/IEC 13818-6 DSM CC Download Data Messages.
610x3DISO/IEC 13818-6 DSM CC stream descriptor list.
620x3EISO/IEC 13818-6 DSM CC privately defined.
630x3FISO/IEC 13818-6 DSM CC addressable.
64 - 1270x40 - 0x7FUsed by DVB.
128 - 1430x80 - 0x8FDVB-CSA and DigiCipher II/ATSC CA message sections used in EMM and ECM streams.
144 - 1910x90 - 0xBFMay be assigned as needed to other data tables.
192 - 2540xC0 - 0xFEUsed by DigiCipher II/ATSC/SCTE.
2550xFFForbidden. As is used for null padding.

SCTE Specific tables:
0xCO table id is used by Programme Information Message
0xC1 table id is used by Programme Name Message
It is not necessary that pid of PMT pointed by PAT will contain a table with table id 0x02
Ignoring table id while reading PMT could have bad consequence

Program and Elementary Stream Descriptor Tags

Each descriptor in a transport stream table is identified by an 8-bit descriptor tag.
DecimalHexadecimalDescription
0 - 10x00 - 0x01Reserved.
20x02Video stream header parameters for ITU-T Rec. H.262, ISO/IEC 13818-2 and ISO/IEC 11172-2
30x03Audio stream header parameters for ISO/IEC 13818-3 and ISO/IEC 11172-3
40x04Hierarchy for stream selection
50x05Registration of private formats
60x06Data stream alignment for packetized video and audio sync point
70x07Target background grid defines total display area size
80x08Video Window defines position in display area
90x09Conditional access system and EMM/ECM PID
100x0AISO 639 language and audio type
110x0BSystem clock external reference
120x0CMultiplex buffer utilization bounds
130x0DCopyright identification system and reference
140x0EMaximum bit rate
150x0FPrivate data indicator
160x10Smoothing buffer
170x11STD video buffer leak control
180x12IBP video I-frame indicator
190x13ISO/IEC13818-6 DSM CC carousel identifier
200x14ISO/IEC13818-6 DSM CC association tag
210x15ISO/IEC13818-6 DSM CC deferred association tag
220x16ISO/IEC13818-6 DSM CC Reserved.
230x17DSM CC NPT reference
240x18DSM CC NPT endpoint
250x19DSM CC stream mode
260x1ADSM CC stream event
270x1BVideo stream header parameters for ISO/IEC 14496-2
280x1CAudio stream header parameters for ISO/IEC 14496-3
290x1DIOD parameters for ISO/IEC 14496-1
300x1ESL parameters for ISO/IEC 14496-1
310x1FFMC parameters for ISO/IEC 14496-1
320x20External ES identifier for ISO/IEC 14496-1
330x21MuxCode for ISO/IEC 14496-1
340x22FMX Buffer Size for ISO/IEC 14496-1
350x23Multiplex Buffer for ISO/IEC 14496-1
360x24Content labeling for ISO/IEC 14496-1
370x25Metadata pointer
380x26Metadata
390x27Metadata STD
400x28Video stream header parameters for ITU-T Rec. H.264 and ISO/IEC 14496-10
410x29ISO/IEC 13818-11 IPMP
420x2ATiming and HRD for ITU-T Rec. H.264 and ISO/IEC 14496-10
430x2BAudio stream header parameters for ISO/IEC 13818-7 ADTS AAC
440x2CFlexMux Timing for ISO/IEC 14496-1
450x2DText stream header parameters for ISO/IEC 14496
460x2EAudio extension stream header parameters for ISO/IEC 14496-3
470x2FVideo auxiliary stream header parameters
480x30Video scalable stream header parameters
490x31Video multi stream header parameters
500x32Video stream header parameters for ITU-T Rec. T.800 and ISO/IEC 15444
510x33Video multi operation point stream header parameters
520x34Video stereoscopic stream header parameters for ITU-T Rec. H.262, ISO/IEC 13818-2 and ISO/IEC 11172-2
530x35Program stereoscopic information
540x36Video stereoscopic information
55 - 630x37 - 0x3FReserved.
64 - 1270x40 - 0x7FUsed by DVB.
128 - 2070x80 - 0xCFUsed by ATSC.
1600xA0VideoLAN FourCC, video size and codec initialization data
208 - 2230xD0 - 0xDFUsed by ISDB.
224 - 2330xE0 - 0xE9Used by CableLabs.
234 - 2540xEA - 0xFEMay be assigned as needed to other descriptors.
2550xFFForbidden. As is used for null padding.

Elementary stream types

Each elementary stream in a transport stream is identified by an 8-bit elementary stream type assignment.
DecimalHexadecimalDescription
00x00Reserved
10x01ISO/IEC 11172-2
in a packetized stream
20x02ITU-T Rec. H.262 and ISO/IEC 13818-2
in a packetized stream
30x03ISO/IEC 11172-3
in a packetized stream
40x04ISO/IEC 13818-3
in a packetized stream
50x05ITU-T Rec. H.222 and ISO/IEC 13818-1
privately defined
60x06ITU-T Rec. H.222 and ISO/IEC 13818-1
privately defined
70x07ISO/IEC 13522
in a packetized stream
80x08ITU-T Rec. H.222 and ISO/IEC 13818-1 DSM CC
in a packetized stream
90x09ITU-T Rec. H.222 and ISO/IEC 13818-1/11172-1 auxiliary data
in a packetized stream
100x0AISO/IEC 13818-6 DSM CC multiprotocol encapsulation
110x0BISO/IEC 13818-6 DSM CC U-N messages
120x0CISO/IEC 13818-6 DSM CC stream descriptors
130x0DISO/IEC 13818-6 DSM CC tabled data
140x0EISO/IEC 13818-1 auxiliary data
in a packetized stream
150x0FISO/IEC 13818-7 ADTS AAC
in a packetized stream
160x10ISO/IEC 14496-2
in a packetized stream
170x11ISO/IEC 14496-3
in a packetized stream
180x12ISO/IEC 14496-1
in a packetized stream
190x13ISO/IEC 14496-1
in ISO/IEC 14496 tables
200x14ISO/IEC 13818-6 DSM CC synchronized download protocol
210x15Packetized metadata
220x16Sectioned metadata
230x17ISO/IEC 13818-6 DSM CC Data Carousel metadata
240x18ISO/IEC 13818-6 DSM CC Object Carousel metadata
250x19ISO/IEC 13818-6 Synchronized Download Protocol metadata
260x1AISO/IEC 13818-11 IPMP
270x1BITU-T Rec. H.264 and ISO/IEC 14496-10
in a packetized stream
280x1CISO/IEC 14496-3
in a packetized stream
290x1DISO/IEC 14496-17
in a packetized stream
300x1EISO/IEC 23002-3
in a packetized stream
310x1FISO/IEC 14496-10 SVC
in a packetized stream
320x20ISO/IEC 14496-10 MVC
in a packetized stream
330x21ITU-T Rec. T.800 and ISO/IEC 15444
in a packetized stream
34 - 350x22 - 0x23Reserved.
360x24ITU-T Rec. H.265 and ISO/IEC 23008-2
in a packetized stream
37 - 650x25 - 0x41Reserved.
660x42Chinese Video Standard
in a packetized stream
67 - 1260x43 - 0x7eReserved.
1270x7fISO/IEC 13818-11 IPMP
in a packetized stream
1280x80ITU-T Rec. H.262 and ISO/IEC 13818-2 with DES-64-CBC encryption for DigiCipher II
or PCM audio for Blu-ray
in a packetized stream
1290x81Dolby Digital up to six channel audio for ATSC and Blu-ray
in a packetized stream
1300x82SCTE subtitle
or DTS 6 channel audio for Blu-ray
in a packetized stream
1310x83Dolby TrueHD lossless audio for Blu-ray
in a packetized stream
1320x84Dolby Digital Plus up to 16 channel audio for Blu-ray
in a packetized stream
1330x85DTS 8 channel audio for Blu-ray
in a packetized stream
1340x86SCTE-35 digital program insertion cue message
or DTS 8 channel lossless audio for Blu-ray
in a packetized stream
1350x87Dolby Digital Plus up to 16 channel audio for ATSC
in a packetized stream
136 - 1430x88 - 0x8FPrivately defined.
1440x90Blu-ray Presentation Graphic Stream
in a packetized stream
1450x91ATSC DSM CC Network Resources table
146 - 1910x92 - 0xBFPrivately defined.
1920xC0DigiCipher II text
in a packetized stream
1930xC1Dolby Digital up to six channel audio with AES-128-CBC data encryption
in a packetized stream
1940xC2ATSC DSM CC synchronous data
or Dolby Digital Plus up to 16 channel audio with AES-128-CBC data encryption
in a packetized stream
195 - 2060xC3 - 0xCEPrivately defined.
2070xCFISO/IEC 13818-7 ADTS AAC with AES-128-CBC frame encryption
in a packetized stream
2080xD0Privately defined.
2090xD1BBC Dirac
in a packetized stream
210 - 2180xD2 - 0xDAPrivately defined.
2190xDBITU-T Rec. H.264 and ISO/IEC 14496-10 with AES-128-CBC slice encryption
in a packetized stream
220 - 2330xDC - 0xE9Privately defined.
2340xEAMicrosoft Windows Media Video 9
in a packetized stream
235 - 2550xEB - 0xFFPrivately defined.