MPEG elementary stream
An elementary stream as defined by the MPEG communication protocol is usually the output of an audio encoder or video encoder. ES contains only one kind of data. An elementary stream is often referred to as "elementary", "data", "audio", or "video" bitstreams or streams. The format of the elementary stream depends upon the codec or data carried in the stream, but will often carry a common header when packetized into a packetized elementary stream.
Header for MPEG-2 video elementary stream
General layout of MPEG-1 audio elementary stream
The digitized sound signal is divided up into blocks of 384 samples in Layer I and 1152 samples in Layers II and III. The sound sample block is encoded within an audio frame:- header
- error check
- audio data
- ancillary data
Field Name | # of bits | Description |
sync word | 12 | 0xFFF |
ID | 1 | '1'=mpeg1 '0'=mpeg2 |
layer | 2 | '11'=1 '10'=2 '01'=3 |
no protection | 1 | '0'=Protected by CRC '1'=Not Protected |
bit rate index | 4 | |
sampling frequency | 2 | kHz '00'=44.1 '01'=48 '10'=32 |
padding | 1 | |
private | 1 | |
mode | 2 | '00'=Stereo '01'=joint stereo '10'=dual channel '11'=single channel |
mode extension | 2 | |
copyright | 1 | 0=none 1=yes |
original or copy | 1 | 0=copy 1=original |
emphasis | 2 |
Although most of this information may be the same for all frames, MPEG decided to give each audio frame such a header in order to simplify synchronization and bitstream editing.