Skip to content

Implementations

Martijn van Beurden edited this page May 3, 2023 · 13 revisions

FLAC playback hard- and software

Operating systems with FLAC supporting libraries built-in

Name of library/SDK Operating system Remarks
Media Foundation Windows 10 and later, XBox Encoding and decoding, details
Core Audio MacOS 10.15+, iOS 13+, others Encoding and decoding, details
MediaPlayer
MediaCodec
MediaExtractor
MediaRecorder
ExoPlayer
Android Decoding since 3.1, encoding since 4.1, FLAC-in-MP4 since 10, details
libAudio SerenityOS Decoding only, open-source implementation (BSD), details

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 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 encoder implementations

Name Programming language License Container support Remarks Limitations
libFLAC C and C++ 3-clause BSD FLAC, OGG Reference implementation
  • Produces only fixed blocksize streams
  • Using rice escape code is implemented but disabled
libavcodec C LGPL FLAC, OGG, MKV, MP4 Based on libflake
  • Produces only fixed blocksize streams
  • Using rice escape code is not implemented
  • 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-Java Java GPL FLAC
  • Rather slow
FLACCL C# GPL FLAC Not a library, uses OpenCL acceleration Not yet checked

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
Klipspringer FLAC library libFLAC Java GPL
libflacjs libFLAC Javascript/WASM MIT
libsndfile libFLAC Julia MIT wraps libFLAC through libsndfile
audioread and audiowrite libFLAC 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

ICs or bare-metal capable FLAC decoder implementations

Name Remarks
libfoxenflac C library capable of running on bare-metal (no runtime necessary)
ESP8266Audio Library for ESP8266, ESP32 and RP2040 chips
VS1053 and VS1063 FLAC decoder IC. 1053 with software plugin, 1063 without modification

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