In broadcast DTV, there are two essential parts to the final transport stream (TS). First is the actual packetized compressed audio and video data as well as the tables and other data required to locate and extract them. The second major part is called program and system information protocol (PSIP), which is required by the DTV receiver. The PSIP data is what enables the receiver to know what channel is being received as well as what analog channel is associated with it and the names of the major and minor channels. PSIP also carries viewer information such as program guides, time of day and ratings for the programs.
The last tutorial covered the basic parts of the first section concerning the packetized elementary stream (PES) and associated data. This tutorial will go further with PES as well as explain more about PSIP.
Demultiplexing the stream
The multiplexer combines all the PESes and the associated data packets into one continuous serial bit stream. To extract the PES and view it, we need to first demultiplex the stream to separate out the individual PESes and convert them into elementary streams of compressed video and audio. From there, they can be decompressed, converted to analog and monitored.
To begin the demultiplexing process, the decoder’s 90kHz clock must be synchronized with the multiplexer’s, and to do that, the sync byte must be found in the TS. Every packet contains a sync byte at its start. The sync byte comprises 8 bits, and because all packets are 188 bytes long, the next sync word comes around in another 188 bytes. This repetition makes it easier to find the sync byte and lock to it. Once the demultiplexer has seen the sync byte at least five times, it then knows it has a good lock on the clock and can examine the rest of the stream. Then the individual packets can be clocked in and their packet identifiers (PIDs) can be read and sorted.
To be sure, we are covering the TS in a general overview and many necessary components are being left out of this description. For more details, please see the references at the end of this tutorial. (See Figure 1.)
Once the decoder is locked onto the data stream and the packets sorted, PSIP can begin to populate the receiver with its information. This information for the viewer consists of the system time table, which supplies the current date and time from the station (the program guide is based on this clock time, so any offset or error can cause viewers to miss programs); the region rating table (RRT), which supplies ratings of the programs within the TS so different types of program ratings can be transmitted (e.g. MPA, FCC, etc.); and the event information tables (EITs) 0-3, which list the next 12 hours of programming.
The terrestrial virtual channel table (TVCT) contains a list of all the channels that are or will be online, plus their attributes. This includes the major and minor channel numbers and their names. Channel 6 analog also has Channel 35 digital, so the major channel is six for both analog and digital, and the minor channels are 0 for analog, one for the first digital channel, and so on. The minor channels do not have to be sequential and can be any number from one to 999. Stations might do this to denote different programming sources. Major and minor channel names also come from the PSIP, such as WREY for the major channel, and each minor channel has its own name as long as it fits in seven spaces.
A major component of PSIP is the master guide table (MTG) that lists all the other tables within the PSIP as well as sizes and version numbers, so tables can be updated.
Program clock reference
Program clock reference (PCR) is used to lock the local 27MHz clock to the one used to create the encoded stream. There is a PCR for each program within the TS, and it can share the same PID as one of the PESes. The PCR is a time stamp and its value is derived from a counter, running at the encoder, taken at the moment the packet leaves the multiplexer. Differences between the received time stamps and the local clock are seen as errors, and the local clock is adjusted or reset. If there is a fault with the PCR, then a number of errors can occur, such as loss of lip sync, picture freeze and dropped frames. The PCR is developed at the encoder from either the horizontal sync of an analog signal or the bit rate of an SDI input.
The PCR is a component of the TS and is used to keep the local 27MHz clock locked to the originating encoder’s clock. The encoder’s 27MHz clock is derived from the input video, either SDI or analog video. This means that the stability of the input video will determine the stability of the 27MHz clock and, therefore, the accuracy of the PCR for that program. The presentation time stamp (PTS) is part of the MPEG-2 and coded audio streams; this tells the decoder when this particular video or audio must be presented to the viewer. The time stamps are derived and compared to the 27MHz clock. The PTS is what keeps and locks the audio and video together and maintains lip sync.
Errors in the PCR can be introduced by the encoder/multiplexer or in the transmission path, including remultiplexers and network transmission errors. The tolerance for PCR is 500ns. (See Figure 2.)
Once the decoder is locked to the TS, the program association table (PAT) is used to find all the data elements within it. The PAT holds a list, or table, of all the PIDs and what they are for in the TS. When the viewer selects minor Channel 3, which is listed as “sports” (all this data comes from the TVCT), the PAT directs the decoder to PID 85, which is where the program map table (PMT) is located, and lists the PIDs for the PESes — in this case, they are PID 87 for MPEG-2 video, PID 89 for AC-3 audio (English) and PID 90 for AAC (Spanish). These packets are then converted (this is where the PCR comes in) into a program stream, and from there into their original elementary streams with the help of the system clock reference (i.e. individual serial data for the MPEG-2 video and the AC-3 audio). They are decompressed then supplied to the outputs for display and monitoring. (See Figure 3.)
The Advance Television Systems Committee has all of the specifications for DTV broadcasting available for downloading at www.atsc.org/.
The Digital Video Broadcasting Project is the repository for the specifications for MPEG TS as well as satellite and cable transmissions. Many of the specifications can be downloaded at www.dvb.org/.
The next “Transition to Digital” tutorial will cover TS monitoring and some of the errors that can be encountered.
Future US's leading brands bring the most important, up-to-date information right to your inbox
Thank you for signing up to TV Tech. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.