The Role of Audio Codecs in Digital Music


Free Download Mp4Gain
picture

The Role of Audio Codecs in Digital Music

Audio Codecs
Audio Codecs
Audio Codecs
Audio Codecs

How do audio codecs impact the quality of digital music?

Audio codecs play a crucial role in the world of digital music, shaping the quality and efficiency of audio compression and decompression. A codec, short for coding-decoding, is a software or hardware algorithm that compresses audio data for storage or transmission and decompresses it for playback. The choice of audio codec directly influences the fidelity, file size, and compatibility of digital music.

One popular audio codec is the Advanced Audio Coding (AAC), known for its ability to deliver high-quality sound while maintaining a smaller file size compared to other codecs. With its efficient compression algorithm, AAC is widely used in various digital music platforms, ensuring a balance between audio quality and storage space.

The Importance of Lossy and Lossless Audio Codecs

When it comes to audio codecs, there are two main categories: lossy and lossless. Lossy codecs, such as MP3 and AAC, achieve compression by discarding some audio data that is considered less perceptible to the human ear. This compression technique reduces file sizes significantly but results in a slight loss of audio quality. On the other hand, lossless codecs, like FLAC and ALAC, compress audio data without sacrificing any quality, resulting in larger file sizes.

Striking the Balance between Quality and File Size

Choosing the right audio codec involves finding a balance between audio quality and file size. For portable music players or streaming services, where storage and bandwidth are limited, a lossy codec like MP3 or AAC is commonly used. These codecs allow for more music to be stored or streamed within a smaller file size, making them ideal for on-the-go listening.

However, for audiophiles or professionals seeking uncompromised audio quality, lossless codecs like FLAC or ALAC are the preferred choice. These codecs preserve the original audio fidelity, ensuring a more immersive and detailed listening experience. With advancements in technology and storage capacity, lossless codecs are gaining popularity among music enthusiasts who prioritize audio quality above all else.

The Impact of Audio Codecs on Digital Music Streaming

With the rise of digital music streaming platforms, audio codecs have become even more significant in delivering high-quality audio over the internet. These platforms employ various codecs to ensure efficient transmission and playback of music to millions of listeners worldwide.

One commonly used audio codec in music streaming is Ogg Vorbis, known for its open-source nature and efficient compression. Ogg Vorbis provides a good balance between audio quality and file size, making it suitable for online streaming where bandwidth limitations exist. Its widespread adoption across streaming platforms ensures consistent audio quality while optimizing network resources.

Adaptive Streaming and Codecs

Adaptive streaming is another technique employed by music streaming services to optimize audio quality based on the listener’s network conditions. By dynamically adjusting the bitrate and codec during playback, adaptive streaming ensures a seamless listening experience even in fluctuating network conditions.

For example, the Opus codec is often used in adaptive streaming due to its versatility and low-latency characteristics. Opus provides excellent audio quality while adapting to varying network conditions, ensuring uninterrupted playback without sacrificing audio fidelity.

Final Words

Understanding the role of audio codecs in digital music is essential for both music enthusiasts and industry professionals. The choice of codec influences the quality, file size, and compatibility of digital music, whether it’s for portable devices, streaming services, or high-fidelity listening experiences.

As technology continues to advance, audio codecs will evolve, offering new possibilities for delivering immersive and high-quality digital music. Whether you prefer the convenience of lossy codecs or the uncompromised audio quality of lossless codecs, the right choice of audio codec will ensure an enjoyable and satisfying music listening journey.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Understanding Audio Codecs: MP3, AAC, and Ogg Vorbis

Understanding Audio Codecs: MP3, AAC, and Ogg Vorbis

Audio Codecs
Audio Codecs
Audio Codecs
Audio Codecs

AIntroduction

In this article, I will delve into the world of audio codecs, specifically focusing on the popular formats: MP3, AAC, and Ogg Vorbis. As an audio enthusiast myself, I have encountered various challenges when it comes to choosing the right codec for my audio files. Through personal experiences and research, I aim to provide you with a comprehensive understanding of these codecs, their differences, and their unique features.

MP3: The Pioneer of Audio Compression

When it comes to audio codecs, MP3 is undoubtedly the most recognizable name. It revolutionized the way we consume music by allowing us to store and transmit audio files with significantly reduced file sizes. MP3 achieved this by using a perceptual coding technique that removes sounds that are less likely to be perceived by the human ear. This compression method made it possible to store a vast music library on our portable devices. As one of the most widely supported audio codecs, MP3 continues to dominate the digital audio landscape.

AAC: Advancing Audio Quality

While MP3 paved the way for audio compression, AAC (Advanced Audio Coding) took it a step further by improving audio quality at lower bitrates. Developed as the successor to MP3, AAC offers better sound fidelity, especially in the higher frequency range. It achieves this through more sophisticated compression algorithms that preserve more of the original audio data. With its widespread adoption, AAC has become the codec of choice for various applications, including streaming services and mobile devices.

Ogg Vorbis: Open Source Audio Compression

If you’re looking for a codec that combines high-quality audio and open-source principles, Ogg Vorbis is worth considering. Developed as an alternative to proprietary codecs, Ogg Vorbis offers impressive audio quality while maintaining a smaller file size compared to formats like MP3. Being an open-source format, it allows for continuous improvement and community-driven development. Ogg Vorbis is highly versatile and compatible with a wide range of software and devices.

“The beauty of audio codecs lies in their ability to compress large audio files without significant quality loss, enabling us to enjoy our favorite music on the go.” – John, an avid music listener.

Understanding audio codecs, such as MP3, AAC, and Ogg Vorbis, is crucial in the world of digital audio. Each codec brings its own advantages and considerations, depending on your specific needs and preferences. Whether you prioritize compatibility, audio quality, or open-source principles, there’s a codec that suits you. As you explore the vast realm of audio codecs, remember that mp4gain.com provides an all-in-one solution for normalizing and converting audio and video files. It’s a reliable tool that ensures your audio files maintain optimal quality across different devices and platforms.
These audio codecs have revolutionized the way we listen to and share music. With a deeper understanding of MP3, AAC, and Ogg Vorbis, you can make informed decisions when it comes to encoding and decoding audio files.

Final Words:
Audio codecs are the backbone of the digital audio landscape. Whether you’re an audiophile or a casual listener, the codecs you choose can greatly impact your listening experience. By exploring the intricacies of MP3, AAC, and Ogg Vorbis, you can unlock new possibilities for enjoying high-quality audio.

What are Audio Codecs and which one is the best to achieve the best sound quality?

What are Audio Codecs and which one is the best to achieve the best sound quality?

Audio Codecs
Audio Codecs

Today, digital audio is an essential part of enjoying a satisfying listening experience. With the increase in the production of audio and video content, the storage of audio and video files becomes more and more important. That is why audio codecs, audio file compression standards, have emerged as a necessity for the current trend. These codecs allow the transmission and storage of audio and video files without the need to use a huge amount of disk space.

Audio Codecs
Audio Codecs

What are Audio Codecs?

Audio codecs refer to software designed to compress and decompress digital audio files. This means that the files are compressed reducing the file size without losing sound quality. This compression becomes possible thanks to codec technology. Compressing audio files can save space on your device’s memory, allowing faster and more reliable streaming.

Advantages of Audio Codecs

There are many reasons why audio codecs are so powerful and popular. Audio codecs offer a number of advantages, such as:

  • Allows audio files to be stored in a compact format for more efficient use of disk space.
  • Enables fast and reliable communication between devices, as compressed file sizes are much smaller than uncompressed files.
  • Enables better audio quality without using a large amount of disk space. Audio codecs can compress audio files to a much smaller size without sacrificing sound quality.
  • It works with a wide variety of formats, such as MP3, WAV, AAC, etc., allowing files to be transmitted over the web, making it easy to distribute digital audio content over the Internet.</ li>
  • Enables greater compatibility between devices for storing and playing audio content. This means that users can play the audio files on any device as long as the device has support for the audio codecs.

What Are The Most Used Audio Codecs?

There are several types of audio codecs available for commercial use. The most common codecs are:

  • MP3 – MP3 is the most popular audio format today. It is one of the oldest formats and has become a standard for the transmission and storage of digital audio content. MP3 has been used for all kinds of digital audio content, from songs to podcasts. MP3 offers acceptable audio quality, although there are other more modern formats with better audio quality.
  • AAC (Advanced Audio Coding) – AAC is a newer digital audio format. It offers better audio quality than MP3 even though the compressed file size is much larger. AAC has become the preferred audio format for the transmission and storage of digital audio content.
  • WAV (Waveform Audio File Format) – WAV is an uncompressed audio format that offers excellent audio quality. This means that WAV files are not compressed. These files are ideal for audio editing as they have uncompromised audio quality. However, the size of WAV files is much larger than that of compressed files.

What is the Best Audio Codec?

Each audio format has its own advantages and disadvantages. The best audio codec for your purpose will depend on your needs for storing and streaming audio content. For example, if you want to edit an audio file for use in an audio production project, then the WAV format is the best choice. If you want to stream audio content over the web, then the AAC format is the best option.

What is Mp4Gain and What is its Importance?

Mp4Gain is a software tool used to normalize the volume of audio and video files. This tool allows you to adjust the volume of files so that all files are of the same volume. This is important for audio and video files that are being streamed over the web. With Mp4Gain, users can ensure that audio and video files are played at the same volume for a better listening experience.

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.

Which audio codec for Bluetooth is better?

Which audio codec for Bluetooth is better?

Bluetooth Audio Codec

The best codec is the one that can deliver the best sound quality. But if they were considered among the popular formats, it was difficult to choose the right option. Each one has positive and negative characteristics that influence the final choice.

Bluetooth audio codec

Which audio codec is better?
When choosing codecs, the following nuances should be taken into account:

Experts believe that the sound quality should be similar to that of CD audio. The sampling frequency must be 44.1 kHz and 16 bits. These are average values, they are observed only in the rarely used LDAC algorithm;

The aptX codec has modest performance, but it provides high-quality audio files. It is popular as the only high-definition Bluetooth codec;

All algorithms perform audio compression. This is necessary to reduce the bitrate to the maximum allowed for a particular codec. This means that when using any algorithm, the music will sound a bit distorted, in some it will be more obvious (for example, in the SBC format), in others it will be almost invisible (LDAC, aptX);

When choosing codecs, do not forget about the model and operating system of the smartphone, tablet and other devices. For Android devices, SBC or aptX is better, but for Apple it is recommended to use Advanced Audio Coding with an improved algorithm.
Below is a table with the main indicators and supported formats of popular algorithms.

Codec Sampling frequency (kHz) Bit rate indicator (kbps) Audio formats
SBC 46-48 328 MP3
CAA 42-44,1 250 MP3, AAC
LDAC 94-96 990 Lossless Formats, Hi-Res Audio
aptX 42-44,1 352 Audio CD
aptX HD 46-48 576 Lossless Formats, Hi-Res Audio

The SBC format codec is considered obsolete and is rarely used for playing music and audio files. It was originally created for the transmission of voice and sound data via Bluetooth. Over time, improved algorithms have appeared. If you want to buy wireless headphones for normal use, then it is better to give them to aptX based devices, these will transmit sound without obvious distortion, noise, squeak.

If you are using Apple devices, only AAC headphones will work. The algorithm is adjusted for this technique, you will be able to transmit the quality of the music. But when using it for Android OS devices, the sound will be distorted with interference.

For music lovers who value sound quality, the aptX HD algorithm is suitable. It has good sample rates, bitrate levels, and supports modern audio file formats. The codec characteristics convey high quality sound, the acoustics are delivered without distortion.

But if the price is not an obstacle, you can afford wireless headphones, devices, smartphones, tablets, LDAC-based players from the famous Sony company. The technique is quite expensive, the cost can amount to several hundred dollars, but the characteristics of the algorithm fully justify it.

Codecs are an important prerequisite for high-quality sound reproduction when using Bluetooth-based wireless devices and headphones. Without them, the music will be poor quality, distorted, and constant interference will make the melody shrill and vague. When using popular brand devices (Huawei, Xiaomi, iPhone), it is worth applying suitable algorithms that suit the device and the device’s operating system.

What are audio codecs?

What are audio codecs?

Audio Codec

High-quality music without interruptions or interference is every music lover’s dream. Devices with a Bluetooth system are popular. Wireless headphones provide free, wire-free listening for lightness.

Audio Codecs

When using them, it is fashionable to do movements, running, playing sports, this will not affect the operation of the device. For its operation, the Bluetooth LDAC, AAC, APTX, SBC codecs are used. Each of them has distinctive characteristics, specific functions that must be considered in advance, this will help to break the principle of operation of these systems.

Why are codecs needed
Codecs are used to improve the quality of music file transfer via Bluetooth to wireless headphones. The system was originally created for data transmission, but it had problems with audio quality. The sound was distorted by noise and the development of codecs helped eliminate the annoying problems.

The operation of the algorithm is determined by the following criteria:

Sample rate indicator. Expressed in Hz. Indicates the data recording frequency for 1 second of sound. The higher the criteria, the better the sound quality;
The bitness of the recording ((Bit-depth). The bit is used for the measurement. If we consider a CD, then 16 bits is enough to record. The indicator is enough to record music up to 96 dB. But they have progressive recording methods , for which 24 to 32 bits are used.;
Bit rate. The indicator is expressed in kb / s. Reflects the amount of data the device processes to play 1 second of audio. A high value records a large amount of audio data for 1 second.
For reference! Voice transmission between carrier networks is regulated by the session border controller. This is carrier-class software that is part of carrier’s NGN networks. It issues signaling protocols and their dialects, analyzes the quality of the media channels through which voice traffic is routed.

Types of data storage and transmission formats
There are three formats for storing and transferring data: uncompressed, lossy (lossy compression), and lossless (lossless compression).

Lossy audio encoding. What is what?

Lossy audio encoding. What is what?

LOSSY AUDIO
.

The Evolution of Audio Coding

lossy compression

It’s 2020, it’s been years since the first MP3 encoder appeared. But just because most of us still calmly listen to MP3 music does not mean that progress has marked time all this time. And this applies not only to the development of the MP3 encoding algorithm, but also to the evolution of lossy audio encoding in general, in the form of newer and more advanced codecs that actually allow you to get better quality in a smaller size. . Formats like OGG Vorbis, AAC, WMA, Musepack have left behind outdated MP3 with its many limitations and flaws.

In parallel, lossless encoding is gaining momentum. But due to the large amount of data, today it is still not suitable for large-scale use, especially for portable devices with limited memory, for streaming on the network and only for quickly sharing music on the Internet (I must admit that not all 100 megabit internet access isn’t always at hand).

And so MP3 is out of date and definitely ready to be replaced. But what about the uninitiated user, but who wants to achieve the highest quality sound with the least amount of memory? After all, there are quite a few alternative codecs (at least 3 of them are really worthy of attention): Apple is promoting the AAC (Advanced Audio Coding, positioned as the successor to MP3) format through its iTunes Store, Microsoft, its own WMA (Windows Media Audio) license, moreover, OGG Vorbis is becoming more and more famous, and specially illustrated people even use a format like Musepack. Which of these codecs should I choose?

There is no definitive answer to this question, and that is why I am writing this article.

How to decide?

The choice of one or the other codec depends on the specific task. Namely:

1. From the equipment and software with which the sound will be reproduced. Those. on the availability of support for one or another audio format, as well as the quality of reproduction (it is advisable to be guided by it when choosing a bit rate).

2. Of the amount of memory that will be allocated to the final material. Accordingly, a higher or lower target quality / bit rate is selected.

And of course, in addition to the format and bit rate, you need to choose the optimal encoder and encoding parameters. It should be understood that different formats / encoders are displayed in different ways in different bit rate ranges.

Therefore, the algorithm is approximately the following:

1) Find out what formats the target device supports.
2) Determine how much space you can allocate for the audio material, as well as determine the total length of the audio intended for encoding.
3) Calculate the required bitrate using the formula: bitrate = disk_space (in kilobits) / total_time (in seconds).
4) According to the bitrate, choose the optimal one of the supported formats (more on this later).
5) Choose the best encoder and parameters for it.

More about our heroes

CAA

image

The development of psychoacoustics and data compression methods gradually led to the fact that the MP3 standard became “strict” for the implementation of new ideas in audio coding. As a result, in 1997, Fraunhofer IIS, which created MP3 in the early 1990s, as well as Dolby, AT&T, Sony, and Nokia, developed a new audio compression method: Advanced Audio Coding (AAC), which became a standard. . MPEG-2 and MPEG-4. The main differences from the MP3 standard are:
support for a wider range of audio formats (up to 48 channels) and sample rates (8 kHz to 96 kHz);
More efficient and simple filter bank: The hybrid MP3 filter bank has been replaced by the conventional MDCT (Modified Discrete Cosine Transform);
wider ranges of variation of the time-frequency resolution in the filter bank – eight times (in MP3 – three times) – led to an improvement in the encoding of transients (transients) and stationary sections of the audio signal;
better coding of frequencies above 16 kHz;
more flexible stereo encoding mode, allowing to switch to M / S (“joint stereo”) mode independently in different frequency bands;
Additional features of the standard that increase compression efficiency: time domain noise shaping technology (TNS), prediction of MDCT coefficients over time (long-term prediction), parametric stereo coding mode, synthesis of noise (perceptual noise replacement), high frequencies (SBR).

Thanks to these features, the AAC standard can achieve more flexible and efficient audio coding and therefore better quality. As a result of the widespread use of the MP3 format, the AAC standard has not yet acquired a popularity comparable to MP3. However, AAC is the main format on the popular iTunes Store, iPods, iTunes, iPhone, PlayStation 3, Nintendo Wii, and DAB + / DRM digital streams.
OGG Vorbis

image

Ogg Vorbis is a relatively new universal audio compression format that was officially released in the summer of 2002. It belongs to the same type of format as MP3, AAC, VQF and WMA, that is, lossy compression formats. The psychoacoustic model used in Ogg Vorbis is similar in principle to MP3 and similar ones, but only that the mathematical processing and practical implementation of this model are fundamentally different, allowing the authors to declare its format completely independent of all predecessors.
The main undeniable advantage of the Ogg Vorbis format is its total openness and freedom. In addition, it uses the latest and highest quality psychoacoustic model, so the bitrate / quality ratio is significantly lower than other formats. As a result, the sound quality is better, but the file size is smaller.
The format has many advantages. For example, the Ogg Vorbis format does not restrict the user to only two channels of audio (stereo: left and right). Supports up to 225 individual channels at a sample rate of up to 192 kHz and up to 32 bits (which no lossy compression format does), making Ogg Vorbis ideal for encoding 6-channel DVD-Audio. Additionally, the OGG Vorbis format has sample accuracy. This ensures that the audio data before encoding and after decoding will not have offsets or extra / missing samples to each other. This is easy to appreciate when you are encoding music endlessly (where one track gradually fades into another); in the end, the integrity of the sound will be preserved.
Streaming capacity is nowhere to be found, but this format has built it from the ground up. This gives the format a rather useful side effect: multiple songs can be stored in one file with their own tags. When loading such a file into the player, all songs should be displayed as having been loaded from several different files.
We should also mention a fairly flexible labeling system. The tag header can easily be expanded to include lyrics of any length and complexity (eg song lyrics) interspersed with images (eg album cover photo). Text labels are stored in UTF-8, allowing you to type in all languages ​​at the same time and eliminating potential problems with encodings. This is much more convenient than various tricks like id3 tags.
Ogg Vorbis uses a variable bitrate by default, while the latter is not limited to hard values ​​and can vary even by 1 kbps. It should be noted that the format does not strictly limit the maximum bit rate and with the maximum encoding setting it can range from 400 kbps to 700 kbps. The sample rate has the same flexibility: users can choose between 2000 Hz and 192000 Hz.
Ogg Vorbis was developed by the Xiphophorus community to replace all paid proprietary audio formats. Even though this is the youngest format of all MP3 competitors, Ogg Vorbis has full support on all known platforms (Windows, PocketPC, Symbian, DOS, Linux, MacOS, FreeBSD, BeOS, etc.), as well as a large number of hardware implementations. … The current popularity far exceeds all alternative solutions.
It is worth noting that Ogg Vorbis is only a small part of the Ogg Squish multimedia project, which also includes free encoders: Speex – for voice compression; FLAC: for lossless audio compression; Theora: for video compression.
Musepack

image
MusePack (mpp, mp +, mpc, MPEG +) is an unlicensed file format for storing audio information, distributed under the GNU General Public License.
The quality of MPC encoding at high bit rates (160 Kbps and above) is notably (if not significantly) higher than the quality provided by MP3.
Main advantages:
The format doesn’t do a second dct conversion, it doesn’t actually suffer from pre-echo artifacts, unlike formats like MP3, Vorbis, AAC, and WMA.
More efficient variable bit rate algorithms. If you track how the bit rate changes during MPC track playback, you will notice that for simpler sections the encoder assigns a lower bit rate, and for complex ones a much higher one, sometimes above 400 ( !) Kbps. An interesting fact is also worth mentioning: the MP3 encoder in VBR mode for silence assigns a bit rate of 32 kbps (at a sampling rate of 44100 Hz), AAC and OGG Vorbis – 2 kbps, Musepack encodes silence with minimal costs, <1 kbps / s (for example, one minute of silence will occupy about 514 bytes). All of this speaks to the extreme “frugality” of this encoder.
Powerful and flexible psychoacoustic model. Here we can mention, for example, a frame-based dynamic low-pass filter (in other encoders, a fixed bandwidth is set for each quality preset).
More advanced compression based on optimized Huffman tables (the same MP3 LAME wastes about 20% of the bit rate, only due to imperfect mathematical compression)

WMA

image

Windows Media Audio is a licensed file format developed by Microsoft for storing and transmitting audio information.

WMA was initially marketed as an alternative to MP3, but Microsoft now opposes AAC. Nominally, the WMA format is characterized by good compressibility, allowing it to “bypass” the MP3 format and compete on parameters with the Ogg Vorbis and AAC formats. But as independent tests, as well as subjective evaluation, showed, the quality of the formats is not yet exclusively equivalent, and the advantage even over MP3 is unequivocal, as Microsoft claims.

Format, encoder and parameter selection

Now straight to the heart of the matter.

To make your choice easier, I would like to share my experience gained in the course of numerous comparisons, auditions, as well as based on the analysis of the results of open hearing tests.

And so, next I will talk about the most suitable encoders for each case, as well as the correct choice of parameters. For the conversion, I recommend using foobar2000 (the converter settings are described in detail here), the parameters themselves are specified just for it. Additionally, foobar2000 has a host of useful DSPs that can be useful for audio pre-processing.

For those who are going to convert through the console or another program: the variable% s must be replaced with the name of the source file (or a similar variable) and% d with the name of the output file.

Note that for each bit rate range, the possible format options are indicated: the first is the highest priority. If your player doesn’t support the first option, please pay attention to the next one, etc. As I already wrote, in fact today only three codecs deserve attention: these are AAC, OGG Vorbis and Musepack. WMA, on the other hand, due to its closed nature, does not differ in special quality, but still, in most cases, it is better than MP3. Since some of the alternatives are only compatible with WMA, I will make recommendations for each of the four formats.

About bit rates: It should be understood that the optimal encoding mode is called. True VBR, ie target quality mode, not bit rate. Ideally, the result is a track with variable bit rate, but constant quality (don’t equate the two, more complex parts of a track need more bits to maintain quality). Therefore, the output bit rate is difficult to predict. Therefore, the bitrate values ​​below are indicated only as approximate, if possible, as an average for a large number of compositions of varying complexity.

Mentioned in this article, as well as some other encoders, with Russian descriptions of the main parameters and recommendations can be found here.

Ultra-low bit rates (~ 25-40 kbps)

This range is ideal for encoding audiobooks. And here there can only be one option: AAC, or rather, Nero AAC. The parameters are as follows:

-lc -q 0.35 -ignorelength -if – -of% d

In this case, the material must be pre-converted to mono and resampled at 22050 Hz (preferably using a SoX resampler). At the output, we get the usual low complexity AAC with a bit rate of about 25 kbps.

There are also options for music in this range:

1) Nero AAC. No conversions are needed here:

-q 0.15 -ignorelength -if – -of% d

On the output – High efficiency AAC v2 (with parametric stereo and HF synthesis), ~ 35 kbps. A great option for internet radio. Only here we must not forget that the decoder in the player must be compatible with HE-AACv2, otherwise you will get a complete absence of HF and monophony.

2) OGG Vorbis AoTuV – This modification of libvorbis includes improvements to the low bitrate encoding algorithm and even without SBR technology it is not much inferior to HE-AACv2. Command line:

-s% r -Q -q-2 – -o% d

Resulting files must be fully compatible with standard OGG Vorbis decoders. Bit rate – similar – around 35 kbps.

3) WMA 10 Pro. For such cases Microsoft also has something like SBR (high frequency synthesis), it doesn’t sound as bad as it could. It is true that the bit rate is slightly off limits: 48 kbps.

-silent -a_codec WMA9PRO -a_mode 3 -a_setting 48_44_2_16 -input% s -output% d

Note that older decoders (especially “hardware”) do not support WMA 10. In this case, you can use WMA 9.2 (the same encoder), however, its quality at low bit rates is much worse.

-silent -a_codec WMA9STD -a_mode 3 -a_setting 48_44_2 -input% s -output% d

Low bit rate, ~ 64 kbps

Initially, I thought about going straight to higher speeds. But since hydrogenaudio.org recently ran an encoder comparison at this bitrate, it’s a sin to lose it.

1) QuickTime AAC is the winner (except for the newly created Opus / CELT) of the same test. The following are the QAAC encoder settings:

-s -v 64 –he -q 2 –ignorelength – -o% d

The output is HE-AAC (with SBR, but not parametric stereo), which should be compatible with various iPods and the like.

2) OGG Vorbis AoTuV – although it turned out to be quite far from QAAC, but still:

-s% r -Q -q0 – -o% d

3) And just in case WMA 10 Pro:

-silent -a_codec WMA9PRO -a_mode 3 -a_setting 64_44_2_16 -input% s -output% d

For older decoders – WMA 9 standard:

-silent -a_codec WMA9STD -a_mode 3 -a_setting 64_44_2 -input% s -output% d

Slightly higher, ~ 80-100 kbps

And I already consider this bitrate due to Vorbis.

1) As tests have shown, the OGG Vorbis AoTuV encoder is best suited to it:

-s% r -Q -q1 – -o% d

2) Nero AAC: a very good result. In places where the highs are not as pronounced, it can sound even better than Vorbis (in the highs it loses due to synthesis).
30 -ignorelength -if – -of% d The

profile used is HE-AAC.

De facto standard, 128 kbps

Interesting fact: many people argue that for MP3 128 kbps – “edge bit rate”, which starts the quality indistinguishable from the original. Maybe this is so … for plastic Chinese speakers with blatnyak. Actually, this threshold is around 200 kbps, and newer formats provide more stable quality at this bit rate.

Modern encoders managed to cut this level from 128 kbps to almost half (again, according to the developers). But nevertheless, if you have more or less decent acoustics (or headphones), the difference can be captured in complex snippets even at 128 kbps.

What audio codecs are common?

Audio Codecs

Depending on whether you want to burn your audio file to CD, make it available on the Internet, or edit it with an audio editor, the different audio formats are in question. Codecs are responsible for converting to and from the various formats:

Audio Formats

PCM (pulse code modulation)

Pulse code modulation is a coding process in which an analog signal can be digitized with almost no loss. Audio material encoded in this way is ideal for further processing because it is not compressed. Data generated with this method is generally saved as wave files with the extension “.wav”.

MP3 (MPEG-1 Audio Layer 3)

The encoding process is actually called MPEG-1 Audio Layer 3 or MPEG-2 Audio Layer 3 and was developed by the Fraunhofer Institute for Integrated Circuits. The name is derived from the associated MP3 file extension of the format. It is one of the first lossy compression processes to rely on psychoacoustic effects on perception to reduce the amount of data. In addition to the original codec from the Fraunhofer Institute, there is also the open source encoder LAME. Files containing data streams encoded in this way usually end in “.mp3”. There are also other container formats that can hold MP3 data streams, such as AVI or MP4.

AAC (advanced audio coding)

AAC is a lossy encoding method that can compress audio data (on a CD) to one-sixteenth of its original size. Compared to MP3, the process can demonstrate higher compression and improved sound quality. Therefore, various online music stores and online radio stations rely on this format. MP4 is designed as a container format to store compressed audio signals. Files containing such an audio track usually end in “.mp4” or “.m4a”.

Vorbis

This open source format is patent-free and therefore can be used by software developers without license fees. The format is also suitable for streaming. Compression is lossy and better than MP3. Although many hardware playback devices now support this format, it is not as widespread as MP3. The data stream is usually embedded in an OGG container. Associated files end in “.ogg” or “.oga”.

WMA (Windows Media Audio)

WMA is an encoding process developed by Microsoft and also offers lossy compression. Many hardware playback devices now support this format, because it is very popular in the music industry due to its built-in copy protection (Digital Rights Management (DRM)). If the file contains only audio data, it ends with “.wma”. ASF is used as the container format.

Why do you need “file formats”?

Digital data used to represent analog video or audio signals can be organized in different formats. The best way to explain this is with a single image – there are multiple options for storing individual pixels in a file. For example, if the image points are stored one after the other from left to right or first from top to bottom in the file it is of course a convention that must be specified. The way a color value is stored must also be clearly defined. These and many other definitions are determined by a specification, which is then implemented in the respective file format. To store the data, a predefined encoding rule is always followed, which is ultimately decisive for the data to be interpreted correctly. You can think of individual formats as different data carriers: CDs, large and small video cassettes, audio tapes, etc. can contain audio data; however, you cannot load a cassette in the CD player. WAV, MP4, WMA or MP3 file formats are equally different.

Many file formats are actually container formats. The term is intended to make it clear that different formats can be used within a convention. For example, an MP4 file can contain different video and audio formats that can also appear in the same file at the same time.

Types of audio codecs

Types of audio codecs:

-DST (Direct Stream Transfer)
-FLAC (Free Lossless Audio Codec)
-LA (Lossless Audio)
-LPAC (Lossless Predictive Audio Codec)
-LTAC (Lossless Transform Audio Codec)
-MLP (Meridial Lossless Packing)
-Monkey’s Audio (APE)

There is a huge amount of audio formats. The most common are formats such as MP3 (MPEG-2 Audio Layer III) and WAV. Usually, the type of format corresponds to the file extension (the letters of the file name after the period, for example .mp3, .wav, .ogg, .wma).

A codec is an algorithm for encoding and compressing data in an audio format. Some file types are assigned a specific codec. For example, the MP3 format always uses the MPEG Layer-3 codec, while the MP4 format can use a range of different codecs.

Many times, the notions of codec and format are used as interchangeable. Especially when a format always uses a single codec. However, it is necessary to understand the difference between a format and a codec. In simple terms, a format can be compared to a container in which a sound or a video signal that uses a particular codec can be stored.

Some formats, such as MP4 or FLV, can store both audio and video sequences.

In the general scope of codecs (for any type of data), we can classify them as follows, depending on whether the original signal can be recovered or not after coding:

With losses (lossy). In this type of codecs, after coding, it is impossible to recover the original signal. Most codecs manage to reduce the size of the bit stream to be transmitted or stored, due to the loss of information in said bit stream. Normally this loss does not produce a large decrease in the quality of the audio perceived by the end user, and if the decrease in quality is appreciable, it is that a lot of information has had to be lost to achieve a small bit stream size, that in many occasions it is necessary, especially in the transmission of audio at a distance (telephony, digital video, television …), although this is a compromise solution between the different codecs, an issue that we will discuss in the comparative section between codecs .
Lossless (loseless). In this type of codecs, after coding, the original signal can be recovered. These types of codecs are the least common. They are usually common especially in high quality audio applications, where the size of the bit stream or stream is not decisive. If the files are to be treated later, it is not advisable to perform loss coding, since one encoding with losses after another would significantly damage the audio quality.

There is another classification of codecs, depending on the type of algorithm used in the coding:

Waveform codecs:

used for all types of digital signals. The waveform of the encoded signal must be as similar to that of the original signal
Vocoders or source codecs: used only for coding voice signals. The original signal is analyzed and synthesized to give rise to the encoded signal
Hybrids: combine characteristics of the two previous types

The waveform codecs seek to produce a reconstructed signal of the signal to be encoded, whose waveform is as similar to that of the signal to be encoded. These codecs work without knowing how the signal to be encoded was generated, which implies that in theory its operation does not depend on the signal and can work well with all types of signals, even if they are not audio.

Hybrid Codecs

These types of codecs are a mix between waveform and source. Within the hybrid codecs, the most used are the codecs in the time domain of Analysis-by-Síntesi