Documentation

    Table of Content
    • 3D File Formats
      • 3D File Formats
      • 3D2
      • 3DS
      • 3MF
      • AMF
      • ASE
      • DAE
      • DRC
      • E57
      • FBX
      • GLB
      • GLTF
      • IPT
      • JRXML
      • JT
      • MA
      • MB
      • OBJ
      • PLY
      • PRC
      • RVM
      • STEP
      • U3D
      • USD
      • USDZ
      • VRML
      • X
      • X3D
    • Audio File Formats
      • Audio File Formats
      • AAC
      • AC3
      • ALAC
      • FLAC
      • M3U
      • MID
      • MKA
      • MP3
      • MPC
      • OGG
      • OPUS
      • RA
      • SDT
      • STAP
      • WAV
      • WMA
    • CAD File Formats
      • CAD File Formats
      • CF2
      • DC3
      • DGN
      • DWF
      • DWFX
      • DWG
      • DWT
      • DXF
      • HPGL
      • IFC
      • IGES
      • IGS
      • JVSG
      • NWC
      • NWD
      • NWF
      • PAT
      • PHJ
      • PLT
      • PSM
      • PSS
      • RVT
      • STL
    • Compression File Formats
      • Compression File Formats
      • 7Z
      • ARC
      • ARJ
      • B6Z
      • BZ2
      • DAA
      • DAR
      • DEB
      • GZ
      • ICE
      • KGB
      • LBR
      • LZ4
      • LZMA
      • MPKG
      • OAR
      • PKG
      • RAR
      • RPM
      • RTE
      • TAR
      • TBZ
      • TGS
      • XAPK
      • XAR
      • ZIM
      • ZIP
      • ZL
    • Database
      • Database File Formats
      • ACCDB
      • ACCDE
      • ACCDT
      • ACCFT
      • BAK
      • BCP
      • DDL
      • DTSX
      • LDF
      • MDB
      • MDF
      • MYI
      • NDF
      • NSF
      • SQL
      • SQLITE
    • EBook File Formats
      • EBook File Formats
      • ACSM
      • AEP
      • APNX
      • AVA
      • AZW
      • AZW1
      • AZW3
      • AZW4
      • BKK
      • BPNUEB
      • CBC
      • CBR
      • CBZ
      • CEB
      • CEBX
      • DNL
      • EA
      • EAL
      • EBK
      • EDN
      • EPUB
      • ETD
      • FB2
      • FKB
      • HAN
      • HTML0
      • HTMLZ
      • HTXT
      • HTZ4
      • HTZ5
      • IBOOKS
      • KFX
      • KOOB
      • LIT
      • LRF
      • LRS
      • LRX
      • MART
      • MBP
      • MOBI
      • NCX
      • NVA
      • OEB
      • OEBZIP
      • OPF
      • ORB
      • PDB
      • PHL
      • PML
      • PMLZ
      • POBI
      • QMK
      • RB
      • RZB
      • RZS
      • SNB
      • TCR
      • TK3
      • TPZ
      • TR
      • TR3
      • VBK
      • WEBZ
      • YBK
    • Email File Formats
      • Email File Formats
      • EDB
      • EML
      • EMLX
      • ICS
      • MBOX
      • MSG
      • OFT
      • OLM
      • OST
      • PST
      • TNEF
      • VCF - Virtual Contact File
    • Font
      • Font File Formats
      • CFF
      • CFF2
      • EOT
      • FNT
      • FON
      • JFPROJ
      • OTF
      • PFA
      • PFB
      • PFM
      • SFD
      • TTC
      • TTF
      • Type1
      • WOFF
    • GIS File Formats
      • GIS File Formats
      • 000
      • E00
      • FileGDB
      • GeoJSON
      • GML
      • GPX
      • KML
      • KMZ
      • OSM
      • QGD
      • QGS
      • QGZ
      • QLR
      • QML
      • SHP
    • Image File Formats
      • Image File Formats
      • AI
      • APNG
      • AVIF
      • BMP
      • BPG
      • CDR
      • CMX
      • CPC
      • DCM
      • DIB
      • DICOM
      • DJVU
      • DNG
      • EMF
      • EMZ
      • EXIF
      • FLIF
      • FODG
      • GBR
      • GIF
      • HEIC
      • HEIF
      • ICO
      • J2C
      • J2K
      • JFIF
      • JP2
      • JPEG
      • JPF
      • JPM
      • JPX
      • JXR
      • MNG
      • ODG
      • OTG
      • PNG
      • PSB
      • PSD
      • SVGZ
      • TGA
      • TIFF
      • VDX
      • VSD
      • VSDM
      • VSDX
      • VSS
      • VSSM
      • VSSX
      • VST
      • VSTM
      • VSTX
      • VSX
      • VTX
      • WEBP
      • WMF
      • WMZ
      • XPM
    • Note Taking File Formats
      • Note Taking File Formats
      • ONE
      • ONETOC2
    • Page Description Language
      • Page Description Language
      • CGM
      • EPS
      • OXPS
      • PCL
      • PS
      • SVG
      • SWF
      • TEX
      • XPS
      • XSLFO
    • PDF
      • PDF
      • PDF/A
      • PDF/E
      • PDF/UA
      • PDF/VT
      • PDF/X
    • Presentation File Formats
      • Presentation File Formats
      • ODP
      • OTP
      • POT
      • POTM
      • POTX
      • PPS
      • PPSM
      • PPSX
      • PPT
      • PPTM
      • PPTX
    • Programming
      • Programming
      • C
      • Class
      • CPP
      • CS
      • CSPROJ
      • Dart
      • H
      • JAR
      • Java
      • JSP
      • JSPF
      • KT
      • MEL
      • MF
      • PHP
      • PY
      • SH
      • SLN
      • SWIFT
      • TOML
      • VB
      • VBPROJ
      • VCXPROJ
      • YAML
    • Project Management File Formats
      • Project Management File Formats
      • MPP
      • MPT
      • MPX
      • XER
      • XML
    • Spreadsheet File Formats
      • Spreadsheet File Formats
      • CSV
      • DIF
      • FODS
      • NUMBERS
      • NUMBERS-TEF
      • ODS
      • OTS
      • SXC
      • TSV
      • XLA
      • XLAM
      • XLM
      • XLS
      • XLSB
      • XLSM
      • XLSX
      • XLT
      • XLTM
      • XLTX
    • Video File Formats
      • Video File Formats
      • 3G2
      • 3GP
      • AMV
      • ASF
      • AVCHD
      • AVI
      • F4V
      • FLV
      • H264
      • H265
      • M4V
      • MJPEG
      • MK3D
      • MKS
      • MKV
      • MOV
      • MP4
      • MPG
      • MXF
      • QT
      • RM
      • RMVB
      • RV
      • SRT
      • VOB
      • VP6
      • VP8
      • VP9
      • WEBM
      • WMV
      • Xvid
    • Web File Formats
      • Web File Formats
      • ASP
      • ASPX
      • CHM
      • CSS
      • HTM
      • HTML
      • IXBRL
      • JS
      • JSON
      • MHT
      • MHTML
      • Sass
      • SCSS
      • VDW
      • XAML
      • XBRL
      • XHTML
      • XOML
      • XSLT
    • Word Processing File Formats
      • Word Processing File Formats
      • ABA
      • DOC
      • DOCM
      • DOCX
      • DOT
      • DOTM
      • DOTX
      • MD
      • ODT
      • OTT
      • RTF
      • TXT
      • WPS
    • Reporting
      • RDL
      • RDLC
      • RPL
    1. Home
    2. Audio File Formats
    3. FLAC

    What's on this Page

      • What is a FLAC file?
      • Brief History
      • Composition of FLAC Project
      • FLAC Design
        • Source Encoder
        • Metadata
        • Compression
      • FLAC Format
      • How to Open FLAC Files
      • References

    What is a FLAC file?

    FLAC(Free Lossless Audio Codec) is a lossless compression audio coding format developed by Xiph.Org Foundation. FLAC is a royalty-free open format that is saved with the .flac extension. Digital audio compressed using the FLAC algorithm is typically reduced to 50 to 70 percent in size. FLAC files can be decompressed to an identical copy of the original audio files.

    Brief History

    Josh Coalson began the development of FLAC in 2000. The first version of FLAC was released on 20 July 2001. FLAC was incorporated under the Xiph.Org flag on 20 January 2003. The development of FLAC was moved to the Xiph.Org git repository with the release of version 1.3.0 on 26 March 2013.

    Composition of FLAC Project

    The FLAC project consists of the following:

    • Stream formats.
    • Simple container format for the stream(FLAC).
    • libFLAC: A library of reference encoders, decoders, and metadata interface.
    • libFLAC++: An object-oriented wrapper for libFLAC.
    • flac: A command-line program to encode and decode FLAC streams.
    • metaflac: A command-line metadata editor for FLAC.
    • Input plugins for music players like Winamp, XMMX, etc.
    • Ogg container format (Ogg FLAC).

    FLAC Design

    Depending on the density and amplitude of the music, the size of the compressed file can be 80% less than the original file.

    Source Encoder

    • It only supports integer samples and not floating-point. It can handle PCM bit resolution from 4 to 32 bits per sample and sampling rate from 1Hz to 65,535 Hz. FLAC encoding is limited to 24 bits per sample.
    • Channels can be grouped to take advantage of interchannel correlations to increase compression.
    • CRC checksums are used to identify corrupted frames.
    • For conversion of audio samples, FLAC uses linear prediction.

    Metadata

    • FLAC supports ReplayGain(used to perceive and normalize loudness in audio).
    • FLAC uses the same system used in Vorbis comments for tagging.
    • libFLAC is used by most FLAC application for encoding/decoding.
    • libFLAC API is organized into streams, seekable streams, and files to increase abstraction from base FLAC bitstream.

    Compression

    libFLAC uses compression levels from 0 to 8 where 0 is the fastest and 8 is the slowest compression level. The compressed files are always lossless although the tradeoff is between speed and size.

    FLAC Format

    This is an overview of the FLAC bitstream.

    • fLaC marker: This marker is added to the beginning of the stream. It is followed by one or more metadata blocks.
    • Metadata Blocks: 128 kinds of metadata blocks are supported by FLAC; currently the following are defined.
      • STREAMINFO: Contains the information about the whole stream.
      • APPLICATION: This is used by third-party applications for identification.
      • PADDING: It is used to reserve space for metadata if the metadata will be edited after encoding. When the metadata is edited, the padding is replaced by the actual metadata.
      • SEEKTABLE: An optional table to store seek points.
      • VORBIS_COMMENT: Used to store human-readable key/value pairs.
      • CUESHEET: Used to store cue sheet information.
      • PICTURE: Used to store pictures.
    • FRAME: The audio data is composed of one or more audio frames.
      • FRAME_HEADER: Contains the basic information about the stream.
      • SUBFRAME: To decrease the complexity, individual subframes are coded separately within a frame (one frame per channel).
      • FRAME_FOOTER: Contains the CRC of the complete frame.

    How to Open FLAC Files

    FLAC files can be opened using the following applications:

    • VLC media player
    • Microsoft Windows Media Player
    • jetAudio
    • GoldWave
    • VUPlayer

    References

    • FLAC - Wikipedia
    • FLAC

    See Also

    • Xvid File Format
    • RA File Format
    • KT File Format
    • RV File Format
    • ALAC - Apple Lossless Audio Codec File Format