FLAC
FLAC (abbreviation in English for Free Lossless Audio Codec, Free Lossless Audio Codec) is an audio codec that allows that digital audio is losslessly compressed in such a way that the size of the audio file is reduced without any loss of information. Digital audio compressed by the FLAC algorithm can typically be reduced to 50 to 60% of its original size, and decompressed into an identical copy of the original audio data.
FLAC is an open format with a royalty-free license and a reference implementation which is free software. FLAC has support for metadata tagging, including album art, and quick search.
FLAC cannot store floating point data and playback support on portable audio devices and high-quality audio systems is limited compared to lossy formats such as MP3 or uncompressed PCM, although within lossless formats FLAC is one of the best supported both by hardware and software, only equaled by ALAC, and surpassing the rest.
History
The project was started and developed by programmer Josh Colson. The bitstream format was frozen when FLAC entered beta with the release of version 0.5 of the reference implementation on January 15, 2001. version 1.0 was released on July 20, 2001.
On January 29, 2003, the Xiph.Org Foundation and the FLAC project announced the incorporation of this codec under the Xiph.org banner. Xiph.org is behind other free compression formats such as Icecast, Vorbis, Theora and Speex.
FLAC Version 1.3.0 was released on May 26, 2013. Development was moved to the Xiph.org repository.
The project
The FLAC project includes:
- The codec with which audio information should be encoded.
- The container format itself said.
- The libFLAC library, which allows to program compressors and players, also includes the metadata of the files.
- LibFLAC++.
- Flac, Allows to encode and decode FLAC streams through the command line using the libFLAC library.
- Metaflac, metadata editor for flac files through command line.
- Plugins for different audio players such as Winamp and Foobar2000, among others.
Comparisons
FLAC is designed to compress audio. As a result, the resulting files are reproducible and useful, as well as being smaller than if a statistical compression algorithm (such as ZIP) had been applied directly to the PCM file. Lossy algorithms can compress to more than 1/10 of the initial size, at the cost of discarding information; FLAC instead uses linear prediction to convert samples into series of small uncorrelated numbers (known as "residuals"), which are stored efficiently using Golomb-Rice encoding. In addition to this, to take advantage of silences, where numerical values present a lot of repetition, use encoding by "track length" (RLE "Run-Length Encoding") for identical samples.
RLE and RAE are concepts derived from the mechanical reading of registers, and correspond to readings with "Constant Linear Velocity" (CLV) that is used in magnetic tapes, and with "Constant Angular Velocity" (CAV) which is characteristic of the recording and playback of phonograph records. In CD players, one playback method or another can be selected, depending on the recording parameters. The most common is CAV, but CLV allows for greater linearity in registration; although it requires the help of servos to control the angular speed of the rotor, as the radius of the track is shortened.
FLAC has become one of the preferred formats for selling music over the Internet, as does Monkey's Audio which works just as well. It is also used in the exchange of songs over the network, as an alternative to MP3, when you want to obtain a greater reduction in size than in a WAV-PCM file, and not lose sound quality. It is also the ideal format for making backup copies of CDs, since it allows you to reproduce exactly the information on the original, and to recover it in case of problems with this material.
Design
FLAC does not support floating point samples, but fixed point samples. It supports any PCM resolution from 4 to 32 bits per sample and any sample rate from 1 to 655350 Hz, in 1 Hz increments, and any number of audio channels from 1 to 8.
Channels can be grouped in cases such as stereo and 5.1 surround channels to take advantage of correlations between channels and increase compression. FLAC uses cyclic redundancy checksums to identify corrupt data frames when used in an audio streaming protocol, and also has an MD5 hash of the raw PCM audio stored in the metadata header. STREAMINFO.
FLAC uses linear prediction to convert audio samples into a series of small uncorrelated numbers (known as residue numbers), which are stored efficiently using Golomb-Rice Encoding. It also uses RLE encoding for blocks of identical samples, such as silent moments in audio. For tagging FLAC files, it uses the same Vorbis comments system. The libFLAC API is organized into streams, search streams, and files, which are listed in increasing order of abstraction from the FLAC base bitstream. Most FLAC applications stick to encoding/decoding using libFLAC at the file level interface.
Compression Levels
The format library, libFLAC, uses a compression level parameter that ranges from 0 (fastest) to 8 (slowest). Compressed files are always a perfect, low-loss representation of the original data. Although the compression process involves a trade-off between speed and size, the decoding process is always quite fast and not very dependent on the compression level.
According to the WAV benchmark, using the higher rates above the -5 level, it takes considerably longer to encode with no real gains in space savings.
Option Compression | Original | Compressed | Duration | Reason | Time of Codification | Rate Codification | Time of Decoding | Rate Decoding |
---|---|---|---|---|---|---|---|---|
- 0 | 2.030 GiB | 1.435 GiB | 03:18:21 | 70.67% | 01:29 | 134x | 01:24 | 141x |
-5 | 2.030 GiB | 1.334 GiB | 03:18:21 | 65.72% (-4.95)% | 03:44 | 53x (2.5x slower) | 01:36 | 124x |
-6 | 2.030 GiB | 1.334 GiB | 03:18:21 | 65.71% (-4.96, -0.01)% | 03:51 | 52x (2.6x slower) | 01:36 | 124x |
-7 | 2.030 GiB | 1.333 GiB | 03:18:21 | 65.67% (-5, -0.04). | 07:47 | 25x (5.3x slower) | 01:36 | 123x |
-8 | 2,030 GiB | 1.329 GiB | 03:18:21 | 65.47% (-5,2, -0.2)% | 10:17 | 19x (7x slower) | 01:40 | 120x |
-8 -Ax2 | 2.030 GiB | 1.328 GiB | 03:18:21 | 65.40% (-5.27, -0.07)% | 16:39 | 12x (11x slower) | 01:35 | 125x |
Comparative table of functionalities
Usually one of the factors most taken into account when choosing this audio codec is the compression it provides; However, depending on what our final application is and if the means available to the user are considered, neither the fastest codec nor the one that compresses the most is convenient for us. This table shows that FLAC is a good option in many of the different cases in which a user can find himself; Here we compare the most outstanding features of this with those of other lossless audio codecs. The codecs analyzed are the following:
- WavPack
- Apple Lossless (ALAC)
- FLAC
- Monkey's Audio
- OptimFROG
- Shorten
Codec | Cod | Decod | Comp. | Flexible | Robustez error | Exp | Tagged | HW | SW | Hybrid C. Loss | Streaming | Code Open | Multichannel | High resolution | SO |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Wavpack | Very fast. | Very fast. | 58% | Okay. | Yes. | Yes. | ID3/APE | Limited | Okay. | Yes. | Yes. | Yes. | Yes. | Yes. | All |
ALAC | Medium | Hurry | 58.5% | Malo | No. | Yes. | QT tags | Okay. | Malo | No. | Yes. | Yes(descodif) | Yes. | Yes. | Win/MAC/iPad/iPhone |
FLAC | Hurry | Very fast. | 58.7% | Okay. | Yes. | Yes. | VorbisTag | Okay. | Okay. | No. | Yes. | Yes. | Yes. | Yes. | All |
Monkey's | Hurry | Medium | 55.5 per cent | Okay. | No. | Yes. | ID3/APE | Limited | Okay. | No. | No. | Yes. | No. | Yes. | All |
OptimFROG | Slow | Medium | 54.7% | Okay. | Yes. | Yes. | ID3/APE | No. | Little | Yes. | Yes. | No. | No. | Yes. | Win/Mac /Linux |
Shorten | Very fast. | Very fast. | 63.5% | Malo | No. | Yes. | No. | Limited | Okay. | No. | No. | Yes. | No. | No. | All |
- % Compression: the less the more it compresses.
- Coding and decod: speed required.
- HW and SW: support and compatibility in both fields(Hardware and Software)
- Exp: The content of the plot is explorable at sample level
File characteristics
FLAC files usually have this same extension (*.FLAC), although it is not uncommon to find them as *.FLA; They are perfectly reproducible with a large number of players, especially medium and high-end ones; even on old computers, since one of the features of the project is that the files are decrypted in easy mode. They also allow you to use the search function. These files are variable bit rate, since not all parts of the same audio track are equally compressible.
Another feature is that, like all lossless formats, the final compression ratio depends a lot on the musical style, the sonic variety (the presence of noise, typical of instruments like electric guitar or drums) adds "extra" information » to the sound spectrum in almost all frequencies-. For "cleaner" music, spectrally speaking, like most music for acoustic instruments and/or voice, ratios of about 1/2.2 are obtained; in other styles, such as dance or rock, with a generally more populated sound spectrum, the files can be from 2/3 to 4/5 of the original size in PCM format. Another very important factor is the existence of silences, since some tracks have several seconds at the beginning or end; in the case of many pieces of art music there are silences in various parts of the sound track.
Software Support
Hardware support
- Cowon Systems
- Western Digital TV HD Media Player
- Hermstedt Hifidelio
- I audition.
- Olive media servers (Symphony, Music, Opus)
- Rio Karma. Archived on 12 December 2007 at Wayback Machine.
- Squeezebox.
- Sansa Fuze.
- Sonos
- Meizu M6.
- Pixel Magic Systems' HD Mediabox (with a firmware superior to version 1.3.4)
- Embedded Waveplayer
- Teclast T29
- Trekstor Vibez.
- gemei x-750
- Samsung YP-U5
- TVIX HD M-6500
- TVIX HD N1 (cafe)
- TVIX HD M-6600A/N Plus
- TVIX HD M-7000
- Sony PSP (LightMP3 by Sakya)
Contenido relacionado
ARM architecture
Forth
Bmw