Introduction to transport streams

Most web developers will have worked with video within their application but are unlikely to be familiar with transport streams. Transport streams are how audio, video and data (e.g. subtitles) are combined for delivery over a broadcast network and you do need to understand some of the basics about them to work with HbbTV.

Transports streams were defined by MPEG and then the concept was built on by DVB. Transport streams were defined in the MPEG-2 standard, so their full title is a MPEG-2 transport stream (MP2TS).

A transport stream can carry one or more TV channels. There are two technical terms for a channel, MPEG call them programs and DVB calls them services. For most situations you can assume they are one and the same thing.

The audio, video and data elements within a transport stream are broken into packets. The elementary stream that a packet belongs to are identified by its packet identifier (PID).

Metadata about a transport stream is carried within it within data streams within the transport stream know as tables. There are tables defined by MPEG, known as Program-Specific Information (PSI), and tables defined by DVB, know as service information (SI). These tables provide the necessary metadata to demultiplex and decode the transport stream. They inform a receiver about the structure of the broadcast stream, the services available, and where to find the audio, video, and other components for each service.

The key PSI Tables are:

TablePIDDescription
Program Association Table (PAT)0x0000The PAT contains a list of all the services (programs) in the transport stream. Each service is mapped to a Program Map Table (PMT), which provides further details about the service.
Program Map Table (PMT)As specified by the PAT for each serviceThe PMT provides detailed information about the individual streams that make up a service (e.g., video, audio, subtitles).
Conditional Access Table (CAT)0x0001The CAT provides information about encryption and conditional access systems used in the stream.
Network Information Table (NIT)0x0010The NIT provides details about the physical network carrying the transport stream, including frequency and modulation. It is also used to carry the logical channel numbers (LCNs) for a service in some DVB networks.

In addition to the PSI tables, DVB systems use Service Information (SI) tables to provide additional metadata about services, events, and networks. DVB-SI tables are crucial for Electronic Program Guides (EPGs), channel lists, and scheduling.

TablePIDDescription
Service Description Table (SDT)0x0011Provides details about each service (channel) in the transport stream. Key information includes: 
Event Information Table (EIT)0x0012Carries information about current and future programs for each service, used in EPGs. Key information for each program includes:Event start time and duration.Program title and description.
Time and Date Table (TDT) / Time Offset Table (TOT)0x0014Provides information about the current time and time zone, essential for synchronizing event times in EITs.
Bouquet Association Table (BAT)0x0011Organizes services into bouquets or thematic groups, such as sports or news channels.
Application information tableDefined in the PMT.Provides information about applications (e.g. HbbTV) linked to a service. More information is available in this section of the developer guide.