Lossy vs Lossless, Audio Quality


Free Download Mp4Gain
picture

Lossy vs Lossless, Audio Quality

Lossy vs Lossless
Lossy vs Lossless

Much is said and has been said about the difference between the formats that generate a loss of information (lossy) versus those that do not generate any loss (lossless).

Lossy vs Lossless
Lossy vs Lossless

What is Lossy?

To compress a file, so that it occupies less space on the disk, we must necessarily use two techniques, the first is pure compression, which does not lose quality and which we will explain later PLUS compression by discarding information.

It is omitting information that we know, after studies, that the human ear will hardly perceive. At least the average human ear.
Younger people listen to more frequencies than from the age of 30, when we listen to fewer frequencies.

But not only does age count, but other phenomena also enter, for example what is called masking and which could be summarized by saying that if two frequencies occur with similar frequencies, and one occurs an instant before the other, in general the second that masked… that is, it is not audible to the human ear, so we could discard it and save space.

There are also all the frequencies that the human ear does not perceive, there we have more information that we can discard without damaging the quality or at least maintaining a very similar quality of perception.

LossLess

There are other formats that do not lose quality because they only use mathematical methods to save space. Imagine the following line:

1111111000001110000000

This consumes a space, but this information could be summarized, for example as follows:

1(7)0(5)1(3)0(7)

This second way of storing information takes up much less space WITHOUT discarding anything. It simply explains that from the number 1 there are 7, followed by 5 zero numbers, then 3 from the number 1 and finally 7 zeros.

It’s the same, we just tried to save space by finding a compressed way to write it, but we didn’t rule anything out.

This is exactly how the zip and lossless music methods work.

Is there a difference in the human ear when listening to one and the other?
We will answer that in another article.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

About Lossy

About Lossy

Lossy

We all love good music. More recently, the audio CD was good digital music. This is 44100 Hz, stereo, 16 bits (linear) per channel, not compressed in any way, which means, according to Wikipedia, 1411.2 kbps.

Lossy

But at the end of the 20th century, in the era of the birth of multimedia, when music began to be played not only on players, but also on computers, it turned out that the audio CD (that is, naked PCM) is even better. . compress. There was, for example, Microsoft ADPCM, which compressed this case a bit, without losing quality, in WAV files. But generally speaking, the original 44 kHz stereo would still require a lot of space this way. Hence, the quality dropped to 22 kHz mono. One of the first multimedia albums of that time: “Immersion” from the group “Nautilus Pompilius”, is still around, and I did.

So MP3 won. To store and distribute compressed music. At 128 kbps “CD Quality”.

MP3 came up strangely. Technically, this is MPEG-1 Audio Layer 3. A layer for compressing audio data into a modern, progressive standard for storing video data on Video CDs. Just packed in its own .mp3 file format. The video CD is no longer interesting to anyone. The following MPEG-2 standard is used in DVD and digital television broadcasts (not HD). And the next MPEG-4 standard is now used for HD video and continues to evolve.

MP3 was revolutionary. It was (almost) the first lossy compression format. When we don’t try to preserve everything that was in the original signal, but, based on some psychoacoustic model, we cut out what a person is not going to hear anyway, and compress the rest. Like JPEG.

Then I tried digitizing the accumulated audio collection. Compact cassettes (just “cassettes”, but more correctly “compact cassettes”) turned out to be complete shit. The frequency range is such that it makes no sense to sample with more than 22 kHz. There were no reel-to-reel recorders in the house. But vinyl records shook the sound quality. With good equipment, you can draw better quality than a CD. You just need to get rid of the clicks.

And then I realized that MP3 is shit too. At these same 128 kbps, the sound quality suffers greatly. And the scariest thing is that vile metallic hues appear where they shouldn’t be. My ears need at least 192 kbps, and the more the better.

Let’s take a hint from a famous punk rock band in the past. Like FLAC. It is such a modern lossless compression standard that it has successfully replaced WAV. Because it is free.

The original is CD quality, so frequencies up to 22 kHz are present as expected.

Original flac

We are going to harvest with FFmpeg, or rather with LAME.

At 320 kbps and 256 kbps, the spectrogram looks almost like the original.

At 192 kbps, there are signs of a 16 kHz cutoff. The spectrogram “darkens”, apparently, the psychoacoustic model has cut something out. By ear, the higher frequency “bursts” really disappeared.

MP3 192 kbps

At the notorious 128 kbit / s, everything is already specifically cut off at 16 kHz. Background sounds are “fuzzy” and begin to bubble. Nothing to do with the original in terms of enjoying the musical details.

MP3 128 kbps

But you can do 64 kbps in MP3. The stereo is gone. Everything gurgles terribly and irritates with completely strange sounds.

In what format and with what quality is music heard on the radio?

In what format and with what quality is music heard on the radio?

Radio most used audio file formats

In fact, we can say that there are currently two main audio formats: lossy (compressed) and lossless (uncompressed). They are classified into many types.

Radio audio file formats

Lossy takes up less disk space, but degrades the quality of the audio track. When compressed using the MPEG protocol (hence the name mp3 – mp4 for files containing video sequences), the hues and transition tones, which are barely noticeable to the ear, are cut off. This makes the file clearer, but it also degrades it. The last place is occupied by the bit rate of that file: the degree of compression of each second of the audio track. The lower the bitrate, the less space the file will occupy and the worse the quality. Thus, a composition of three minutes in mp3 with a bit rate of 320 kilobits per second will occupy up to 3 megabytes on disk; a similar composition with a 96 kilobit bit rate will occupy about 400 kilobytes.

Lossless is as close to the original analog sound as possible *, making it much loved by sound engineers. Lossless formats take up much more disk space even compared to mp3-320. Among these formats, the most common are WAV (standard), FLAC (economic), AIFF (Apple). The former is used most often.

Professional sound recording is done only in uncompressed format. Only with him do sound engineers work.

On the radio, the situation is somewhat more complicated. This is due to the peculiarities of the work of the media, namely, efficiency and commercial profitability. The use of high-capacity servers is expensive and therefore most radio stations encode audio tracks in mp3 format at a bit rate of 256 kilobits per second. However, this is typical mainly of national stations. Equipment purchased from abroad has standard configurations that assume WAV encoding.

Why are software developers focusing on WAV? Because the radio signal cannot propagate without interference. Therefore, the listener still receives a small and sometimes significantly distorted signal. Therefore, broadcasters are faced with a reasonable question: what quality of sound will the listener perceive best: distorted ideal or distorted distortion? For this reason, in Europe and the United States, the WAV standard (AIFF, if the station operates with Apple equipment) is adopted, in Russia – mp3 with a bit rate of 256 kilobits per second.

Analog data transmission is based on the physical properties of sound. The record-playback mechanism is based on the principles of human auditory perception. That is, the sound wave vibrates the membrane (by analogy with the tympanic membrane of the ear) and is fixed with a needle in the carrier in the form in which it was obtained. Reproduced, therefore, also without deviations and changes associated with digital conversion.

The Audio Files category includes compressed and uncompressed audio formats that contain a data signal and can be played by audio programs. This category also includes MIDI files, music scores, and audio project files, which generally do not contain audio data.

The most common extensions are .WAV, .AIF, .MP3, and .MID.

Lossy audio compression

Lossy audio compression

MP3: Lossy compression

I’ll start with the well-known and widely used (though not always loved) MP3 format.

Lossy audio format

This audio format is actively used everywhere and everywhere, where it is needed and where it is not needed. But this does not mean that it is not worthy of the place it occupies in its niche. Very worthy. Although he has been “sitting” in his niche for about two decades, no one has “kicked” him out of there yet. And there were many who wanted to say it. And the main favorite of them is WMA (Windows Media Audio), which was conceived by Microsoft as an alternative to MP3. As a result, it is an alternative and it is, despite the best efforts of the developers. The next character is OGG. Despite the broader possibilities than MP3, for example, it never received widespread acceptance. Although it is compatible with many operating systems. Perhaps, it is worth mentioning the AAC audio format, which was supposed to replace MP3 in the relay. Encoding quality has been improved and compression loss reduced. But Ay.

The main advantage of these formats is their small size. The downside is the loss of quality.

Different formats
In today’s world, you can find a large number of different sound extensions. Let’s remember at a glance:

MP3 (Well where without it?)
WMA
OGG
CAA
And many others
Of course, each of these formats is good, especially MP3, which is probably the most popular format. But today we are not talking about popularity. MP3 and other similar formats, no matter how good they sound, are compressed originals. And even if you set the maximum quality to 320 btrate, it still won’t be of the highest quality. It was compressed, reduced, so there will be certain losses.

Lossless audio compression

Lossless audio compression

Lossless Audio compression

FLAC is perhaps the most popular lossless audio format and encoding codec. Music lovers are gradually switching to this format. WavPack competes with it, but it is not that popular. It’s the same story with Apple Lossless, which reduces the size to 60%.

Lossy file compression

The story here is: quality is better and size is bigger.

Skeptics say that it is almost impossible to distinguish MP3 (320 kbps) from Losless by ear. “And if there is no difference, why pay more?” In fact, on ordinary equipment, it is quite difficult to feel the difference in audio formats, even for music lovers. But there are those who immediately feel this difference (they personally attended the experiment). But when listening to a good device, the difference is huge. The problem is that not everyone can afford a good device.

In what format and with what quality is music heard on the radio?
In fact, we can say that there are currently two main audio formats: lossy (compressed) and lossless (uncompressed). They are classified into many types.

Lossy takes up less disk space, but degrades the quality of the audio track. When compressed using the MPEG protocol (hence the name mp3 – mp4 for files containing video sequences), the hues and transition tones, which are barely noticeable to the ear, are cut off. This makes the file clearer, but it also degrades it. The last place is occupied by the bit rate of that file: the degree of compression of each second of the audio track. The lower the bitrate, the less space the file will occupy and the worse the quality. Thus, a composition of three minutes in mp3 with a bit rate of 320 kilobits per second will occupy up to 3 megabytes on disk; a similar composition with a 96 kilobit bit rate will occupy about 400 kilobytes.

Lossless is as close to the original analog sound * as possible, making it much loved by sound engineers. Lossless formats take up much more disk space even compared to mp3-320. Among these formats, the most common are WAV (standard), FLAC (economic), AIFF (Apple). The former is used most often.

Professional sound recording is done only in uncompressed format. Only with him do the sound engineers work.

On the radio, the situation is somewhat more complicated. This is due to the peculiarities of the work of the media, namely efficiency and commercial profitability. The use of high-capacity servers is expensive and therefore most radio stations encode audio tracks in mp3 format at a bit rate of 256 kilobits per second. However, this is typical mainly of national stations. Equipment purchased from abroad has standard configurations that assume WAV encoding.

Why are software developers focusing on WAV? Because the radio signal cannot propagate without interference. Therefore, the listener still receives a small and sometimes significantly distorted signal. Therefore, broadcasters are faced with a reasonable question: what quality of sound will the listener perceive best: distorted ideal or distorted distortion? For this reason, in Europe and the United States, the WAV standard (AIFF, if the station operates with Apple equipment) is adopted, in Russia – mp3 with a bit rate of 256 kilobits per second.

Lossless audio compression explained

Lossless audio compression explained

LossLess Audio compression

FLAC is perhaps the most popular lossless audio format and encoding codec.

lossless audio compression

Music lovers are gradually switching to this format. WavPack competes with it, but it is not that popular. It’s the same story with Apple Lossless, which reduces the size to 60%.

Here the story is exactly the opposite: the quality is better and the size is greater.

Skeptics say that it is almost impossible to distinguish MP3 (320 kbps) from Losless by ear. “And if there is no difference, why pay more?” In fact, on ordinary equipment, it is quite difficult to feel the difference in audio formats, even for music lovers. But there are those who immediately feel this difference (they personally attended the experiment). But when listening to a good device, the difference is huge. The problem is that not everyone can afford a good device.

Compressed using special lossless audio codecs, it can be restored with absolute precision if desired.

If you take a normal audio CD disc with analog sound, record it in WAV format for uncompressed sound, then compress WAV using lossless codec, then decompress the resulting sound file into WAV and burn the result to a blank CD , you can get two completely identical audio files COMPACT DISCS.

The advantage of lossless for storing an audio collection is that the quality of the recordings is much higher than that of lossy codecs and they take up less space than uncompressed audio. It is true that lossy files are smaller than lossless music files. Most modern playback programs understand the lossless format. Programs that cannot play it can easily learn it using the lossless plugin. What are lossless audio formats?

Lossless audio formats
A true music lover is unlikely to be satisfied with the sound of music recorded in Ogg Vorbis or MP3 compression formats. Of course, if you listen to audio recordings on home audio equipment, sound defects cannot be heard with your ear, but if you try to play a compressed file on high-quality Hi-Fi equipment, you will immediately find the sound defects. . Of course, creating a collection of quality music on CD or vinyl is not easy. There is a reasonable alternative to this path for lovers of high-quality sound: lossless music. It can be stored on your PC in a way that allows you to keep the original music settings unchanged, even if compression is applied. In this way it simultaneously solves the problems of high-quality music and its compact storage, since audio equipment for listening (headphones, speakers, amplifiers) is quite affordable.

Uncompressed lossless audio formats:

CDDA is an audio CD standard;
WAV: Microsoft Wave;
IFF-8SVX;
IFF-16SV;
AIFF;
Compressed formats:

FLAC;
APE – Monkey’s Audio;
M4A – Apple Lossless – Apple’s high-quality music format;
WV – WavPack;
WMA: Windows Media Audio 9;
TTA – True Audio.
LPAC;
OFR – OptimFROG;
RKA-RKAU;
SHN – Shorten.
FLAC format
The most common format is the. It differs from lossy audio codecs in that no data is removed from the audio stream when it is used. This makes it possible to use it successfully to play music on Hi-Fi and Hi-End equipment, as well as to create an archive from a collection of audio recordings.

The great advantage of the format is its free distribution. This is important for musicians who record music on their own. The format has grown in popularity lately, thanks to which its support is included in the vast majority of multimedia players.

APE format
Unlike FLAC, for the APE format there are only codecs and plugins for the Windows platform. For other platforms, there are expensive third-party software solutions. The algorithm is capable of achieving lossless compression of the audio information between 1.5 and 2 times. It includes three main stages of encoding, of which only one is based on the use of inherent properties of sound for compression. The rest are similar to conventional filing cabinets. Despite the fact that the compression algorithm is distributed free of charge, the licensing restrictions are such that it is practically inaccessible for amateur musicians.

Apple Lossless Format
You can listen to high-quality lossless music using the audio compression codec without sacrificing Apple quality. This format was developed by Apple for use on its own devices. The format is compatible with iPods with special dock connectors and the latest firmware.

Lossy Audio File Types: How It Is Different From Lossless

Lossy Audio File Types: How It Is Different From Lossless

Lossy Compression vs Lossless Compression

Lossy is a word used in digital audio to describe the type of compression used to store audio data. The algorithm used in the lossy audio format compresses the audio data in such a way that it discards certain information. This loss of signal means that the encoded sound is not identical to the original.

lossy vs lossless

Lossy audio produces lower quality audio and has a smaller file size.

Lossy compression is also called irreversible compression because data that has been deleted is impossible to recover.

What is the difference between Lossy and Lossless?
When you create MP3 files by ripping one of your music CDs, some details of the original recording are lost, making it a lossy format. This type of compression isn’t just limited to audio; for example, JPEG image files are also lossy compressed.

Sheets of colored paper compressed into a ball

This method is the opposite of lossless audio compression used for formats like FLAC, ALAC, and others. In this case, the audio is compressed in such a way that the data is not deleted. The sound is identical to the original source.

Lossy archives take priority when it comes to compatibility. While lossless files are only supported by some devices and apps, a lossy audio format like MP3 will work on almost any device.

How Lossy Audio Compression Works
Lossy compression makes certain assumptions about frequencies that the human ear is unlikely to detect.

When a song is converted to a lossy audio format such as AAC, the algorithm analyzes all frequencies and then discards the frequencies that the ear should not be able to detect. These low frequencies are filtered or converted into mono signals that take up less disk space.

Another technique eliminates very quiet sounds that the listener is unlikely to notice, especially in the loudest part of the song. This approach reduces the size of the audio file while maintaining the highest possible audio quality.

What happens to the audio when it is compressed?
Lossy compression introduces artifacts. These artifacts are unwanted sounds that are not in the original recording but are a by-product of compression. This noise degrades sound quality and is noticeable when music files are converted using low bit rates.

Various types of artifacts affect the quality of the recording. Distortion is one of the most common artifacts. For example, distortion makes the drums feel weak, without any real beat. Song voices can also be affected, resulting in harsh vocals and lack of detail.

In many cases, casual listeners can’t tell the difference between lossy and lossless encoding, although some audiophiles using very expensive equipment claim to hear the difference. The difference in quality is only noticeable when very low data rates or aggressive compression algorithms come into play.

Why compress audio files?
Most digital audio formats use some form of compression to efficiently store sound. Without compression, the file sizes would be very large.

For example, a typical 3-minute song stored as an MP3 file is between 4MB and 5MB. Using the WAV format to store the same song, but without compression, results in a file size of approximately 30MB, at least six times that size. Fewer songs fit on your smartphone or hard drive when you choose uncompressed audio formats