MPEG-1 Packetized Elementary Stream Headers

Depending on the Stream ID, a Packetized Elementary Stream (PES) header may contain various components.
Note: MPEG-1 PES headers are not used in DVD

The header

byte 0byte 1byte 2byte 3byte 4byte 5
0000 0000 0000 0000 0000 0001
Start code
Stream ID PES packet length
Stream ID's which pertain to DVD
Stream IDStream typeextension present?
1011 1101
0xBD
Private stream 1Yes
1011 1110
0xBE
Padding streamNo
1011 1111
0xBF
Private stream 2No
110x xxxx
0xC0 - 0xDF
MPEG-1 audio stream number x xxxxYes
1110 xxxx
0xE0 - 0xEF
MPEG-1 video stream number xxxxYes

The extension

The extension contains optional STD buffer size followed by optional PTS/DTS. If neither is present byte 6 contains 0x0f

STD buffer size field
byte 6
byte 7
76543210 76543210
01
P-STD buffer scale
0 = 128 bytes
1 = 1024 bytes
P-STD buffer size

PTS DTS field(s):
PTS only
76543210 76543210 76543210 76543210 76543210
0010
PTS 32..30
1
PTS 29..15
1
PTS 14..00
1

PTS and DTS
76543210 76543210 76543210 76543210 76543210
0011
PTS 32..30
1
PTS 29..15
1
PTS 14..00
1
0001
DTS 32..30
1
DTS 29..15
1
DTS 14..00
1
presentation and decoder time stamps use the 90KHz clock (SCR / 300)

The rest of the packet

Following all the extension data is the payload.
In the case of private streams the first byte of the payload is the sub-stream number.
DVD-Video info home Copyright © 2001 - 2024 MPUCoder, all rights reserved.