ACIDCAT . FILE FORMAT REFERENCE

FLAC Anatomy

Free Lossless Audionative stream
rev 2026.06
magic "fLaC"
endian big *
container metadata blocks
lossless yes

A FLAC is the fLaC marker, a run of metadata blocks, then audio frames. Each block opens with a 4-byte header: a last-block flag, a 7-bit type, and a 24-bit length. STREAMINFO is first and required. Hover a field to light its bits or bytes, click a + for its table. Color marks kind (see the key). * the one trap: FLAC is big-endian everywhere except the VORBIS_COMMENT block, whose lengths are little-endian.

block regions

Walked in order until the block whose last-block flag is set; the audio frames begin right after.

fLaC0x00 . 4 bytes
magic"fLaC" (0x66 4C 61 43)
STREAMINFOtype 0 . first . drawn below

Sample rate, channels, bit depth, total samples, and an MD5 of the unencoded audio. Must be the first block. See the byte map below.

VORBIS_COMMENTtype 4 . the metadata
lengthsLITTLE-endian here, unlike the rest of FLAC
vendore.g. "reference libFLAC 1.3.2"
commentsUTF-8 "FIELD=value": TITLE, ARTIST, BPM, KEY
PICTUREtype 6 . cover art
fieldspicture type, MIME, description, w/h/depth, data
noteAPIC-like, but adds w/h/depth/colors and length-prefixes its strings
CUESHEETtype 5 . tracks + indices
prefix396 bytes: 128-byte catalog number, u64 lead-in, is-CD flag (top bit of byte 136), reserved, u8 num_tracks
tracks36 bytes each: u64 offset, u8 number, 12-byte ISRC, type + pre-emphasis bits, u8 index count
indices12 bytes each after their track: u64 offset, u8 number, 3 reserved
lead-outlast track, number 170 (CD-DA) or 255
SEEKTABLE / PADDING / APPLICATIONtypes 3 / 1 / 2
SEEKTABLE18-byte seek points (0xFFFF.. = placeholder)
PADDINGzeroed slack for later in-place edits
APPLICATION4-byte app id + opaque data
audio framesafter the last block

Encoded audio. Opaque for metadata; STREAMINFO already gives duration = total_samples / sample_rate.

metadata block header

4 bytes before every block. Example: a final VORBIS_COMMENT block, 304 bytes long.

STREAMINFO body

34 bytes. Example: 44100 Hz, 2 channels, 16-bit, 88200 samples.