Skip to content

Implementations

Martijn van Beurden edited this page Aug 26, 2022 · 13 revisions

FLAC playback hard- and software

For a (non-exhaustive) list of playback hardware and software tested against this set of FLAC test files see this page at the Hydrogenaud.io wiki.

For of a list of web browsers capable of playing FLAC files, see caniuse.

FLAC decoding libraries

Name Programming language License Container support Remarks
libFLAC C and C++ 3-clause BSD FLAC, OGG Reference implementation
libavcodec C LGPL FLAC, OGG, MKV, MP4
dr_flac C public domain or MIT no attribution FLAC, OGG, MP4 Header-only library
libfoxenflac C GPL 2.0 FLAC Focus on low resource usage, embedded use
flac Go Unlicense FLAC
FLAC-library-Java Java GPL 3.0 FLAC
Claxon Rust Apache 2.0 FLAC, OGG, MP4 No seeking support
Symphonia Rust MPL 2.0 FLAC, OGG, MKV, MP4

FLAC encoding libraries

Name Programming language License Container support Remarks Limitations
libFLAC C and C++ 3-clause BSD FLAC, OGG Reference implementation
  • At most 24 bits per sample
  • Produces only fixed blocksize streams
  • Using rice escape code is implemented but disabled
  • Sample rate limited to 655350Hz
libavcodec C LGPL FLAC, OGG, MKV, MP4 Based on libflake
  • At most 24 bits per sample
  • Produces only fixed blocksize streams
  • Using rice escape code is not implemented
  • Sample rate limited to 655350Hz
  • Does not mix verbatim, fixed predictor and linear predictor subframes in a stream
libflake C LGPL FLAC First implementation of variable blocksize encoding, partly merged into libavcodec, development has stalled
  • At most 24 bits per sample
  • Using rice escape code is not implemented
  • Sample rate limited to 655350Hz
  • Does not mix verbatim, fixed predictor and linear predictor subframes in a stream

FLAC library wrappers and language bindings

This is a non-exhaustive list of wrappers available for libraries capable of decoding and/or encoding from/to FLAC.

Name Wraps Programming language License Remarks
libsndfile libFLAC C LGPL
avcpp libavcodec C++ LGPL or BSD
flac libFLAC Haskell 3-clause BSD
hsndfile libFLAC Haskell LGPL wraps libFLAC through libsndfile
ExoPlayer libFLAC Java (Android) Apache 2.0
libflacjs libFLAC Javascript/WASM MIT
libsndfile libFLAC Julia MIT wraps libFLAC through libsndfile
audioread and audiowrite Unknown MATLAB N/A
PyAV libavcodec Python 3-clause BSD
pyFLAC libFLAC Python Apache 2.0
pysndfile libFLAC Python LGPL wraps libFLAC through libsndfile
pyminiaudio dr_flac Python MIT decoding only
libvlc libFLAC or libavcodec C++, C#, Swift, Java, Python, Rust, Go LGPL

FLAC analysis tools

  • flac, tool usually bundled with libFLAC to encode from and decode to uncompressed file formats like WAV and AIFF. It also has an analysis mode to represent a FLAC file in human-readable form
  • metaflac, tool usually bundled with libFLAC to view and modify the file-level metadata of FLAC files
  • fq, tool to help analyse a FLAC file (among other file formats) by representing it in human-readable form
  • flac.tcl, tool that decodes a FLAC file with a very verbose human-readable analysis of it
Clone this wiki locally