CUESHEET is block type 5. It stores a cue sheet: a list of tracks and their index points, by sample number. It can describe a Compact Disc exactly, so a rip stored as one FLAC file can still be split or burned track for track. Offsets on a CD fall on multiples of 588 samples, one CD sector of 1/75 of a second at 44,100 Hz.
Header
| Size | Field | Meaning |
|---|---|---|
| 128 bytes | Media catalogue number | ASCII, padded with zero bytes. For a CD it is the 13-digit UPC or EAN |
| 8 bytes | Lead-in samples | For CD-DA, the number of samples in the lead-in; otherwise 0 |
| 1 bit | CD-DA flag | 1 when the cue sheet is a Compact Disc’s |
| 2,071 bits | Reserved | Zero: 7 bits that finish the flag’s byte, then 258 bytes (7 + 258 × 8 bits, RFC 9639 section 8.7) |
| 1 byte | Track count | At least 1, because the lead-out counts; at most 100 for CD-DA |
With the flag bit, the reserved bits fill 259 bytes, so the whole header before the tracks is 128 + 8 + 259 + 1 = 396 bytes.
Tracks
Each track is 36 bytes, then its index points. The last track is the lead-out, which marks the end of the audio and has no index points.
| Size | Field | Meaning |
|---|---|---|
| 8 bytes | Offset | From the start of the stream, in samples |
| 1 byte | Track number | 0 is forbidden. CD-DA uses 1 to 99, and 170 for the lead-out; otherwise the lead-out is 255 |
| 12 bytes | ISRC | International Standard Recording Code in ASCII; all zeros means none |
| 1 bit | Type | 0 audio, 1 non-audio |
| 1 bit | Pre-emphasis | 1 when the track has pre-emphasis |
| 110 bits | Reserved | Zero |
| 1 byte | Index point count | 0 for the lead-out |
Index points
| Bytes | Field | Meaning |
|---|---|---|
| 8 | Offset | In samples, relative to the track’s own offset. For CD-DA, a multiple of 588 |
| 1 | Index number | Each one up by one from the last, starting at 0 or 1 |
| 3 | Reserved | Zero |
Rules
- The media catalogue number is printable ASCII,
20to7E. On a CD-DA cue sheet it is 13 digits followed by 115 zero bytes. - On a CD-DA cue sheet the lead-in is silent and at least two seconds long: 88,200 samples or more. The lead-in has a meaning only for CD-DA; otherwise it should be 0. It counts the samples up to the first index point of the first track, which is not necessarily index 01: even the first track may have an index 00.
- A track’s offset is that of its first index point. On a CD-DA cue sheet it differs from the offset in the disc’s table of contents, which is that of index 01 even when there is an index 00. It must be a multiple of 588 samples.
- The ISRC is a 12-character alphanumeric code; twelve zero bytes mean none.
- Track numbers should start at 1 and rise one at a time (a recommendation, not a requirement).
- Track numbers are unique within the cue sheet.
- The lead-out is the last track: 170 on a CD-DA cue sheet, 255 otherwise. It has no index points.
- Every other track has at least one index point, and on a CD-DA cue sheet at most 100.
- Within a track the first index point is number 0 or 1, and each one after is one more, so the numbers are unique.