MP3 finally goes into the public domain


Free Download Mp4Gain
picture

MP3 finally goes into the public domain

mp3

Open Source

Mp3 Public Domain

Perhaps many did not think so, but the mp3 standard so well known to all had problems with the purity of patents. On April 23, 2017, the last patents expired and the format was finally free. Technicolor has officially stopped collecting royalties from manufacturers of software and embedded solutions.

License

Although hardware mp3 decoding is built into all other coffee machines, until recently its use in commercial projects required royalties from the developer: Fraunhofer Society. In 2005 alone, the amount paid was one hundred million euros. Most of the patents became invalid in the European Union in 2012. However, some of them continued to operate in the United States due to peculiarities of local law. What does this news bring to the community? At least now it will be possible to compile Gentoo and listen to music at the same time immediately on the base distribution. Many distributions will be able to provide support for the standard to the main repository. Now, for example, Ubuntu itself requires the installation of non-free components from a separate Ubuntu Restricted Extras meta-package to support mp3.

Bourbon vanilla vs vanillin

How does this standard, which has been the main standard in this area for 24 years, despite many more advanced free options? mp3 is in many ways similar in principle to its cousin in the photo world: JPEG. Due to the imperfection of our hearing aid and the peculiarities of psychoacoustics, it is possible to “discard” those parts of the audio spectrum that do not make a significant contribution to the musical pattern. In particular, in the illustration above, you can see how the amount of information encoded in the high-frequency region increases.

High frequencies are often sacrificed for the sake of preserving detail in the lower region – vocals, most instruments (thanks for the comment, KorDen32). Standard values ​​of cutoff frequencies for the lame encoder:

CBR 096 kbps: 14000 – 15000 Hz;
CBR 112 kbps: 15000-15600 Hz;
CBR 128 kbps: 16000 – 16500 Hz;
CBR 160 kbps: 16500-17500 Hz;
CBR 192 kbps: 18000-18700 Hz;
CBR 224 kbps: 19000-19400 Hz;
CBR 256 kbps: 19500-19700 Hz;
CBR 320 kbps: 20,000 – 21,000 Hz.

The method can be compared to the creativity of flavor chemists. You’ve probably noticed that strawberry gum is very conventionally strawberry, and there isn’t enough lemon in synthetic lemon tea. Any natural flavoring composition contains dozens and even hundreds of chemical compounds. But the main core generally creates only a very limited amount. So, for example, vanillin defines most of the aroma of natural vanilla, and if you don’t appreciate the subtle nuances too much, the remaining components can be neglected. mp3 uses the same principles, removing insignificant portions of the spectrum. Most people cannot tell the lossless formats by ear from the normally encoded 320kbps mp3s, which saves a lot of space when storing your media library.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Audio Coding: Secrets Revealed Part 2

Audio Coding: Secrets Revealed Part 2

Bit Depth

Bit depth

audio encoding

Along with the sample rate, there is the bit depth or depth of the sound. Bit depth is the number of bits of digital information to encode each sample. Simply put, the bit depth determines the “accuracy” of the input signal measurement. The larger the digit capacity, the smaller the error will be for each individual conversion from the magnitude of an electrical signal to a number and vice versa. With the smallest possible bit depth, there are only two options for measuring sound accuracy: 0 for full silence and 1 for full sound. If the bit width is 8 (16), then by measuring the input signal, 2 8 = 256 (2 16 = 65,536) different values ​​can be obtained.

Bit depth is fixed in the PCM codec, but for codecs that assume compression (eg MP3 and AAC), this parameter is calculated during encoding and may vary from sample to sample.

Bitrate
Bit rate is an indicator of the amount of information that one second of sound encodes. The higher it is, the less distortion and the closer the encoded composition is to the original. For linear PCM, the bit rate is very easy to calculate.

bitrate = sample rate × bit depth × channels

For systems like the Epiphan Pearl Mini that encode 16-bit (16-bit) linear PCM, this calculation can be used to determine how much additional bandwidth the PCM audio might require. For example, for stereo (two channels), the signal is digitized at 44.1 kHz at 16 bits and the bit rate is calculated as follows:

44.1 kHz × 16 bit × 2 = 1411.2 kbps

Meanwhile, audio compression algorithms like AAC and MP3 have fewer bits to transmit the signal (that’s their purpose), so they use low bit rates. Typically, the values ​​are in the range of 96 kbps to 320 kbps. For these codecs, the higher the bit rate you choose, the more audio bits you get per sample and the better the sound quality.

Sample rate, bit depth and bit rates in real life.
Audio CDs, one of the most popular early inventions for the general public for storing digital audio, used 44.1 kHz (20 Hz – 20 kHz, human ear range) and 16 bits. These values ​​were chosen to be able to save as much audio as possible to disk with good sound quality.

When video was added to audio and DVD and then Blu-ray discs came along, a new standard was created. DVD and Blu-Ray recordings typically use 48 kHz (stereo) or 96 kHz (5.1 surround) linear PCM format and 24-bit depth. These settings have been selected as ideal for keeping audio in sync with video while obtaining the best possible quality using the additional available disk space.

Our recommendations
CDs, DVDs, and Blu-Ray discs all have one goal: to provide the consumer with a high-quality playback engine. The goal of all developments was to provide high-quality audio and video without worrying about file size (if only it could fit on disk). Such quality could be provided by linear PCM.

In contrast, mobile media and streaming media have a completely different goal: to use the lowest bit rate, as low as possible, while still being sufficient to maintain acceptable quality for the listener. Compression algorithms are best suited for this task. You can follow the same principles for your records.

When recording audio from a video …
In case the record is used for the next on-ra-ki-bot, choose the 48 kHz PCM codec and the maximum bit depth (16 or 24) to provide the best audio quality. We recommend these parameters for Epiphan Pearl Mini.

When streaming audio from video …
With streaming or recording for later translation, good sound can be obtained with less bandwidth, using MP3 or AAC codecs with a frequency of 44.1 kHz and a bit rate of 128 kbit / s or higher. These parameters ensure that the sound is good enough without affecting the quality of the transmission.

Audio encoding: secrets revealed

Audio encoding: secrets revealed

Audio Encoding

Audio settings for video capture and transmission.

audio and video encoding

As people directly related to the AV sphere, we constantly talk about audio coding and audio codecs, but what is it? An audio codec is essentially a device or algorithm that can encode and decode a digital audio signal.

In practice, the audio waves that travel through the air are continuous analog signals. The signals are converted to digital form by a device called an analog-to-digital converter (ADC), and the reverse converter is called a digital-to-analog converter (DAC). The codec lies between these two functions and it is he who allows you to adjust some important parameters for the successful capture, recording and transmission of an audio signal: the codec algorithm, the sampling frequency, the bit width and the speed of the audio signal. data.

The three most popular audio codecs are Pulse-Code Modulation (PCM), MP3, and Advanced Audio Coding (AAC). The choice of codec determines the compression rate and the recording quality. PCM is a codec used by computers, CDs, digital phones, and sometimes SACD. The PCM signal source is sampled at regular intervals, and each sample is the digital amplitude of the analog signal. PCM is the simplest option for digitizing an analog signal.

With the correct parameters, this digitized signal can be completely converted back to analog without any loss. But this codec, which provides an almost complete identity with the original audio, is unfortunately not very cheap, which translates into very large file sizes, and such files are not suitable for streaming. We recommend using PCM to record digital images for your sources or when doing audio post-processing.

Fortunately, we always have the option of choosing a different codec that can compress digital data (rather than PCM) based on some helpful observations on the behavior of sound waves. But in this case, you have to make a compromise: all alternative algorithms are associated with “losses”, since it is impossible to completely restore the original signal, but nevertheless the result is still so good that most users will not be able to to catch the difference.

MP3 is an audio encoding format that uses a digital data compression algorithm that allows you to save the audio signal in smaller files. The MP3 codec is the most used by users to record and store music files. We recommend using MP3 to stream audio content as it requires less network bandwidth.

AAC is a newer audio encoding algorithm that is the successor to MP3. AAC has become the standard for MPEG-2 and MPEG-4 formats. In fact, this is also a digital data compression codec, but with less quality loss than MP3 when encoded with the same bit rate. We recommend using this codec for online streaming.

Sampling frequency (kHz, kHz)
Sample rate (or sample rate): the frequency with which the signal is digitized, stored, processed, or converted from analog to digital. Time sampling means that the signal is represented by several of its samples (samples) taken at regular intervals.

Measured in hertz (Hz, Hz) or kilohertz (kHz, kHz,) 1 kHz equals 1000 Hz. For example, 44,100 samples per second can be labeled 44,100 Hz or 44.1 kHz. The selected sample rate will determine the maximum playback frequency and, as follows from Kotelnikov’s theorem, to fully restore the original signal, the sample rate must be twice the highest frequency in the signal spectrum.

As you know, the human ear is capable of picking up frequencies between 20 Hz and 20 kHz. Given these parameters and the values ​​shown in the table below, you can understand why 44.1 kHz was chosen as the sampling frequency for CD and is still considered a very good frequency for recording.

There are several reasons for choosing a higher sample rate, although it may seem like a waste of time and effort to reproduce sound outside the range of human hearing. At the same time, 44.1 – 48 kHz will suffice for the average listener for a high-quality solution to most problems.

Audio encoding and processing

Audio encoding and processing

Encoding

Sound information.

ENCODING

Sound is a wave that travels through air, water, or other medium with a continuously changing intensity and frequency.

A person perceives sound waves (air vibrations) with the help of hearing in the form of sound of different volume and pitch. The higher the intensity of the sound wave, the louder the sound, the higher the frequency of the wave, the higher the pitch of the sound

The human ear perceives sound at a frequency of 20 vibrations per second (low sound) to 20,000 vibrations per second (high sound).

A person can perceive sound in a wide range of intensities, in which the maximum intensity is 10 14 times greater than the minimum (one hundred thousand billion times). A special unit “decibel” (dbl) is used to measure the volume of sound (Table 5.1). Decreasing or increasing the volume of the sound by 10 dB corresponds to a decrease or increase in the intensity of the sound by 10 times.

Table 5.1. Sound volume
Sonar Volume in decibels
Lower limit of human ear sensitivity 0
Whisper of Leaves 10
Conversation 60
Horn 90
Jet engine 120
Pain threshold 140
Sound time sampling. For a computer to process sound, a continuous audio signal must be converted to a discrete digital form using time sampling. A continuous sound wave is divided into separate small time sections, for each section a certain value of sound intensity is set.

Therefore, the continuous dependence of the loudness of the sound at time A (t) is replaced by a discrete sequence of loudness levels.

Sampling frequency.

A microphone connected to the sound card is used to record analog sound and convert it to digital format. The quality of the digital sound obtained depends on the number of measurements of the sound volume level per unit time, that is, the sampling frequency. The more measurements that are made in 1 second (the higher the sampling frequency), the more accurately the “ladder” of the digital audio signal repeats the curve of the dialogue signal.

The audio sample rate is the number of measurements of the volume of a sound in one second.

The audio sample rate can range from 8000 to 48000 sound volume measurements per second.

Audio encoding depth. Each “step” is assigned a specific value for the volume level of the sound. Loudness levels of sound can be viewed as a set of possible states N, for which a certain amount of information is needed to encode, which is called audio encoding depth.

Audio encoding depth is the amount of information required to encode the discrete volume levels of digital audio.

If the known encoding depth, the number of digital audio volume levels can be calculated using the formula N = 2 I. Let the sound encoding depth be 16 bit, then the number of sound volume levels is:

N = 2 I = 2 16 = 65 536.

During the encoding process, each sound volume level is assigned its own 16-bit binary code, the smallest sound level will correspond to the code 0000000000000000 and the highest, 1111111111111111.

The quality of digitized sound. The higher the sound sampling frequency and depth, the better the digitized sound will sound. The lowest quality of digitized sound, corresponding to the quality of telephone communication, is obtained at a sampling rate of 8000 times per second, a sampling rate of 8 bits, and by recording an audio track (“mono” mode). The highest quality digitized audio, corresponding to the quality of an audio CD, is achieved with a sampling rate of 48,000 times per second, a sampling rate of 16 bits, and the recording of two audio tracks (“stereo” mode ).

It should be remembered that the higher the quality of the digital sound, the greater the volume of information in the audio file. It is possible to estimate the information volume of a digital stereo sound file with a duration of 1 second with an average sound quality (16 bits, 24,000 measurements per second). To do this, the encoding depth must be multiplied by the number of measurements in 1 second and multiplied by 2 (stereo sound):

16 bits × 24,000 × 2 = 768,000 bits = 96,000 bytes = 93.75 KB.