Program Stream System Header

The Program Stream System Header contains a 12 byte fixed portion followed by any number of 3-byte stream_bound entries.

The fixed portion

byte 0byte 1byte 2byte 3byte 4byte 5
0000 0000 0000 0000 0000 0001 1011 1011
Start code (00 00 01 BB)
header length
byte 6
byte 7
byte 8
76543210 76543210 76543210
1
rate_bound
1
byte 9
byte 10
byte 11
76543210 76543210 76543210
audio_bound fixed_flag CSPS_flag system_audio_lock_flag system_video_lock_flag 1 video_bound packet_rate_restriction_flag reserved_byte
rate_bound 22-bit unsigned integer. Must be greater than or equal to (>=) the maximum value of the program_mux_rate coded in any pack of the program stream.
For DVD-Video this value should be 25200 decimal.
audio_bound 6-bit unsigned integer, ranging from 0 to 32 inclusive. Must be greater than or equal to (>=) the maximum number of audio streams in the program stream.
ISO 13818-1 states this should be the MPEG audio streams, but DVD-Video counts all audio streams.
For DVD-Video this should be the number of audio streams of any type, from 0 to 8 inclusive.
fixed_flag 1-bit boolean. If TRUE (1) the program stream is multiplexed at a fixed bitrate.
For DVD-Video this flag should be FALSE (0).
CSPS_flag 1-bit boolean. If TRUE (1) the program stream meets the requirements of a "Constrained System parameter Program Stream".
For DVD-Video this flag must be FALSE (0).
system_audio_lock_flag 1-bit boolean. TRUE (1) indicates that there is a specified constant rational relationship between the audio sampling rate and the system_clock_frequency (27MHz).
For DVD-Video this flag should be TRUE (1).
system_video_lock_flag 1-bit boolean. TRUE (1) indicates that there is a specified constant rational relationship between the video picture rate and the system_clock_frequency (27MHz).
For DVD-Video this flag should be TRUE (1).
The PAL/SECAM ratio is 1080000 system clocks (3600 90KHz clocks) per displayed picture.
The NTSC ratio is 900900 system clocks (3003 90KHz clocks) per displayed picture. This rate differs slightly from the nominal rate for NTSC, but is fixed, and consistent with ITU-601.
video_bound 5-bit unsigned integer, ranging from 0 to 16 inclusive. Must be greater than or equal to (>=) the maximum number of video streams in the program stream.
For DVD-Video this value will always be 1.
packet_rate_restriction_flag 1-bit boolean. If CSPS_flag is TRUE (1) this specifies which restraint is applicable to the packet rate, otherwise the flag has no meaning.
For DVD-Video this flag must be FALSE (0).
reserved_byte 7-bit reserved. Should always equal 111 1111.

Stream_bound entries

These follow immediately after the header. By definition the processing of the Program Stream System Header will continue so long as the most significant bit of the next available byte is set, regardless of the header length.
Each entry has the following.
byte 0
byte 1
byte 2
76543210 76543210 76543210
stream_id
11 P-STD_buffer_bound_scale P-STD_buffer_size_bound
stream_id 8-bit unsigned integer. Indicates to which stream the following buffer bound applies.
1011 1000 (0xB8) indicates all audio streams.
1011 1001 (0xB9) indicates all video streams.
Any other value must be greater than or equal to 1011 1100 (0xBC) and refers to the stream as defined for PES stream ID
P-STD_buffer_bound_scale 1-bit boolean. False (0) indicates the multiplier is 128, TRUE (1) indicates the multiplier is 1024.
Must be 0 for audio streams, 1 for video streams. May be 0 or 1 for other types.
P-STD_buffer_size_bound 13-bit unsigned integer. When multiplied by either 128 or 1024, as indicated by P-STD_buffer_bound_scale, defines a value that is greater than or equal to the maximum P-STD buffer size for all packets of the designated stream in the entire program stream.

Note: While the System header is flexible, for DVD-Video the length and content are fixed. There must be 4 stream_bound entries:

This means that the length field will contain 18 (6 fixed data bytes plus 12 bytes of stream_bound data).
DVD-Video info home Copyright © 2001 - 2024 MPUCoder, all rights reserved.