From Hydrogenaudio Knowledgebase

Free Lossless Audio Codec (FLAC) is a codec for lossless audio compression. Grossly oversimplified, FLAC is similar to MP3, but lossless, meaning that audio is compressed in FLAC without any loss in quality. This is similar to how Zip works, except with FLAC you will get much better compression because it is designed specifically for audio, and you can play back compressed FLAC files in your favorite player (or your car or home stereo, if supported) just like you would a lossy file.

FLAC is supported by default in Android since version 3.1 and in Windows 10.

General aspects of the format [ edit ]

FLAC is freely available and supported on most operating systems, including Windows, UNIX (Linux, *BSD, Solaris, OS X, IRIX), BeOS, OS/2, and Amiga. There are build systems for autotools, MSVC, Watcom C, and Project Builder.

The FLAC project consists of:

the stream format

reference encoders and decoders in library form

flac, a command-line program to encode and decode FLAC files

metaflac, a command-line metadata editor for FLAC files

input plugins for various music players

When it's said that FLAC is free, it means more than just that it is available at no cost. It means that the specification of the format is fully open to the public to be used for any purpose, although the FLAC project reserves the right to set the FLAC specification and certify compliance. It also means that neither the FLAC format nor any of the implemented encoding/decoding methods are covered by any known patent. And it means that all the source code is available under open-source licenses. It is the first truly open and free lossless audio format.

Features [ edit ]

Lossless: The encoding of audio (PCM) data incurs no loss of information, and the decoded audio is bit-for-bit identical to what went into the encoder. Each frame contains a 16-bit CRC of the frame data for detecting transmission errors. The integrity of the audio data is further insured by storing an MD5 signature of the original unencoded audio data in the file header, which can be compared against later during decoding or testing.

The encoding of audio (PCM) data incurs no loss of information, and the decoded audio is bit-for-bit identical to what went into the encoder. Each frame contains a 16-bit CRC of the frame data for detecting transmission errors. The integrity of the audio data is further insured by storing an MD5 signature of the original unencoded audio data in the file header, which can be compared against later during decoding or testing. Fast: FLAC is asymmetric in favor of decode speed. Decoding requires only integer arithmetic, and is much less compute-intensive than for most perceptual codecs. Real-time decode performance is easily achievable on even modest hardware.

FLAC is asymmetric in favor of decode speed. Decoding requires only integer arithmetic, and is much less compute-intensive than for most perceptual codecs. Real-time decode performance is easily achievable on even modest hardware. Hardware support: Because of FLAC's free reference implementation, low decoding complexity and popularity, FLAC has relatively widespread hardware support compared to other lossless formats.

Because of FLAC's free reference implementation, low decoding complexity and popularity, FLAC has relatively widespread hardware support compared to other lossless formats. Streamable: Each FLAC frame contains enough data to decode that frame. FLAC does not even rely on previous or following frames. FLAC uses sync codes and CRCs (similar to MPEG and other formats), which, along with framing, allow decoders to pick up in the middle of a stream with a minimum of delay.

Each FLAC frame contains enough data to decode that frame. FLAC does not even rely on previous or following frames. FLAC uses sync codes and CRCs (similar to MPEG and other formats), which, along with framing, allow decoders to pick up in the middle of a stream with a minimum of delay. Seekable: FLAC supports fast sample-accurate seeking. Not only is this useful for playback, it makes FLAC files suitable for use in editing applications.

FLAC supports fast sample-accurate seeking. Not only is this useful for playback, it makes FLAC files suitable for use in editing applications. Flexible metadata: New metadata blocks can be defined and implemented in future versions of FLAC without breaking older streams or decoders. Currently there are metadata types for tags, cue sheets, and seek tables. Applications can write their own APPLICATION metadata once they register an ID.

New metadata blocks can be defined and implemented in future versions of FLAC without breaking older streams or decoders. Currently there are metadata types for tags, cue sheets, and seek tables. Applications can write their own APPLICATION metadata once they register an ID. Suitable for archiving: FLAC is an open format, and there is no generation loss if you need to convert your data to another format in the future. In addition to the frame CRCs and MD5 signature, FLAC has a verify option that decodes the encoded stream in parallel with the encoding process and compares the result to the original, aborting with an error if there is a mismatch.

FLAC is an open format, and there is no generation loss if you need to convert your data to another format in the future. In addition to the frame CRCs and MD5 signature, FLAC has a verify option that decodes the encoded stream in parallel with the encoding process and compares the result to the original, aborting with an error if there is a mismatch. Convenient CD archiving: FLAC has a cue sheet metadata block for storing a CD table of contents and all track and index points. For instance, you can rip a CD to a single file, then import the CD's extracted cue sheet while encoding to yield a single file representation of the entire CD. If your original CD is damaged, the cue sheet can be exported later in order to burn an exact copy.

FLAC has a metadata block for storing a CD table of contents and all track and index points. For instance, you can rip a CD to a single file, then import the CD's extracted cue sheet while encoding to yield a single file representation of the entire CD. If your original CD is damaged, the cue sheet can be exported later in order to burn an exact copy. Error resistant: Because of FLAC's framing, stream errors limit the damage to the frame in which the error occurred, typically a small fraction of a second worth of data. Contrast this with some other lossless codecs, in which a single error destroys the remainder of the stream.

Pros [ edit ]

Portable to many systems

Open source and freely licensed

Hardware support (PhatBox, Kenwood MusicKeg, Rio Karma, etc. See below)

Streaming support

Extremely fast decoding

Supports multichannel and high resolution streams

Supports ReplayGain

Supports cue-sheet (with some limitations)

Gaining wide use as successor to Shorten

Cons [ edit ]

Compresses less efficiently than other popular modern compressors (Monkey's Audio, OptimFROG)

Higher compression modes slow, for little gain over the default setting.

Hardware and software that support FLAC [ edit ]

For a more comprehensive list see the FLAC links page.

Hardware [ edit ]

Car stereo [ edit ]

Home stereo [ edit ]

Olive's Symphony wireless digital music center

Numark's DJ equipment (HDX and CDX turntables, HDMIX mixer)

Sonos Digital Music System

Slim Devices' Squeezebox networked audio players

Portable [ edit ]

Software [ edit ]

Players Software [ edit ]

Windows foobar2000 MediaMonkey MusicBee Winamp AIMP VLC XMPlay MPlayer Console player



Mac Cog VLC VOX



Linux Clementine MPlayer MythTV VLC XMMS



Frontends (Windows) [ edit ]

foobar2000 Music Converter / Audio Player

FLAC frontend (ktf)

Windows Frontend (by Speek)

Frontends (Mac) [ edit ]

Converters [ edit ]

for a more comprehensive list here dBpowerAMP Music Converter / Audio Player / CD Writer MediaMonkey Music Manager / Audio Player / CD Writer fre:ac Music Converter / CD Writer/Ripper foobar2000 Music Converter / Audio Player



Editors [ edit ]

List of popular audio editors Audacity Adobe Audition GoldWave



CD writers/rippers [ edit ]

Taggers [ edit ]

for a comprehensive list of tag editors [here] Mp3tag - Universal Tag Editor TagScanner - "The Ultimate Tag Editor" foobar2000 MediaMonkey - Tagger / Music manager (Including multiple and linked album art support) The GodFather - Tagger / Music manager Tag - for Mac OS X 10.4 (Tiger) Case's Tag - Command line tagger metaflac - for general metadata (including Vorbis comments) maintenance



mkvtoolnix - tool to multiplex FLAC streams inside the Matroska container

metaflac - for general metadata (including Vorbis comments) maintenance, also to calculate ReplayGain values for FLAC files lacking such

Frequently asked questions [ edit ]

Question: Does the compression level affect decompression speed?

Short Answer: No.

Long Answer: In truth, the compression level does affect the decompression speed, but the difference between the various compress levels can barely be measured and is too small to be noticed, even on low-end machines.



Question: What is the best compression level for encoding my music?

Short Answer: The default setting, 5.

Long Answer: Encoding at the default setting will give the best balance between compression and encoding speed. Encoding at 8 can more than quadruple the encoding time, while having an insignificant effect on compression.

See also [ edit ]