MPEG-2 Transport Stream in CODEC_NAME_ARIAL16bold_001

Top  Previous  Next

Since codec_name_arial12_001 system version 3.2.0.92 MPEG TS is supported. This chapter does not describe the whole MPEG TS standard but the features supported by codec_name_arial12_001.

 

1. General

The MPEG TS standard which was adopted as ISO/IEC 13818 – 1 defines ways of multiplexing more than one stream (audio, video and data) into one program. A program consists of one or more Program Elementary Streams (PES), which may or may not be MPEG encoded. The multiplexing process discerns 2 different schemes:

 

1.1 Transport Stream (TS)

intended for storage and transmission in non-error-free environments
fixed length (188 byte)
multiple reference clocks possible
e.g. Broadcasting, ATM

 

1.2 Program Stream (PS) – not covered in this chapter

intended for storage and transmission in error-free environments
large/multiple length packets
single reference clock
e.g. DVD

 

Creation of transport stream in codec_name_arial12_001:

 

mpegts004

 

Packetization of an elementary stream into TS-packets:

 

mpegts005

 

2. Elements of MPEG TS

Here the MPEG-2 TS terms supported by codec_name_arial12_001 are explained.

 

2.1 Packet

A packet is the basic unit of the MPEG-2 Transport Stream and consists of a packet header, an optional adaption field and/or an optional payload field. A packet is a cell of 188 bytes with a header size of 4 bytes and a payload/adaption field size of 184 bytes. Stuffing of a TS-packet is possible.

 

TS packet header:

 

mpegts006

 

2.2 PID (Packet/Program identifier)

The PID is used to identify distinct elementary streams within the transport stream. The PID is a 13 bit value what allows the differentiation between a maximum of 8192 different PID's. TS packets with a PID of 0, 1 or 2 are special packets that include program specific information (PSI).

The PID’s in the range from hexadecimal 0 to 15 are reserved by the ISO/IEC 13818-1.

 

2.3 Program

A program in an MPEG-TS is defined as a collection of PID’s that are related to each other (audio, video and data). Each Transport Stream comprises of one or more programs. The easiest comparison of a program might be a TV or radio channel.

At the moment codec_name_arial12_001 supports only one program (stereo audio channel).

 

2.4 Program Specific Information (PSI):

The PSI information is used by the decoder to ‘learn’ about the currently received/decoded transport stream.

The MPEG-2 TS standard defines 4 tables from which the first 2 are currently used in the codec_name_arial12_001:

 

mpegts007

 

2.4.1 PAT (= Program Association Table):

The PAT contains a complete list of all programs in the transport stream along with the PID (= Program Identifier) for the PMT (= Program Map Table) of each program. More or less PAT is a summary of the PID’s of the PMT’s.

PAT has got the PID = 0.

 

2.4.2 PMT (= Program Map Table)

PMT contains information about individual programs. There is one PMT PID for each program. The PMT combines all relevant PID’s for the particular program. You can say that the PMT provides the mapping between the program number and the program elements that comprise them.

 

3. Synchronization of elementary streams

For the reconstruction of the original program the MPEG-2 TS standard introduces mechanisms for synchronization of different streams within a program. Therefore timestamps are inserted by the encoder. These timestamps are based on the STC (= System Time Clock; 27 MHz) which is the reference for the program and the master clock of the audio signal.

After multiplexing, the encoding system inserts a reference clock to regenerate the STC on the decoding side.

 

3.1 PCR (= Program Clock Reference)

The PCR is the reference clock that is used to synchronize both encoder and decoder.

The PCR information is a 42 bit value of the adaption field which includes the PTS and DTS (see item 3.2).

The regeneration of the STC (= System Time Clock) on the receiving side depends on transmitting PCR’s through the system. PCR’s are inserted at a maximum interval of 100 ms and are measured in units of one period of a 27 MHz clock.

The synchronization/regeneration of the STC on the receiving side is affected by variable delay or jitter of the link.

 

3.2 PTS (= Presentation Timestamp) and DTS (= Decoding Timestamp)

The Presentation Timestamp and the Decoding Timestamp are added to the audio frame (called Access Unit).

The PTS indicates when an audio frame should be removed from the receiver buffer, decoded and presented, while the DTS indicates when an audio frame should be removed from the receiver buffer and decoded.

Both PTS and DTS are entered in the bit stream at intervals not exceeding 700 ms. The timestamps are expressed in units of one period of a 90 kHz clock (retrieved from the 27 MHz system clock). In an audio-only stream (e.g at codec_name_arial12_001 ) the PTS is identical to the DTS.

 

Creation of PTS and DTS:

 

mpegts008

 

4. Configuration steps on codec_name_arial12bold_001 side

MPEG TS connections can be configured and established via menu item Expert/Session.