Free Lossless Audio Codec: Difference between revisions

From Hydrogenaudio Knowledgebase
mNo edit summary
Line 9: Line 9:
| website = http://flac.sourceforge.net/
| website = http://flac.sourceforge.net/
}}
}}
'''FLAC''' stands for Free Lossless Audio Codec. 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 an MP3 file.
'''Free Lossless Audio Codec''' ('''FLAC''') is a codec for lossless audiocompression.
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 an MP3 file.


==General aspects of the format==
== General aspects of the format ==
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.
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.


Line 26: Line 27:
FLAC files also can be placed inside an Ogg container using libOggFLAC and libOggFLAC++.  
FLAC files also can be placed inside an Ogg container using libOggFLAC and libOggFLAC++.  


==Features==
== Features ==
* '''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.
* '''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.
* '''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.
* '''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.
Line 37: Line 38:
* '''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.
* '''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==
== Pros ==
* Portable to many systems
* Portable to many systems
* Source open and freely licenced
* Source open and freely licenced
Line 44: Line 45:
* Extremely fast decoding
* Extremely fast decoding
* Supports multichannel and high resolution streams
* Supports multichannel and high resolution streams
* Supports [[ReplayGain]]
* Supports [[Replay Gain]]
* Supports cue-sheet (with some limitations)
* Supports cue-sheet (with some limitations)
* Gaining wide use as successor to [[Shorten]]
* Gaining wide use as successor to [[Shorten]]


==Cons==
== Cons ==
* Compresses less efficiently than other popular modern compressors ([[Monkey's Audio]], [[OptimFROG]])
* Compresses less efficiently than other popular modern compressors ([[Monkey's Audio]], [[OptimFROG]])
* Higher compression modes slow, for little gain over the default setting.
* Higher compression modes slow, for little gain over the default setting.


==Hardware and software that support FLAC==
== Hardware and software that support FLAC ==
For a more comprehensive list see the [http://flac.sourceforge.net/links.html FLAC links page].
For a more comprehensive list see the [http://flac.sourceforge.net/links.html FLAC links page].


===Hardware===
=== Hardware ===
====Home stereo====
==== Home stereo ====
* [http://www.request.com/us/ AudioReQuest] music servers
* [http://www.request.com/us/ AudioReQuest] music servers
* [http://www.avegasystems.com/ Avega Systems]' wireless [http://www.avegasystems.com/_documents/Oyster_Specifications.pdf Oyster] loudspeakers
* [http://www.avegasystems.com/ Avega Systems]' wireless [http://www.avegasystems.com/_documents/Oyster_Specifications.pdf Oyster] loudspeakers
Line 76: Line 77:
* Ziova's [http://www.ziova.com/cs510.php CS510] and [http://www.ziova.com/cs505.php CS505] network media players
* Ziova's [http://www.ziova.com/cs510.php CS510] and [http://www.ziova.com/cs505.php CS505] network media players


====Car stereo====
==== Car stereo ====
* [http://www.phatnoise.com/products/digitalmediaplayers/kenwood_music_keg.php Kenwood Music Keg]
* [http://www.phatnoise.com/products/digitalmediaplayers/kenwood_music_keg.php Kenwood Music Keg]
* [http://www.phatnoise.com/products/digitalmediaplayers/index.php PhatBox]
* [http://www.phatnoise.com/products/digitalmediaplayers/index.php PhatBox]


====Portable====
==== Portable ====
* [[Apple iPod]] with [[Rockbox]] firmware
* [[Apple iPod]] with [[Rockbox]] firmware
* Bluedot's [http://www.digitalworldtokyo.com/2006/07/bluedot_pmp_runs_linux_loves.php BMP-1430]
* Bluedot's [http://www.digitalworldtokyo.com/2006/07/bluedot_pmp_runs_linux_loves.php BMP-1430]
Line 90: Line 91:
* TrekStor's [http://www.trekstor.de/en/products/detail_mp3.php?pid=66 Vibez]
* TrekStor's [http://www.trekstor.de/en/products/detail_mp3.php?pid=66 Vibez]


===Software===
=== Software ===
====Players====
==== Players ====
* [http://koti.welho.com/hylinen/apollo/ Apollo]
* [http://koti.welho.com/hylinen/apollo/ Apollo]
* [http://cogosx.sourceforge.net Cog] — for Mac OS X
* [http://cogosx.sourceforge.net Cog] — for Mac OS X
Line 109: Line 110:
* [http://www.un4seen.com/ XMplay]
* [http://www.un4seen.com/ XMplay]


====Frontends (Windows)====
==== Frontends (Windows) ====
* [http://www.uninformative.com/flacattack/ Flacattack]
* [http://www.uninformative.com/flacattack/ Flacattack]
* Custom [http://members.home.nl/w.speek/flac.htm Windows Frontend] (by Speek)
* Custom [http://members.home.nl/w.speek/flac.htm Windows Frontend] (by Speek)
Line 116: Line 117:
* [http://www.webearce.com.ar/ MAREO] by Kwambis
* [http://www.webearce.com.ar/ MAREO] by Kwambis


====Frontends (Mac)====
==== Frontends (Mac) ====
* [http://www.danrules.com/macflac/ MacFLAC]
* [http://www.danrules.com/macflac/ MacFLAC]
* [http://www.sbooth.org/Max/ Max]
* [http://www.sbooth.org/Max/ Max]
Line 122: Line 123:
* [http://www.versiontracker.com/dyn/moreinfo/macosx/21952 xACT]
* [http://www.versiontracker.com/dyn/moreinfo/macosx/21952 xACT]


====Converters====
==== Converters ====
* [http://www.dbpoweramp.com/ dBpowerAMP] Music Converter / Audio Player / CD Writer
* [http://www.dbpoweramp.com/ dBpowerAMP] Music Converter / Audio Player / CD Writer
* [http://www.mediamonkey.com/ MediaMonkey] Music Manager / Audio Player / CD Writer
* [http://www.mediamonkey.com/ MediaMonkey] Music Manager / Audio Player / CD Writer
* [http://www.germanixsoft.de/ GX:Transcoder] Music converter
* [http://www.germanixsoft.de/ GX:Transcoder] Music converter


====Editors====
==== Editors ====
* [[Adobe Audition]]
* [[Adobe Audition]]


====CD writers/rippers====
==== CD writers/rippers ====
* [http://www.ahead.de Ahead Nero Burning Rom]
* [http://www.ahead.de Ahead Nero Burning Rom]
* [http://arson.sourceforge.net/ Arson]
* [http://arson.sourceforge.net/ Arson]
Line 139: Line 140:
* [http://www.cdwave.com/ CD Wave]
* [http://www.cdwave.com/ CD Wave]


====Taggers====
==== Taggers ====
* [http://www.saunalahti.fi/cse/files/Tag.zip Case's Tag] command line tagger
* [http://www.saunalahti.fi/cse/files/Tag.zip Case's Tag] command line tagger
* [http://users.otenet.gr/~jtcliper/tgf/ The GodFather] Tagger / Music manager
* [http://users.otenet.gr/~jtcliper/tgf/ The GodFather] Tagger / Music manager
Line 146: Line 147:
* [http://flac.sourceforge.net/documentation.html#metaflac metaflac] - for general metadata (including Vorbis comments) maintenance
* [http://flac.sourceforge.net/documentation.html#metaflac metaflac] - for general metadata (including Vorbis comments) maintenance


====Other tools====
==== Other tools ====
* [http://www.burrrn.net/mrq/ Mr. QuestionMan]
* [http://www.burrrn.net/mrq/ Mr. QuestionMan]
* [http://www.bitattack.ro/ai/ Audio Identifier]
* [http://www.bitattack.ro/ai/ Audio Identifier]
* [http://www.bunkus.org/videotools/mkvtoolnix/ mkvtoolnix] - tool to multiplex FLAC streams inside the Matroska container
* [http://www.bunkus.org/videotools/mkvtoolnix/ mkvtoolnix] - tool to multiplex FLAC streams inside the Matroska container
* [http://flac.sourceforge.net/documentation.html#metaflac metaflac] - for general metadata (including Vorbis comments) maintenance, also to calculate [[replaygain]] values for FLAC files lacking such
* [http://flac.sourceforge.net/documentation.html#metaflac metaflac] - for general metadata (including Vorbis comments) maintenance, also to calculate [[Replay Gain]] values for FLAC files lacking such
 


...and many more; see the [http://flac.sourceforge.net/links.html#software FLAC software section] and [http://flac.sourceforge.net/download.html#extras download section] for a more comprehensive list.
...and many more; see the [http://flac.sourceforge.net/links.html#software FLAC software section] and [http://flac.sourceforge.net/download.html#extras download section] for a more comprehensive list.


==Frequently asked questions==
== Frequently asked questions ==
''Question:'' Does the compression level affect decompression speed?
''Question:'' Does the compression level affect decompression speed?


Line 169: Line 169:
''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.
''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==
== See also ==
* [[Lossless]]
* [[Lossless]]
* [[Lossless Comparison]]
* [[Lossless Comparison]]


==Externals links==
== Externals links ==
* [http://flac.sourceforge.net FLAC website]
* [http://flac.sourceforge.net FLAC website]
* [http://flac.sourceforge.net/download.html FLAC download]
* [http://flac.sourceforge.net/download.html FLAC download]

Revision as of 15:06, 13 June 2007

Free Lossless Audio Codec (FLAC) is a codec for lossless audiocompression. 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 an MP3 file.

General aspects of the format

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 we say 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 (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 known patent. It also means that all the source code is available under open-source licenses. It is the first truly open and free lossless audio format.

Some claim FLAC is the most widely used lossless compression format on UNIX systems (though it seems more likely that shn retains that honor on all OS platforms). FLAC files also can be placed inside an Ogg container using libOggFLAC and libOggFLAC++.

Features

  • 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.
  • 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.
  • Hardware support: Because of FLAC's free reference implementation and low decoding complexity, FLAC is currently the only lossless codec that has any kind of hardware support.
  • 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.
  • Seekable: 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.
  • 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.
  • 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.
  • 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

  • Portable to many systems
  • Source open and freely licenced
  • Hardware support (PhatBox, Kenwood MusicKeg, Rio Karma, etc. See below)
  • Streaming support
  • Extremely fast decoding
  • Supports multichannel and high resolution streams
  • Supports Replay Gain
  • Supports cue-sheet (with some limitations)
  • Gaining wide use as successor to Shorten

Cons

  • 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

For a more comprehensive list see the FLAC links page.

Hardware

Home stereo

Car stereo

Portable

Software

Players

Frontends (Windows)

Frontends (Mac)

Converters

Editors

CD writers/rippers

Taggers

  • Case's Tag command line tagger
  • The GodFather Tagger / Music manager
  • Mp3tag Universal Tag Editor
  • Tag — for Mac OS X 10.4 (Tiger)
  • metaflac - for general metadata (including Vorbis comments) maintenance

Other tools

...and many more; see the FLAC software section and download section for a more comprehensive list.

Frequently asked questions

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

Externals links