MPEG transport stream

from Wikipedia, the free encyclopedia
Multiple MPEG programs are combined and sent via an antenna. The US digital TV broadcast system then decodes an ATSC - receiver the transport stream and gives the individual program on the playback device.

A transport stream (English: Transport Stream ; MPEG-TS , MTS or TS ) is the name for a standardized communication protocol for the transmission of audio , video and data . It is specified in MPEG-2 Part 1, Systems ( ISO / IEC 13818-1 or ITU -T Rec. H.222.0).

With MPEG-TS, digital video and digital audio are continuously transmitted in bundled form . Transport streams are used for transmission routes such as DVB (satellite, antenna, cable) and ATSC . MPEG-TS is the counterpart to the program stream (MPEG-PS), which was developed for media such as DVDs.

introduction

A transport stream consists of a continuous byte sequence which is divided into packets of 188 bytes each. This allows quick access ( synchronization ) to the content after a program change or other interruptions in reception.

Therefore, the transport stream is preferably used on channels such as satellite, antenna (including mobile reception) or cable, i.e. those with a high error quotient . But optical storage media, where scratches and soiling lead to errors when reading, also benefit from this approach. Despite the error correction procedures of these transmission paths, depending on the quality of reception, transmission errors can occur again and again, which then lead to the loss of individual packets.

Short packets ensure that small transmission errors have only minor effects and that the time until resynchronization remains short. The length of 188 bytes is adapted to the size of the ATM transmission technology, which was considered to be promising at the time the MPEG-2 standard was created (a transport stream packet fits into four ATM “cells”).

Transport streams with several television programs are also used in the widely used digital television standard DVB . When transmitting DVB-T , depending on the modulation and data rate as well as the video compression used, several (in Germany one to six) television programs are accommodated in a transport stream and broadcast over one channel .

In addition to video and audio channels, data channels are also provided. Additional service information , such as encryption information or an " electronic program guide ", can be transmitted via the data channels .

Tables repeatedly embedded in the transport stream (Program Association Table, Program Map Table) group video, audio and data channels into television programs. The individual channels are called elementary currents.

Elements of the transport stream

package

Representation of a decoded TS packet

A packet is the basic unit of a transport stream. It begins with a synchronization byte , the value of which is 47 16 , followed by three 1-bit flags and a 13-bit packet identifier (PID). Then there is a 2-bit field to describe any encryption (00 means unencrypted), another 2-bit field, which shows whether there are additional fields (10) or payload (01) or both (11), and a 4-bit continuity counter. Additional optional fields would follow. The rest of the packet may consist of the actual data of an elementary stream. One of the 1-bit flags is a start indicator to indicate the beginning of a logical block structure of an elementary stream or a table of Program Specific Information (PSI) or Service Information (SI).

Packet Identifier (PID)

Each packet contains a packet identifier (PID), which is represented by a 13-bit value in the header data. All packets with the same PID contain related information. By searching for identical PIDs, a demultiplexer extracts an elementary stream or PSI and SI tables from the transport stream. In most cases the time division multiplex method is used in the transmitter to decide when and how often a certain PID appears in the transport stream. If nothing can be transmitted, empty packets are sent in order not to interrupt the transport stream.

The 4-bit continuity counter in the packet header is used to identify missing transport stream packets in an elementary stream.

The elementary stream with PID 0 is reserved for regular sending of the program table (PAT). Other tables that are sent regularly also each have their own PID (e.g. PMT, SIT, EPG). With this information, the video and audio streams can be assigned to the programs.

Programs

The basic concept of transport streams are programs ( services ) that consist of groups of one or more related content that are transported in packets with different PIDs. The related data is localized using various tables. The absolutely necessary tables ( Program Specific Information (PSI)) are described in IEC 13818-1 , the additional tables ( Service Information (SI) ) in ETSI EN 300 468 .

Program Association Table (PAT)

PAT stands for Program Association Table . Packets that contain the PAT information always have the PID 0. It contains the transport stream identification (transport_stream_id) for each program contained, the program number (program_number) and the PID (program_map_pid) for the associated program map table (PMT).

Program Map Table (PMT)

The Program Map Table (PMT) contains information about the programs. For each program there is a PMT associated with its own PID. The PMTs describe which PIDs contain data for the program. PMTs also provide metadata for the streams and their individual PIDs. For example, a program consisting of an MPEG-2 video stream contains the PID of the video stream and also the type of data, in this case MPEG-2. The PMT can also contain additional descriptors to describe the individual streams.

If programs send the same program at times, the PMT of the programs can contain the same elementary streams for this time, so that the elementary streams do not have to be sent more than once.

Program Clock Reference (PCR)

In order to enable the decoder to display the correct time and speed, the program contains a Program Clock Reference (PCR). The 33-bit numerical value represents the current counter status at the time of transmission (or transport stream generation) of a reference clock driven at 27 MHz.

To find the PCR value of the selected program, the packets whose PID is specified in the PMT associated with the program in the PCR_PID field must be examined . Usually the PID is used in which the video of the program is transmitted. If there is an adaptation field in the packets, this is typically the case every 40 ms, the adaptation field (among other things) contains the PCR value.

The PCR value is very tightly tolerated. On the one hand, the absolute time between two packets with PCR information must not be more than 50 ms, and on the other hand, the jitter of the individual values ​​must not be greater than 500 ns.

Service Description Table (SDT)

The Service Description Table names the program name (eg "ZDF") and provides further information on the individual programs (services); it is transferred to PID 17.

Event Information Table (EIT)

The Event Information Table contains information on current, upcoming and planned programs, such as B. the name of the program ("Tagesschau"). This information relates to the received transport stream and optionally to other transport streams. An electronic program guide can be compiled from this table. It is transmitted with PID 18.

Zero packages

Certain transmission protocols such as ATSC and DVB prescribe a constant bit rate (CBR). To ensure this, a multiplexer may have to insert additional packets. The PID 8191 is reserved for this, which then does not contain any data and is ignored by the receiver. (8191 is the largest and therefore the last number that can be represented with 13 bits.)

Decoding

Programs for decoding the content usually proceed as follows:

  1. Localization of the beginning of the packet in the byte stream. To do this, locate five synchronization bytes (47 16 ) lying on top of one another at a distance of 188 bytes . This is necessary because the value 47 16 is also available in the other data of the transport stream contents. It must not be assumed that the first byte read is the beginning of a packet, simply because it is a byte with the value 47 16 .
  2. Read the Program Association Table (PAT). To do this, the table is read from the packets with PID 0. From this table, which is usually sent twice per second, the number of programs, their identification number (Program_number) and the respective PID of the PMT are determined. In the case of a typical transport stream for digital television in Germany, the PAT contains five entries, one for each of the four programs broadcast and a prefix for the PID of the Network Information Table (NIT).
  3. Read the Program Map Table (PMT) for all programs advertised in the PAT. This contains the identification number specified in the PAT as well as an entry for each elementary stream (video, audio, teletext, etc.), from which the property and the PID of the elementary stream emerge. With this information, the actual decoders for the elementary streams can be selected and configured.
  4. Reading of the elementary streams for the selected program and decoding of the elementary stream contents.

Additional information can also be read out.

  • The Service Description Table (SDT), which are sent in packets with the PID 17, contains an entry for each identification number of the PAT ( called Service_ID in the SDT ) from which the name of the program, e.g. B. "The First" emerges.
  • The Event Information Table (EIT), which is sent in packets with the PID 18, usually contains entries that give a description of the current, following and planned programs.

Storage formats

Some hard disk receivers and many computer TV cards can record transport streams from individual stations and sometimes from complete transponders . The most frequently used container format is the transport stream described above with the file extension * .ts. As an MPEG transport stream, DVB files begin with byte 47 16 , which is repeated every 188 bytes.

Vantage uses the TRP container format and Topfield saves this as * .rec. Some of these transport stream containers can be converted into others. Because several programs are often combined into a transport stream within a transponder, some receivers without a double tuner allow you to watch or record several programs.

See also

Web links

Individual evidence

  1. DVB-T DasÜberallFernsehen channel and program list in Germany . Retrieved April 14, 2015
  2. Etherguide: transport packet [MPEG-2 Semantics]. Retrieved April 16, 2015.
  3. Keith Jack: Video Demystified, Fifth Edition. 2007, pp. 668-669. ISBN 978-0-7506-8395-1 .
  4. Tutorial: Format recordings in H.264 TRP and REC in TS ( Memento from August 15, 2013 in the Internet Archive ) on: HDTVTotal.com, from April 5, 2008.