Multiplexes and elementary streams, System stream, Program stream – Extron Electronics MS9500 HD FrEND Plus User Manual
Page 93
MS9500GL HD FrEND Plus
Appendix B: An Introduction to MPEG
Multiplexes And Elementary Streams
So far the discussion has concentrated on audio and video as if they were completely separate entities. Most
applications using MPEG require audio and video to be combined, somehow, in such a way that during playback
they remain synchronized (i.e. Lip Sync). In the MPEG world the audio and video are referred to as Elementary
streams and the “magic” that combines audio, video and provides the synchronization is called a multiplex. The
following diagram shows a greatly simplified version of an MPEG encoder.
Audio Data
Mpeg Encode
Mpeg Encode
Multiplexer
Output
Stream
System
Clock
Video Data
As the audio and video data passes through the multiplexer, they are arranged into packets, each of which is
stamped with the current time from the system clock. These packets are named PES packets, for Packetized
Elementary Stream and the time stamps are referred to as PTSs (Presentation TimeStamps). The MPEG timing is
structured such that each elementary stream in a multiplexed stream is linked to the system clock (as opposed to
each other).
When the decoder plays back an MPEG stream, the video and audio data packets are “presented” at the times
specified by the PTSs in the PES packets.
It is important to understand that the PES times are features of Multiplexing audio and video into single streams.
They are not included in elementary streams. Playback of elementary streams relies on the implicit timing of the
stream. For example, an NTSC video stream needs to be presented at 29.97 frames per second. For audio streams,
the playback rate is the same as the sampling rate, for example 48KHz.
Note: This scheme sounds good in theory. Unfortunately, we have experienced that many encoders introduce some
errors into the PTS scheme. This may be a single bad time on a single packet, or even times completely out of sync
between Audio and Video
The MPEG standard defines three different multiplex methods designed for different applications.
System Stream
A system stream is the MPEG 1 mechanism for combining an audio and a video elementary stream into the same
stream.
Program Stream
A program stream is one of two MPEG 2 mechanisms for combining an audio and a video elementary stream into
the same stream. In doing this, the program stream adds timing information for keeping the audio and video
synchronized. Program streams are designed for use in closed systems, where there is a very small chance of
errors occurring in the data stream.
89 Rev.
1.26