Program-specific information explained

Program-specific information (PSI) is metadata about a program (channel) and part of an MPEG transport stream.

The PSI data as defined by ISO/IEC 13818-1 (MPEG-2 Part 1: Systems) 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.[1] 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 (Packet Identifier) 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

Pointer[2] [3] !Name!Number
of bits!Description
Pointer field8Present at the start of the TS packet payload signaled by the payload_unit_start_indicator bit in the TS header. Used to set packet alignment bytes or content before the start of tabled payload data.
Pointer filler bytesN*8When the pointer field is non-zero, this is the pointer field number of alignment padding bytes set to 0xFF or the end of the previous table section spanning across TS packets (electronic program guide).
Table header repeated until end of TS packet payload!Name!Number
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 (all bits on)
Section length unused bits2Set to 0 (all bits off)
Section length10 The number of bytes that follow for the syntax section (with CRC value) 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.
Table syntax section!Name!Number
of bits!Description
Table ID extension16Informational only identifier. The PAT uses this for the transport stream identifier and the PMT uses this for the Program number.
Reserved bits2Set to 0x03 (all bits on)
Version number5Syntax version number. Incremented when data is changed and wrapped around on overflow for values greater than 32.
Current/next indicator1Indicates if data is current in effect or is for future use. If the bit is flagged on, then the data is to be used at the present moment.
Section number8This is an index indicating which table this is in a related sequence of tables. The first table starts from 0.
Last section number8This indicates which table is the last table in the sequence of tables.
Table dataN*8Data as defined by the Table Identifier.
CRC3232A checksum of the entire table excluding the pointer field, pointer filler bytes and the trailing CRC32.

Descriptor

Descriptor!Name!Number
of bits!Description
descriptor tag8the tag defines the structure of the contained data following the descriptor length.
descriptor length8The number of bytes that are to follow.
Descriptor dataN*8Data as defined by the Descriptor Tag.

PAT (Program Association Table)

The program association table (PAT) 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 (0x0010) shall be used for NIT.

TS packets containing PAT information always have PID 0x0000.

PAT specific data repeated until end of section length!Name!Number
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 (all bits on)
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 section filter 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 (Single Transport stream PID contains PMT information of more than one program), 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.

PMT specific data!Name!Number
of bits!Description
Reserved bits3Set to 0x07 (all bits on)
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 (all bits on).
Reserved bits4Set to 0x0F (all bits on)
Program info length unused bits2Set to 0 (all bits off)
Program info length10 The 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.
Elementary stream specific data repeated until end of section length!Name!Number
of bits!Description
stream type8This defines the structure of the data contained within the elementary packet identifier.
Reserved bits3Set to 0x07 (all bits on)
Elementary PID13The packet identifier that contains the stream type data.
Reserved bits4Set to 0x0F (all bits on)
ES Info length unused bits2Set to 0 (all bits off)
ES Info length10 The 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 (video, audio, etc.).In addition it may also contain an ECM (entitlement control messages) 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 (DVB-SI)[4] does. The purpose of mentioning but not defining this table in H.222 is that it has reserved program number 0 (zero) 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 DVB Services 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.

Identifiers in use
Decimal Hexadecimal Description
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 (DRM).
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 (used by DVB MAC addressed datagrams).
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 0x02Ignoring 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.

Tags in use
Decimal Hexadecimal Description
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 (MPEG-4 H.263 based)
280x1CAudio stream header parameters for ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed)
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 (DRM)
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 (MPEG-4 LOAS multi-format framed)
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 (JPEG 2000)
510x33Video multi operation point stream header parameters
520x34Video stereoscopic (3D) stream header parameters for ITU-T Rec. H.262, ISO/IEC 13818-2 and ISO/IEC 11172-2
530x35Program stereoscopic (3D) information
540x36Video stereoscopic (3D) 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.

Assignments in use
Decimal Hexadecimal Description
00x00Reserved
10x01ISO/IEC 11172-2 (MPEG-1 video)
in a packetized stream
20x02ITU-T Rec. H.262 and ISO/IEC 13818-2 (MPEG-2 higher rate interlaced video)
in a packetized stream
30x03ISO/IEC 11172-3 (MPEG-1 audio)
in a packetized stream
40x04ISO/IEC 13818-3 (MPEG-2 halved sample rate audio)
in a packetized stream
50x05ITU-T Rec. H.222 and ISO/IEC 13818-1 (MPEG-2 tabled data)
privately defined
60x06ITU-T Rec. H.222 and ISO/IEC 13818-1 (MPEG-2 packetized data)
privately defined (i.e., DVB subtitles/VBI and AC-3)
70x07ISO/IEC 13522 (MHEG)
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 (MPEG-2 lower bit-rate audio)
in a packetized stream
160x10ISO/IEC 14496-2 (MPEG-4 H.263 based video)
in a packetized stream
170x11ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed audio)
in a packetized stream
180x12ISO/IEC 14496-1 (MPEG-4 FlexMux)
in a packetized stream
190x13ISO/IEC 14496-1 (MPEG-4 FlexMux)
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 (lower bit-rate video)
in a packetized stream
280x1CISO/IEC 14496-3 (MPEG-4 raw audio)
in a packetized stream
290x1DISO/IEC 14496-17 (MPEG-4 text)
in a packetized stream
300x1EISO/IEC 23002-3 (MPEG-4 auxiliary video)
in a packetized stream
310x1FISO/IEC 14496-10 SVC (MPEG-4 AVC sub-bitstream)
in a packetized stream
320x20ISO/IEC 14496-10 MVC (MPEG-4 AVC sub-bitstream)
in a packetized stream
330x21ITU-T Rec. T.800 and ISO/IEC 15444 (JPEG 2000 video)
in a packetized stream
34 - 350x22 - 0x23Reserved.
360x24ITU-T Rec. H.265 and ISO/IEC 23008-2 (Ultra HD video)
in a packetized stream
37 - 650x25 - 0x41Reserved.
660x42Chinese Video Standard
in a packetized stream
67 - 1260x43 - 0x7eReserved.
1270x7fISO/IEC 13818-11 IPMP (DRM)
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 (AC-3) 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 (enhanced AC-3) 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[5] digital program insertion cue message
or DTS 8 channel lossless audio for Blu-ray
in a packetized stream
1350x87Dolby Digital Plus (enhanced AC-3) up to 16 channel audio for ATSC
in a packetized stream
136 - 1430x88 - 0x8FPrivately defined.
1440x90Blu-ray Presentation Graphic Stream (subtitling)
in a packetized stream
1450x91ATSC DSM CC Network Resources table
146 - 1910x92 - 0xBFPrivately defined.
1920xC0DigiCipher II text
in a packetized stream
1930xC1Dolby Digital (AC-3) 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 (Ultra HD video)
in a packetized stream
2100xD2Audio Video Standard AVS2 (Ultra HD video)
in a packetized stream
2110xD3Audio Video Standard AVS3 Audio
in a packetized stream
2120xD4Audio Video Standard AVS3 Video (Ultra HD video)
in a packetized stream
213 - 2180xD5 - 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 (lower bit-rate video)
in a packetized stream
235 - 2550xEB - 0xFFPrivately defined.

References

  1. Book: Digital Video Broadcasting (DVB); Specification for Service Information (SI) in DVB systems . 20 . 5.1.2 Mapping of sections into Transport Stream (TS) packets . EN . 300 468 . v1.13.1 . ETSI . 2012 . 2016-10-13.
  2. http://www.iso.org/iso/catalogue_detail?csnumber=44169 ISO/IEC 13818-1 Information technology --- Generic coding of moving pictures and associated audio information: Systems (MPEG-2)
  3. http://www.jdsu.com/ProductLiterature/mpeg2_bk_cab_tm_ae.pdf(MPEG-2 Pocketguide)
  4. ETSI-EN 300 468 Digital Video Broadcasting (DVB); Specification for Service Information (SI) in DVB systems
  5. Web site: Archived copy . 2016-05-13 . https://web.archive.org/web/20160513203531/http://www.scte.org/SCTEDocs/Standards/SCTE%2035%202016.pdf . 2016-05-13 . dead .

External links