TV & Engineering: PAT - satbroadcasts.com
TV & Engineering: PAT
2012-04-09, Paul Piotrowski
Basics of transport stream elements: Program Association Table.
In the first part of our transport stream related articles we look closer on PAT - Program Association Table.

Program Association Table is one of program-specific information (PSI) tables in MPEG transport stream. It matches Service Identificator PID and Program Map Table PID numbers with each service located in the stream. The PAT should end with a 32-bit CRC.

PAT is assigned to PID "0" and is repeated very frequently, because of its importance.

How to parse a PAT table?

PAT structure



Then PMT data appears and is repeated N times depending on section length.



When all data is sent CRC section finishes the frame.



Parsing example

In our example we used the PMT stream of Skylogic multiplex (Eutelsat 9A - 9°E, 11747 MHz, pol. H, SR 27500, FEC 3/4, DVB-S/QPSK). In this multiplex Trace HD channels and some Italian radio channels are broadcast.




In our first graphic we skipped zero bytes that indicates PAT table. Section lenght is stored on 10 bits. In the example section lenght is 61 bytes. Then TSID numer follows (TSID = 1), table number is 0 and current/next is set to "true".


Section number is "0" and last section is also "0".



Then PMT loop starts. First two bytes are SID number (in our picture we skipped first zero byte), then reserved "111" follows. Next 13 bits are binary representation of PMT PID number. When SID is set to "0" it usually points to PMT PID "16", which is NIT table.


Then we got SIDs and PMTs of all services in transport stream.

Full parsing will give us these PIDs:

SID: 0
PMT: 16

SID: 14
PMT: 42

SID: 15
PMT: 182


and others (not shown in our graphic example):

SID: 1600
PMT: 1600

SID: 1610
PMT: 1610

SID: 1620
PMT: 1620

SID: 1630
PMT: 1630

SID: 1640
PMT: 1640

SID: 1650
PMT: 1650

SID: 1660
PMT: 1660

SID: 1740
PMT: 1740

SID: 1810
PMT: 1810

SID: 1820
PMT: 1820

When loop ends CRC Section bytes appears.

Section CRC: 65 6C F5 BF

As we can see all bytes until the end are set to "FF" - nullbytes. It is because TS frame is 188 bytes long, and this information is stored on less than 188 bytes. To make it regular length redundant nullbytes are added.

source: satbroadcasts

#

DVB-S2X bitrate calculator
DVB-S2 bitrate calculator
DVB-T bitrate calculator