Audio Substream Headers

All substreams in private stream 1 begin with the substream number. The header described here immediately follows the substream number. This header is not part of either MPEG or the respective audio format standard. These are unique to DVD.

All methods

byte 0
byte 1
byte 2
76543210 76543210 76543210
FrmCnt
number of frames which begin in this packet
FirstAccUnit
offset to frame which corresponds to PTS value
offset 0 is the last byte of FirstAccUnit, ie add the offset of byte 2 to get the AU's offset
The value 0000 indicates there is no first access unit

AC3 specific

AC3 has no additional information which is DVD specific.

example

offsetvaluemeaning
01f80hAC3 substream number (audio stream 0)
02002this packet contains the beginning of 2 audio frames
0210001the frame corresponding to PTS begins at packet offset 023
0230B77AC3 frame begins here (0B77 = AC3 sync word)

Additional info

AC3 frames are 32ms in length, or 2880 ticks of the 90KHz clock. The resulting frame rate is 31.25 fps.
Description of AC3 frame headers

DTS specific

DTS has no additional information which is DVD specific.

example

offsetvaluemeaning
01f88hDTS substream number (audio stream 0)
02001this packet contains the beginning of 1 audio frame
0210001the frame corresponding to PTS begins at packet offset 023
0237FFE8001DTS frame begins here (7FFE8001 = DTS sync word)

Additional info

DTS frames are 10.67ms in length, or 960 ticks of the 90KHz clock. This is exactly one third the duration of an AC3 frame.
DTS frames are engineered to fit almost exactly into DVD sectors, therefore they do not span packets. Instead the PES header is padded by 3 or 4 bytes (following PTS).
Brief description of DTS frame headers

LPCM specific

byte 3
byte 4
byte 5
76543210 76543210 76543210
emphasis mute reserved FrmNum
modulo 20 frame number of first frame
Quantization
0 = 16bps, 1 = 20bps, 2 = 24bps, 3 = illegal
Sample rate
0 = 48Ksps
1 = 96Ksps
reserved
channels-1
Dynamic Range

example

offsetvaluemeaning
01fA0hLPCM substream number (audio stream 0)
02007this packet contains the beginning of 7 audio frames
0210004the frame corresponding to PTS begins at packet offset 026
02300emphasis off, mute off, frame 0
0240116-bit, 48K sample rate, stereo
02580hdynamic range 128 (neutral)
0260000first channel 0 (left) sample

Additional info

LPCM frames are 150 ticks of the 90KHz clock long (1.67ms), giving a frame rate of 600 fps.
Frame size in bytes = (sample rate)*(quantization)*(number of channels)/4800.
At 48K sample rate there are 48000/600 = 80 samples per frame. For 16-bit stereo this equals 320 bytes per frame.
see also LPCM limitations
DVD-Video info home Copyright © 2001 - 2024 MPUCoder, all rights reserved.