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
|
|
| |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
number of frames which begin in this packet |
offset to frame which corresponds to PTS value offset 0 is the last byte of FirstAccUnit The value 0000 indicates there is no first access unit |
AC3 specific
AC3 has no additional information which is DVD specific.example
offset | value | meaning |
---|---|---|
01f | 80h | AC3 substream number (audio stream 0) |
020 | 02 | this packet contains the beginning of 2 audio frames |
021 | 0001 | the frame corresponding to PTS begins at packet offset 023 |
023 | 0B77 | AC3 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
offset | value | meaning |
---|---|---|
01f | 88h | DTS substream number (audio stream 0) |
020 | 01 | this packet contains the beginning of 1 audio frame |
021 | 0001 | the frame corresponding to PTS begins at packet offset 023 |
023 | 7FFE8001 | DTS 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
|
|
| |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
emphasis | mute | reserved | FrmNum modulo 20 frame number of first frame |
0 = 16bps, 1 = 20bps, 2 = 24bps, 3 = illegal |
0 = 48Ksps 1 = 96Ksps | reserved |
| Dynamic Range |
example
offset | value | meaning |
---|---|---|
01f | A0h | LPCM substream number (audio stream 0) |
020 | 07 | this packet contains the beginning of 7 audio frames |
021 | 0004 | the frame corresponding to PTS begins at packet offset 026 |
023 | 00 | emphasis off, mute off, frame 0 |
024 | 01 | 16-bit, 48K sample rate, stereo |
025 | 80h | dynamic range 128 (neutral) |
026 | 0000 | first 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.