Digital Signal Processing Reference
In-Depth Information
stream during the decoding, the transport stream also carries lists describ-
ing the structure, so-called “tables”.
3.2 The MPEG2 Transport Stream Packet
The MPEG-2 transport stream consists of packets having a constant length
(Fig. 3.8.). This length is always 188 bytes, with 4 bytes of header and 184
bytes of payload. The payload contains the video, audio or general data.
The header contains numerous items of importance to the transmission of
the packets. The first header byte is the “sync byte”. It always has a value
of 47 hex (0x47 in C/C++ syntax) and is spaced a constant 188 bytes apart in
the transport stream. It is quite possible, and certainly not illegal, for there
to be a byte having the value 0x47 somewhere else in the packet.
188 byte
4 Byte
TS Header
184 byte
payload
13 bit packet identifier = PID
1 bit transport error indicator
1 byte sync byte = 0x47
Fig. 3.8. MPEG-2 transport stream packet
The sync byte is used for synchronizing the packet to the transport
stream and it is its value plus the constant spacing which is being used for
synchronization. According to MPEG, synchronization at the decoder oc-
curs after five transport stream packets have been received. Another
important component of the transport stream is the 13 bit-long “packet
identifier” or PID for short. The PID describes the current content of the
payload part of this packet. The hexadecimal 13 bit number in combination
with tables also included in the transport stream show which elementary
stream or content this is.
 
Search WWH ::




Custom Search