MPEG-2 Streams

 | 
The MPEG-2 Transport Stream is made up of streams. A MPEG-2 stream may consist of one or more Transport Streams which in turn consists of one or more programs. Each program is in turn divided into one or more packetized Elementary Streams (PES). These PESs are constructed from elementary streams as can be seen in Figure 20. [4]MPEG-2 Transport Stream Hierarchy
Figure 20 - MPEG-2 Transport Stream Hierarchy.

Elementary Stream (ES)

An elementary stream is a generic term for one of the coded video, coded audio or other coded bit streams. [3]

Packetized Elementary Stream (PES)

The elementary streams are packetized in a packetized Elementary Stream (PES). Figure 21 shows the PES frame structure.

The Packetized Elementary Stream Packet

Figure 21 - The packetized Elementary Stream packet

Program Stream (PS)

A Program Stream is similar to MPEG-1 systems multiplex. One or more PESs that have a common timebase is combined into a single stream. The program is denoted by a program number and consists of elementary streams with a common Program Clock Reference (PCR). The Program Stream multiplex is intended for relatively noise free environments.

Transport Stream (TS)

The MPEG-2 Transport Stream is defined in [ISO/IEC 13818-1]. The Transport Stream multiplex is intended for noisy environments and may contain one or more programs of MPEG coded data from elementary streams, or programs that comes directly from Program Streams, or even programs that come from other Transport Streams which may contain programs, etc.

MPEG-2 Transport Stream syntax
Figure 22 - MPEG-2 Transport Stream syntax.

The Transport Stream multiplex is designed so that several operations are possible with minimum effort. Some of these are [3]:

  • Retrieve the coded data from one program within the Transport Stream, decode it and present it to the viewer as shown in Figure 23.
    Prototypical transport demultiplexing and decoding example
    Figure 23 - Prototypical transport demultiplexing and decoding example.
  • Extract the Transport Stream packets from one program within the Transport Stream and produce a new Transport Stream with only this program in it as shown in Figure 24.
    Prototypical transport multiplexing example
    Figure 24 - Prototypical transport multiplexing example
  • Extract the transport packets of one or more programs from one or more Transport Streams and produce a new Transport Stream.
  • Extract the contents of a program in a Transport Stream and produce a Program Stream containing that one program as shown in Figure 25.
    Prototypical transport to program stream conversion
    Figure 25 - Prototypical transport to program stream conversion.
  • Convert a Program Stream to a Transport Stream for transport over lossy environment, and then convert the Transport Stream into a new Program Stream that will be valid but may not be identical to the original one.