Format
The FLAC format is described in great detail in RFC 9639. That document also defines the mapping of FLAC in the Ogg and Matroska (mkv) containers, provides implementation guidance and contains examples walking through all decoding steps.
The old description of the FLAC format that used to be on this page for many years served as the basis for the RFC. While it lacks detail in certain places, requiring the reader to look for details in the libFLAC source code to fully understand it, it remains a useful overview and historical reference.
Additionally, there is a set of FLAC format conformance test files available to test whether a decoder has properly implemented all features of the FLAC format.
The old document used to be at this URL, so below is a mapping from the old anchors to the appropriate sections of the RFC. This preserves deep links to those anchors.
Acknowledgments
See section Acknowledgments of RFC 9639Scope
See section 1 of RFC 9639Architecture
See section 4 of RFC 9639Definitions
See section 3 of RFC 9639Blocking
See section 4.1 of RFC 9639Interchannel Decorrelation
See section 4.2 of RFC 9639Prediction
See section 4.3 of RFC 9639Residual Coding
See section 4.4 of RFC 9639Format
See section 5 of RFC 9639STREAMINFO
See section 8.2 of RFC 9639APPLICATION
See section 8.4 of RFC 9639PADDING
See section 8.3 of RFC 9639SEEKTABLE
See section 8.5 of RFC 9639VORBIS_COMMENT
See section 8.6 of RFC 9639CUESHEET
See section 8.7 of RFC 9639PICTURE
See section 8.8 of RFC 9639FLAC subset
See section 7 of RFC 9639STREAM
See section 8 of RFC 9639METADATA_BLOCK
See section 8.1 of RFC 9639METADATA_BLOCK_HEADER
See section 8.1 of RFC 9639METADATA_BLOCK_DATA
See section 8.1 of RFC 9639METADATA_BLOCK_STREAMINFO
See section 8.2 of RFC 9639METADATA_BLOCK_PADDING
See section 8.3 of RFC 9639METADATA_BLOCK_APPLICATION
See section 8.4 of RFC 9639METADATA_BLOCK_SEEKTABLE
See section 8.5 of RFC 9639SEEKPOINT
See section 8.5.1 of RFC 9639METADATA_BLOCK_VORBIS_COMMENT
See section 8.6 of RFC 9639METADATA_BLOCK_CUESHEET
See section 8.7 of RFC 9639CUESHEET_TRACK
See section 8.7.1 of RFC 9639CUESHEET_TRACK_INDEX
See section 8.7.1.1 of RFC 9639METADATA_BLOCK_PICTURE
See section 8.8 of RFC 9639FRAME
See section 9 of RFC 9639FRAME_HEADER
See section 9.1 of RFC 9639FRAME_FOOTER
See section 9.3 of RFC 9639SUBFRAME
See section 9.2 of RFC 9639SUBFRAME_HEADER
See section 9.2.1 of RFC 9639SUBFRAME_CONSTANT
See section 9.2.3 of RFC 9639SUBFRAME_FIXED
See section 9.2.5 of RFC 9639SUBFRAME_LPC
See section 9.2.6 of RFC 9639SUBFRAME_VERBATIM
See section 9.2.4 of RFC 9639RESIDUAL
See section 9.2.7 of RFC 9639RESIDUAL_CODING_METHOD_PARTITIONED_RICE
See section 9.2.7 of RFC 9639RICE_PARTITION
See section 9.2.7 of RFC 9639RESIDUAL_CODING_METHOD_PARTITIONED_RICE2
See section 9.2.7 of RFC 9639RICE2_PARTITION
See section 9.2.7 of RFC 9639Copyright (c) 2000-2009 Josh Coalson, 2011-2022 Xiph.Org Foundation