The Roberts Family

Internal structure of a FLAC audio file

The Internal Organisation of a FLAC File

These diagrams are my attempt to visualise the internal structure of a flac file based on what I have read on the flac documentation pages. Should you find that I have anything wrong, please contact me and I will happily correct it.


Overall Structure

This diagrams shows the overall structure of a FLAC file. It has four parts: a 4-byte header; a StreamInfo metadata block, a set of additional metadata blocks; and the actual audio data.

Overall structure diagram goes here.

Structure Of A Metadata Block

This has two parts: A 4-byte header and the metadata itself.

Metadata block diagram goes here.

Structure Of A Metadata Block Header

The header of the metadata block is split into two parts.

Block header diagram goes here.

Structure of the 'VORBIS_COMMENT' Metadata Block

Most of our work will take place in the VORBIS_COMMENT block as it is this that holds the data from our audio tags.

Comment block diagram goes here.

Structure of an Individual VORBIS Comment

Each audio tag (e.g. artist='Prince') is stored in one comment element. These are also known as 'vectors'. Here is the structure of each vector.

Diagram of a comment goes here.

I hope these diagrams help!