## DTS Frame Header

This is just a quick and partial reference to the frame header of a DTS stream. There is no intention to fully explain DTS, for that you should obtain the official documentation.

The part of the header of most interest to DVD is the first 10 bytes

byte 0 | byte 1 | byte 2 | byte 3
--- | --- | --- | ---
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Sync - 7F FE 80 01

byte 4 | byte 5 | byte 6 | byte 7 | byte 8 | byte 9
--- | --- | --- | --- | --- | ---
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
ftype | short | cpf | nblks | fsize | amode | sfreq | rate | mix | dynf | timef | auxf | hdcd

ftype | indicates the frame type, 1 = normal, 0 = termination.
short | the number of core samples by which a termination frame falls short of the normal length of 32 samples. For a normal frame the value must be 31.
cpf | A flag that indicates if a CRC is present if TRUE (1). This will be FALSE for DVD.
nblks | The number less 1 of sample blocks. This will always be 15 for DVD. This means each frame is 16*32 (512) samples. At a sampling rate of 48K this translates to 10 and 2/3 milliseconds, or 960 ticks of the 90KHz clock.
fsize | The size less 1 of the frame in bytes. For DVD this will be 1005 (0x3ED) for 768 Kbps streams or 2012 (0x7DC) for 1536 Kbps streams.

amode - Audio Channel Arrangement
value | channels | arrangement
--- | --- | ---
00 | 1 | A
01 | 2 | A + B (dual mono)
02 | 2 | L + R (stereo)
03 | 2 | (L+R) + (L-R) (sum and difference)
04 | 2 | LT + RT (left and right total)
05 | 3 | C + L + R
06 | 3 | L + R + S
07 | 4 | C + L + R + S
08 | 4 | L + R + SL + SR
09 | 5 | C + L + R + SL + SR
0A | 6 | CL + CR + L + R + SL + SR
0B | 6 | C + L + R + LR + RR + OV
0C | 6 | CF + CR + LF + RF + LR + RR
0D | 7 | CL + C + CR + L + R + SL + SR
0E | 8 | CL + CR + L + R + SL1 + SL2 + SR1 + SR2
0F | 8 | CL + C + CR + L + R + SL + S + SR
10-3F |  | user defined
| sfreq - audio sampling rate
value | sampling rate
--- | ---
0 | invalid
1 | 8 KHz
2 | 16 KHz
3 | 32 KHz
4 | invalid
5 | invalid
6 | 11025 Hz
7 | 22050 Hz
8 | 44100 Hz
9 | invalid
A | invalid
B | 12 KHz
C | 24 KHz
D | 48 KHz
E | invalid
F | invalid

rate | This is a coded value for the targeted bitrate of the encoded stream. For DVD only 2 values are possible: 0F - targeted rate is 768 Kbps, actual rate is 754.5 Kbps 18 - targeted rate is 1536 Kbps, actual rate is 1509.75 Kbps

DVD-Video info home | Copyright © 2001 - 2020 STN Software, all rights reserved.