How is the FLAC format different from other digital audio codecs?

Since its inception, the digital audio industry has not experienced a particular lack of formats that were used to store and reproduce it. Of course, the average MP3 player is best known to the average user, but to this day it is being pressed by other, better and more modern codecs.

flac format
Currently, one of the most common among music lovers is the FLAC format. Its distinguishing feature is a special compression algorithm, in which almost no quality loss occurs.

Thus differing from the oldest and most widely used codecs, it does not remove any "extra" data from the audio stream, and therefore is perfect for especially demanding music lovers. Sound of this quality is ideal not only for playing on Hi-End class equipment, but also for creating your own personal music collection.

To this day, the FLAC format is supported by all computer programs for listening to music. However, every year more and more hardware solutions appear that allow the user to enjoy his magnificent sound.

flac format mp3
This codec includes Streaminfo metadata packets, frames, and four FLAC bytes. First there are bytes that act as the identifier of the entire stream, after which metadata is decoded, followed by the compressed sound itself. The metadata itself and the audio stream are constantly alternating among themselves. In addition, the incoming data stream is divided into blocks, after which they are independently encoded.

After encoding, they are compressed, they are "stacked" in frames. Even better, the FLAC format involves the use of blocks of different sizes, which allows you to maintain excellent sound quality.

It is not surprising that dividing sound into blocks is one of the most critical stages of coding. The size of each element is determined based on a number of characteristics of the starting material. If you decide to increase the number of such blocks during coding, then you get too many elements alternating with frames. Of course, in this case, the compression efficiency will be an order of magnitude lower.

However, when using too large a codec, it will also not be able to choose the optimal data compression model. It is believed that in most cases it is necessary to use from 2 to 6 thousand samples. It is necessary to establish the value of discretion at 44.1 kHz. So the FLAC format will be able to reach its full potential.

flac file format

Note that after selecting this indicator, the signal approximation will begin. This is exactly the result of this process that needs to be written with as few bits as possible. Professionals call it the โ€œremainder." In it, the parameters of the function itself, which was used for compression, should be encoded.

By the way, approximation can apply two of their types. When it becomes necessary to convert the FLAC format to MP3, the same encoded data is used, because otherwise you should not wait for a high quality output file.

Thus, this codec is one of the leaders in modern digital sound, as it can provide the highest quality of compressed music. Of course, the FLAC file format does not provide for the compact size of the resulting file, but it was not created for this.

Source: https://habr.com/ru/post/K20729/


All Articles