|
|
FLAC stands for Free Lossless Audio Codec. The FLAC project consists of:
- the stream format
- libFLAC, a library which implements reference encoders and decoders
- flac, a command-line wrapper around libFLAC to encode and decode .flac files
- input plugins for various music players (Winamp, XMMS, and more in the works)
"Free" means that the specification of the stream format is in the public domain (the FLAC project reserves the right to set the FLAC specification and certify compliance), and that neither the FLAC format nor any of the implemented encoding/decoding methods are covered by any patent. It also means that the source for libFLAC is available under the LGPL and the sources for flac and the plugins are available under the GPL.
FLAC compiles on many platforms: most Unixes (Linux, *BSD, Solaris, OS X), Windows, and OS/2. There are build systems for autoconf/automake, MSVC, Watcom C, and Project Builder.
What FLAC is:
-
FLAC is patent free. The FLAC format or encoding/decoding methods are not covered by any patents.
-
FLAC is lossless. The encoding of 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.
-
FLAC is designed to compress audio data. Technically, flac can "compress" other kinds of data losslessly (if you pass it in as a mono 8-bit raw file), but the output files tend to be bigger.
-
The compression capabilities of FLAC are extendable, meaning that new methods can be added to future versions of the format without breaking older streams or decoders.
-
The currently implemented compression methods in the reference encoder yield streams smaller than shorten. The encoding time is variable, but is generally between that of shorten, and that of, say, LAME. The most aggressive compression however can be quite slow. For more info see the comparison page.
-
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 hardare.
-
FLAC is suitable for archiving, since there is no information loss. You are not locked into the format since there is no generation loss if you decide 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 suitable for streaming. 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.
-
FLAC supports fast sample-accurate seeking. Not only is this useful for playback, it makes FLAC files suitable for use in editing applications.
-
FLAC has an extendable metadata system. New metadata blocks can be defined and implemented in future versions of FLAC without breaking older streams or decoders. Applications can write their own APPLICATION metadata once they register an ID. ID3 and ID3V2 tags may be attached to .flac files without disrupting the decoder.
Some things that follow from the features:
-
FLAC streams can be played back consecutively with no audible gaps in between, unlike say, MP3s (this is one of the minor goals). For example, you can encode a live album as individual tracks and still play them back seamlessly.
-
The sample-accurate seeking allows versatile playback: a sophisticated player could do index points, complex looping, or other structured playback. This could be useful in for say DJs, or practice sessions where you want to play along through specific passages.
-
Basically, you get the versatility of a WAV file in a compressed streamable format.
What FLAC is not:
-
Lossy. FLAC is intended for lossless compression only, as there are many good lossy formats already, such as MP3 (see LAME for an excellent open-source implementation), and Ogg Vorbis.
-
SDMI compliant, et cetera. There is no intention to support any methods of copy protection, which are, for all practical purposes, a complete waste of bits. (Another way to look at it is that since copy protection is futile, it really carries no information, so you might say FLAC already losslessly compresses all possible copy protection information down to zero bits!) Of course, we can't stop what some misguided person does with proprietary meta-data blocks, but then again, non-proprietary decoders will skip them anyway.
|
|
|