Tech Class] Chapter 57: All About Audio Codecs

in technology •  6 years ago 

Mi Community1539956285519.png

c2bcd13ebe.png
Hi, Mi Fans!
Once again, welcome back to the Mi Community Tech Class Session. In the previous chapter, we dealt with Android TV and in today's chapter, we will be learning more about Audio Codecs and why do they matter.

What are Codecs?
A codec, which stands for coder-decoder is a device or program that compresses data for transmission and decompresses the received data. ie, large files can be compressed for faster transmission and later decompress it. In the case of audio, codecs affect your listening experience, whether you're using headphones, earbuds or Bluetooth speakers.
aHR0cDovL21lZGlhLmJlc3RvZm1pY3JvLmNvbS9YL1AvNjg4MDkzL29yaWdpbmFsL0NvbnZlcnRfYXVk.jpg

Types of Audio Quality
In order to understand the types of codecs used in your audio gadget and what they can do, you’ll need to understand the various types of audio quality. There are lossless (compressed), lossy (compressed) and uncompressed audio qualities.

Lossy audio: This is a compression technique that does not decompress audio files to their original data amount. Lossy methods provide high degrees of digital compression, which results in smaller files. In these cases, some sound waves are removed, which affects the quality of sound in an audio file. Lossy compression is not recommended in professional settings where high quality is necessary. Still, this is the most common format used by consumers.
Eg: MP3, AAC

Lossless audio: This is a compression technique that decompresses audio files back to their original data amount. Lossless methods can provide high degrees of digital compression, but there is no loss in size or sound quality. Lossless compression is ideal in professional audio settings where complete files are needed. Lossless compression music formats include FLAC, ALAC and WMA Lossless.

Uncompressed audio: This is an audio file that has no compression applied to it. The sound in uncompressed audio files remains the same as when it was recorded. There is no compression, no loss of data, and subsequently a very large file that takes up a lot of space. Examples include PCM, AIFF and WAV formats.

How does it Work?
Not all MP3s are created equal; depending on the bitrate and other factors, an MP3 can sound nearly indiscernible from the original WAV file, or as flat and lifeless as a wet newspaper. Not surprisingly, there’s a direct trade-off between file size and fidelity.Briefly, here’s how MP3 (and most other compression schemes) work.
The process employs a combination of digital technology and the science of aural perception (psychoacoustics) to remove data bits from the original digital file that are considered to be essentially inaudible. These bits can include frequencies beyond the normal threshold of human hearing, sounds that are masked by other sounds. The point of contention with this whole concept is just how much of that data is truly inaudible. While some bits can be removed with little consequence, much of what gets stripped away can subtly affect our perception of how things sound. While moderately compressed files can deliver near-CD quality sound, too much compression can remove elusive qualities that can make a difference to how we perceive music on a subconscious level.

What is being traded off?
04_audiodata_ipod.jpg

With any compression, some audio quality loss is inevitable. The audio resolution and sonic quality of an MP3 is determined by the bitrate at which it’s encoded. The higher the bitrate, the more data per second of music. As you’d expect, a higher bitrate creates better quality audio, along with a larger file. Generally speaking, 128 kbps (kilobits per second) is considered the bitrate at which an MP3 begins to exhibit artifacts of data compression. Not coincidently, it’s also the rate many websites use for downloads, since it offers a smaller file size with relatively minimal loss. Rates below 128 kbps are usually not recommended for anything other than spoken word recordings. Bitrates of 192 kbps, 256 kbps, or higher preserve most of the original sonic information, making them a better bet for music you care about.

Audio codec formats
FLAC
FLAC, or Free Lossless Audio Codec, delivers CD-quality audio in a file size smaller than an actual CD. It''s also a nonproprietary, open-source codec that's great for software developers who want to use lossless audio. Though FLAC files are easily accessible, they can be six times larger than MP3 files, so they take longer to download. This format is not compatible with all devices and software, but it sounds great over Bluetooth and streaming.

WAV
WAV, or Waveform Audio Format, is an uncompressed audio format that's great to use if you want to get the original recorded material without losing sound quality. WAV files are ideal for shorter sound bites because their uncompressed form means they're large files, making them difficult to stream. This is especially true in cases with limited bandwidth. The audio in these files is crisp, and the sound is good over Bluetooth.

MP3
MP3, or Moving Picture Experts Group Layer-3 Audio, is one of the most popular audio codecs. MP3 files use lossy compression, which compacts audio drastically. In some cases, MP3 files can be 10 times smaller than WAV files. This compression method is versatile and works on nearly all playback devices. Although MP3s are major space savers, the bit rate at which they're recorded affects the sound quality. For example, MP3s encoded at 128kbps don't sound as great as those encoded at 320kbps, but listeners need to determine whether they prefer sound over storage. MP3s have been used for streaming in the past, but with higher-res streaming becoming more popular, they're not the only option out there.

AAC
AAC, or Advanced Audio Coding, is another lossy codec that provides small audio files and works great for online streaming. AAC files aren't helpful if you need a near-replica of the original recording, because bits are discarded. But it sounds perfectly fine otherwise. The compressed file size is ideal for mobile devices.

WMA
WMA, or Windows Media Audio, is available in lossy and lossless WMA formats, which gives listeners some choice. Generally, WMA files are smaller than their uncompressed counterparts, and similar in functionality to MP3s and FLAC files. Though WMA offers versatility, it's not compatible with all devices, especially Apple devices. It's possible to stream audio in WMA format, but i major streaming providers do not use it. Fortunately, for the average listener, this format sounds good over Bluetooth. Only critical ears would hear a difference in quality.

ALAC
ALAC, or Apple Lossless Audio Codec, sounds identical to original recorded audio, but it's compressed to a smaller size without discarding bits. ALAC works primarily with Apple products, which makes the format a bit limited for folks without iOS devices. It also takes a longer time to download than lossy formats do, but it sounds great over Bluetooth. It's possible to stream with ALAC, but this codec isn't commonly used because of its incompatibility with non-Apple devices.

Ogg Vorbis
Ogg Vorbis is an open-source and patent-free audio codec that's great for streaming over the internet without compromising speed. Ogg Vorbis provides impressive sound at lower bit rates than other lossy formats. The only downside of Ogg Vorbis is that it compresses audio and discards data for smaller file sizes. However, it transfers audio quickly and sounds fine over Bluetooth. Because the average music lover doesn't use this format to compress audio, you won't find many compatible devices.

Conclusion
Since there are so many of them, codecs can be difficult to understand. But the basic is compression for better fidelity. Various compression technologies are available now which helps in better quality audio even after compression. ie, the loss of sound quality is very minimum. When it comes to buying audio equipment, it's far more helpful to know which format will meet all of your audio encoding and playback needs.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://www.tomsguide.com/us/what-are-audio-codecs,review-4469.html