

I haven't specifically compared opus and m4a, though. So to finally answer your initial question, lossless formats all sound the same, but lossy formats sound different from each other and not as good as a lossless format, and yes, humans can tell the difference. Notice how the third segment (mp3) has all those empty spots at the top representing the higher end of the spectrum, and how the second segment (ogg vorbis) has those mostly filled in, but still looks a little different from the first segment (wav). I downloaded the file and used Audacity to generate the attached image. If you can't hear this, you can see it in a spectrogram. It sounds muted, because it is missing some of the higher frequencies. The ogg vorbis loses some details, but still sounds decent. To my ear, the wav sounds the best, as expected. Here is a comparison of a recording as a wav file, and then compressed to the same size with both mp3 and ogg vorbis.

The better a compression algorithm is, the better quality it can retain with the same file size, or the smaller a file size it can achieve with the same quality. Lossy compression algorithms try to only throw out details that humans are unlikely to miss, but there is a tradeoff between file size and quality. "Lossy" compression, as opposed to "lossless" compression, compresses the data in a way that not all of it can be recovered. We can get even smaller if we compromise a bit on quality.

flac is an an example of a "lossless" compression format, which means that although it compresses the data, it does so in a way that the original data can be exactly reconstructed, so the quality of a flac file is just as good as wav or aiff, but it is a smaller file.Ī flac is still pretty big, though. Nothing is going to sound better than a PCM format. They sound identical, because they store the exact same information. However, once the signal is converted to samples, the audio quality will stay the same as long as those samples are not modified. The quality of the audio depends on the quality of your sound card, the sample rate (44100 Hz is standard for CDs, but you can go higher), and the bit depth (basically how much we round the sample values). Your sound card converts the samples back to voltage levels, which your speakers convert back to air pressure, which your ears detect and perceive as sound. Your computer's sound card then checks the voltage 44100 times per second (assuming CD quality audio) and stores all those values. Your voice causes a fluctuation in air pressure, which the microphone converts into a fluctuation in voltage. For example, say you record yourself speaking into your computer's microphone. This consists of a sequence of samples representing the amplitude of the signal at different moments. The standard way to store audio information digitally is pulse-code modulation (PCM).
