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.
Walked in order until the block whose last-block flag is set; the audio frames begin right after.
Sample rate, channels, bit depth, total samples, and an MD5 of the unencoded audio. Must be the first block. See the byte map below.
Everything in FLAC is big-endian except the inside of this block.
A length and a string. There is no key table and no type -- the key is text before an equals sign.
Opaque for metadata -- STREAMINFO already gives duration = total_samples / sample_rate -- but each frame opens with its own header:
4 bytes before every block. Example: a final VORBIS_COMMENT block, 304 bytes long.
34 bytes. Example: 44100 Hz, 2 channels, 16-bit, 88200 samples.