Digital audio storage methods


Free Download Mp4Gain
picture

Digital audio storage methods

digital audio

There are many different ways to store digital audio. As we said, digitized sound is a set of signal amplitude values ​​taken at regular intervals. Thus, first, a block of digitized audio information can be written to a file “as is”, that is, a sequence of numbers (amplitude values). In this case, there are two ways to store information.

DIGITAL AUDIO

The first is PCM (Pulse Code Modulation), a method of digitally encoding a signal by recording the absolute values ​​of the amplitudes (there are signed or unsigned representations). In this way, the data is recorded on all audio CDs.

The second method – ADPCM (Adaptive Delta PCM – adaptive relative pulse code modulation) – records signal values ​​not at all, but in relative changes in amplitudes (increments). Second, you can compress or simplify the data so that it takes up less memory than when it was written “as is.” There are also two ways here.

Lossless Data Encoding (Lossless Encoding) – is an audio encoding method that enables data recovery from a fully compressed stream. This method of data compaction is used when it is essential to maintain the quality of the original data. For example, after mixing sound in a recording studio, the data should be saved to the file in its original quality for possible later use. Today’s lossless encoding algorithms (for example, Monkeys Audio) can reduce the volume of data occupied by 20-50%, but at the same time ensure one hundred percent recovery of the original data from the data obtained after compression. Such encoders are a kind of data archivers (such as ZIP, RAR and others), only designed for audio compression.

There is also a second encoding path, which we will dwell on in a little more detail, lossy data encoding (lossy encoding). The purpose of such encoding is to achieve the sound similarity of the reconstructed signal to the original by any means with the least possible amount of packed data. This is achieved through the use of various algorithms that “simplify” the original signal (eliminating “unnecessary” details for the hearing impaired), leading to the fact that the decoded signal is no longer identical to the original, but only sounds similar. There are many compression methods, as well as programs that implement these methods. The most famous are MPEG-1 Layer I, II, III (the latter is the well-known MP3), MPEG-2 AAC (advanced audio encoding), Ogg Vorbis, Windows Media Audio (WMA), TwinVQ (VQF), MPEGPlus, TAC and others. On average, the compression ratio provided by such encoders is in the range of 10-14 (times). It should be noted that at the heart of all lossy encoders is the use of the so-called psychoacoustic model, which is simply involved in “simplifying” the original signal. More precisely, the mechanism of such encoders analyzes the coded signal, in the process of which the signal sections are determined, in certain frequency regions of which there are nuances inaudible to the human ear (masked or inaudible frequencies), after which are removed. of the original signal. Therefore, the degree of compression of the original signal depends on the degree of its “simplification”; Strong compression is achieved by “aggressive simplification” (when the encoder “considers” various nuances unnecessary), such compression naturally leads to strong quality degradation, as not only imperceptible but also significant sound details can be removed .

As we said, there are a lot of modern lossy encoders. The most common format is MPEG-1 Layer III (known as MP3). The format gained its popularity quite deservedly: it was the first widespread codec of its kind, achieving such a high level of compression with excellent sound quality. Today, there are many alternatives to this codec, the choice is up to the user. Unfortunately, the scope of the article does not allow us to provide tests and comparisons of existing codecs here, however, the authors of the article will allow themselves to provide some information that is useful when choosing a codec.

So the advantages of MP3 are the widespread use and a fairly high encoding quality, which is objectively improved thanks to the development of various MP3 encoders by enthusiasts (for example, the Lame encoder). A powerful alternative to MP3 is the Microsoft Windows Media Audio codec (.WMA and .ASF files).


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Audio conversion from digital to analog

Audio conversion from digital to analog

Digital-to-Analog

How to listen to the sound after digitizing? I mean, how do you convert back from digital to analog?

Digital to Analog

A digital-to-analog converter (DAC) is used to convert a sampled signal into an analog form suitable for processing by analog devices (amplifiers and filters) and later reproduced through acoustic systems. The conversion process is the reverse of sampling: having information about the value of the samples (signal amplitude) and taking a certain number of samples per unit of time, the original signal is restored by interpolation (Fig. 4).

More recently, sound reproduction on home computers was a problem, as computers were not equipped with special DACs. At first, the built-in PC speaker was used as the simplest sound device in the computer. Generally speaking, this speaker is still present in almost every PC, but no one remembers how to “rock” it to get it to start playing. In short, this speaker is connected to a port on the motherboard, which has two positions: 1 and 0. So if this port turns on and off quickly, then more or less credible sounds can be extracted from the speaker. The reproduction of different frequencies is achieved due to the fact that the speaker cone has a finite response and cannot instantly jump from one place to another. therefore, it “rocks smoothly” due to a sudden change in voltage across it. And if you vibrate it at different speeds, you can get air vibrations at different frequencies. The so-called Covox has become a natural alternative to dynamics: this is the simplest DAC, made on several selected resistors (or a ready-to-use microcircuit), which provides the translation of the digital representation of the signal into analog, it is that is, in actual amplitude values. The Covox is easy to make and has been a hit with hobbyists until a sound card was available to everyone. performed on several selected resistors (or a ready-to-use microcircuit), which provide the translation of the digital representation of the signal into analog, that is, into real amplitude values. The Covox is easy to make and has been a hit with hobbyists until a sound card was available to everyone. made in several selected resistors (or a ready-to-use microcircuit), which ensure the translation of the digital representation of the signal into analog, that is, into real amplitude values. The Covox is easy to make and has been a hit with hobbyists until a sound card was available to everyone.

In a modern computer, sound is reproduced and recorded using a sound card that is connected or integrated into the motherboard of the computer. The job of a sound card in a computer is audio input and output. In practice, this means that the sound card is the converter that converts analog audio to digital and vice versa. In a simplified way, the operation of a sound card can be explained as follows. Suppose an analog signal is applied to the input of the sound card and the card is turned on (by software) in record mode. First, the analog input signal goes to an analog mixer, which mixes the signals and adjusts the volume and balance. A mixer is needed, in particular, to allow the user to control the recording levels. Then the adjusted and balanced signal goes to the analog-to-digital converter, where the signal is sampled and quantized, as a result of which a stream of bits is sent to the computer via the data bus, which is the audio signal. digitized. The audio output is almost the same as the input, only in the opposite direction. The data flow directed to the sound card is overcome by a digital-to-analog converter, which forms an electrical signal from the numbers that describe the amplitude of the signal; the received analog signal can be passed through any analog path for further transformations, including playback. It should be noted that if the sound card is equipped with an interface for exchanging digital data, when working with digital audio, no analog blocks from the card are used. where the signal is sampled and quantized, as a result of which a stream of bits is sent to the computer via the data bus, which is the digitized audio signal. The audio output is almost the same as the input, only in the opposite direction.

Sound digitization – Part 2

Sound digitization – Part 2

Sound digitization

Now to the practical problems. First of all, it must be taken into account that the memory of the computer is not infinite, so each time it is digitized it is necessary to find some kind of compromise between the quality (which depends directly on the parameters used during the digitization) and the volume occupied by the digitized signal.

Digital Sound

Second, according to Kotelnikov’s theorem, the sampling frequency sets the upper limit of the frequencies of the digitized signal, that is, the maximum frequency of the spectral components is equal to half the sampling frequency of the signal. Simply put, to get complete information about sound in the frequency band up to 22050 Hz, sampling with a frequency of at least 44.1 kHz is required.

There are other issues and nuances associated with digitizing sound. Without going into the details, we note that in the “digital sound”, due to the discretion of the information about the amplitude of the original signal, various noises and distortions appear (the phrase “there are such and such frequencies and noises in digital sound” means that when this sound is converted back from digital to analog, the aforementioned frequencies and noises will be present in your sound). So, for example, jitter (jitter) – noise that appears as a result of the fact that the sampling of the signal during sampling does not occur in absolutely equal time intervals, but with some deviations. That is, if, for example, you are sampling at a frequency of 44.1 kHz, the samples are not taken exactly every 1/44100 of a second, but sometimes a little earlier and then a little later. And since the input signal is constantly changing, such an error leads to the “capture” of an inaccurate signal level. As a result, some jitter and distortion may be felt during playback of the digitized signal. The appearance of jitter is the result of a non-absolute stability of the analog to digital converters. To combat this phenomenon, highly stable clock generators are used. Another annoyance is the crushing noise … As we said, by quantifying the amplitude of the signal, it is rounded to the nearest level. This inaccuracy results in a “dirty” sound.

A little reference: the standard parameters for recording audio CDs are as follows: sampling frequency – 44.1 kHz, quantization level – 16 bits. Said parameters correspond to 65536 (2 16) levels of amplitude quantization when their values ​​are taken 44100 times per second.

In practice, the digitization process (sampling and quantization of the signal) remains invisible to the user: all the basic work is carried out by various programs that give the appropriate commands to the driver (operating system control routine) of the sound card. . Any program (be it built-in Windows Recorder or a powerful sound editor) capable of recording an analog signal on a computer somehow digitizes the signal with certain parameters that may be important in further work with the recorded sound, and for this reason It is important to understand how the digitization process is carried out and what factors influence its results.

Sound digitization

Sound digitization

Sound

Recently, the capabilities of multimedia equipment have grown significantly, but for some reason this area has not received enough attention.

Sound Perception

The average user suffers from a lack of information and is forced to learn only from his own experience and mistakes. With this article we will try to eliminate this annoying misunderstanding. This article is aimed at a common user and aims to help you understand the theoretical and practical foundations of digital sound, to identify the basic possibilities and techniques of its use.

What exactly do we know about the sound capabilities of a computer, other than the fact that our home computer has a sound card and two speakers? Unfortunately, probably due to insufficient literature or for some other reason, but the user is, in most cases, unfamiliar with anything other than Windows’ built-in audio input / output mixer and recorder. The only use of a sound card that a common user encounters is to play sound in games and listen to a collection of audio. And after all, even the simplest sound card installed in almost every computer can do much more: it opens up wide possibilities for everyone who loves and is interested in music and sound, and for those who want to create your own music, a sound. The card can become an omnipotent tool. To find out what the computer can do in the field of sound, you just need to take an interest and you will be presented with opportunities that, perhaps, you did not even know about. And all this is not as difficult as it might seem at first glance.

Some facts and concepts that are difficult to do without:

According to the theory of the Fourier mathematician, a sound wave can be represented as a spectrum of frequencies included in it.

The frequency components of the spectrum are sinusoidal oscillations (so-called pure tones), each of which has its own amplitude and frequency. Therefore, any vibration, even the most complex shape (for example, a human voice), can be represented as the sum of the simplest sinusoidal vibrations of certain frequencies and amplitudes. On the contrary, by generating different vibrations and superimposing them on each other (mixing, mixing), you can get different sounds.
Note: The hearing aid / human brain is capable of distinguishing between 20 Hz and ~ 20 kHz frequency components (upper limit may vary based on age and other factors). Also, the lower limit fluctuates a lot depending on the intensity of the sound.

Digitize sound and store it on digital media
“Normal” analog sound is represented on analog equipment as a continuous electrical signal. The computer operates with data in digital form. This means that the sound on the computer is also represented in digital form. How does the conversion of an analog signal to digital occur?
Digital sound is a way of representing an electrical signal using discrete numerical values ​​of its amplitude. Let’s say we have a good quality analog audio track (by saying “good quality” we will assume a silent recording that contains spectral components from the entire audible frequency range, roughly 20 Hz to 20 KHz) and we want to “input” into a computer (ie digitize) without loss of quality. How to achieve this and how is digitization carried out? A sound wave is a kind of complex function, the dependence of the amplitude of a sound wave on time. It would seem that since it is a function, you can write it to a computer “as is,” that is, describe the mathematical form of the function and store it in the computer’s memory. However, this is practically impossible, since sound vibrations cannot be represented by an analytical formula (like y = x2, for example). There is only one way left: to describe the function by storing its discrete values ​​at certain points. In other words, at each moment, you can measure the value of the amplitude of the signal and write it as numbers. However, this method also has its drawbacks, as we cannot record the amplitude values ​​of the signal with infinite precision and we are forced to round them. In other words, we will approximate this function along two coordinate axes: amplitude and time (approximate in points means, in simple terms, taking the values ​​of the function in points and writing them with finite precision). Therefore, signal digitization involves two processes: a sampling process (sampling) and a quantization process. Sampling process is the process of obtaining the values ​​of the converted signal at certain intervals.

Quantization is the process of replacing the actual values ​​of the signal

Sound – Part 3

Sound – Part 3

Sound

The phenomenon of resonance plays an important role in the conduction of sound, in which the sound wave of a vibrating object causes the vibratory movements of another (resonator).

sound perception

The resonance can be sharp, if the natural oscillation period of the resonator coincides with the period of the acting force, and muffled, if the oscillation periods do not coincide. With a sharp resonance, the oscillations decay slowly, dull, quickly. It is important to note that the vibrations of the structures of the ear that conduct the sounds decay rapidly; This eliminates external sound distortion, so that a person can receive more and more sound signals quickly and steadily. Some structures of the cochlea have a sharp resonance, which helps to distinguish between two closely spaced frequencies. The main properties of the hearing analyzer. The main properties of the hearing analyzer include its ability to distinguish between the pitch (frequency concept) of sound, its volume (intensity concept) and the timbre, which includes the main tone and harmonics. As is common in classical physiological acoustics, the human ear perceives a band of sound frequencies from 16 to 20,000 Hz (12-24 to 18,000-24,000 Hz). The greater the amplitude of the sound, the better the audibility. However, up to a known limit, beyond which sound overload begins. Vibrations with a frequency of less than 16 Hz are called infrasound and above the upper limit of auditory perception (that is, more than 20,000 Hz) – ultrasound. Under normal conditions, the human ear does not pick up infrared and ultrasound, but with a special study these frequencies are also perceived, hearing gradually deteriorates with age. it moves towards the perception of low frequencies and the area of ​​greatest sensitivity. So if at age 20-40 it is in the 3000 Hz region, then at age 60 and older it shifts to the 1000 Hz region. The upper and lower limits of hearing can change with disease. of the auditory organ, as a result of which the area of ​​auditory perception is reduced. In children, the upper limit of sound perception reaches 22,000 Hz, in older people it is lower and usually does not exceed 10,000-15,000 Hz. In all mammals, the upper limit is higher than in humans: for For example, in dogs it reaches 38,000 Hz, in cats – 70,000 Hz, in bats – 200,000 Hz or more. As studies carried out in our country have shown, a person is capable of perceiving ultrasounds with a frequency of up to 200-225 kHz, but only with bone conduction.

+ The entire range of frequencies perceived by the human ear is divided into several parts: tones up to 500 Hz are called low frequency, 500 to 3000 Hz – medium frequency, 3000 to 8000 Hz – high frequency. Different parts of the range are perceived by the ear differently. It is most sensitive to sounds in the 1000-4000 Hz range, which is important for the perception of the human voice. The sensitivity (excitability) of the ear at frequencies below 1000 and above 4000 Hz is significantly reduced. Therefore, for a frequency of 10,000 Hz, the threshold sound intensity is 1000 times greater than for the optimal sensitivity zone of 1000-4000 Hz. The different sensitivity to low and high frequency sounds is largely due to to the resonant properties of the external auditory canal. The corresponding properties of the sensitive cells of the individual snail curls also play a role.

Sound – Part 2

Sound – Part 2

Sound perception

Physiological characteristics of sound perception

The identical states of a sound wave (areas of thickening or rarefaction) are called phases. The distance between the same phases is called the wavelength. Low sounds, in which the phases are far from each other, are characterized by a long wavelength, high sounds with a close phase position – small (short).

Phase and wavelength are important in the physiology of hearing. Thus, one of the conditions for optimal hearing is the arrival of a sound wave at the windows of the vestibule and cochlea in different phases (anatomically, this is provided by the sound conduction system of the middle ear). High sounds with a short wavelength cause vibrations of a low column of labyrinthine fluid (perilymph) at the base of the cochlea, low, with a longer wavelength, propagating to its apex. This circumstance is important for understanding modern theories of hearing.

The physical characteristics of sound also include the frequency and amplitude of sound vibrations. The unit of measurement for vibration frequency is 1 hertz (Hz), which is the number of vibrations per second. Amplitude of vibrations: the distance between the middle and extreme positions of the vibrating body. The amplitude of the vibrations (intensity) of the sound body largely determines the perception of sound. By the nature of vibratory movements, sounds are divided into three groups: pure tones, complex tones, and noise. Harmonic (rhythmic) sinusoidal vibrations create a clean and simple sound tone (that is, a tone of the same frequency sounds), like the sound of a tuning fork. An inharmonious sound that differs from simple tonal sounds in a complex structure is called noise. The noise spectrum consists of a variety of vibrations, the frequencies of which are chaotically related to the pitch frequency, like different fractional numbers. The perception of noise is often accompanied by unpleasant subjective sensations. Complex tones are characterized by an orderly relationship of their frequencies to the frequency of the main tone, and the ear has the ability to analyze complex sounds. In general, the ear decomposes each complex sound into simple sinusoidal components (Ohm’s law), that is, what happens in physics is called “Fourier’s theorem (series)”.

The ability of a sound wave to bend around obstacles is called diffraction. Low-frequency sounds with a long wavelength have better diffraction than high-pitched sounds with a short wavelength. The phenomenon of reflection of a sound wave from obstacles in its path is called an echo. The multiple reflection of sound in closed rooms from various objects is called “reverberation”. With good sound insulation of rooms, the reverberation is weak, for example, in a theater, cinema, etc., with poor sound insulation, it is strong. The phenomenon of superposition of the reflected sound wave on the primary sound wave is called “interference”. With this phenomenon, an increase or decrease in sound waves can be observed. When sound passes through the external auditory canal, its interference takes place and the sound wave is amplified.

Sound

Sound

sound

Sound is vibrations, that is. Periodic mechanical disturbance in elastic media: gaseous, liquid and solid. Such a disturbance, which is some physical change in the medium (for example, a change in density or pressure, displacement of particles), propagates in it in the form of a sound wave. The field of physics, which deals with the questions of the origin, propagation of reception and processing of sound waves, is called acoustics. Sound may be inaudible if its frequency is beyond the sensitivity of the human ear, or if it propagates in an environment such as a solid that cannot have direct contact with the ear, or its energy dissipates rapidly in the environment. So our usual process of perceiving sound is just one side of acoustics.

Sound

Acoustics is one of the oldest areas of knowledge. It arose several centuries before Christ. me. as a doctrine of sound, that is, of elastic waves perceived by the human ear (hence the origin of the name). The beginning of the formation of acoustics as physics. Science (17th century) is associated with the study of the system, musical tones, their sources (strings, tubes), with measurements of the speed of sound propagation. Until the beginning of the 20th century. Acoustics developed as a branch of mechanics. The creation of methods to decompose a complex oscillatory process into simple components (Fourier method) laid the foundation for sound analysis and synthesis of complex sound from simple components. All this classic. the stage of development of acoustics was summarized at the beginning. 20th century Rayleigh (J.W. Strutt).

A new stage in the development of acoustics began in the 1920s. 20th century in connection with the development of radio engineering and broadcasting, which generated the need to develop methods and means of converting electrical energy into acoustic energy , and vice versa.

Consider a long pipe filled with air. From the extreme left, a piston is inserted into it that fits snugly against the walls (Fig. 1). If the piston jerks to the right and stops, then the air in the immediate vicinity of it will momentarily compress (Fig. 1, a). Then the compressed air will expand, pushing the air adjacent to it to the right, and the compression region, which initially appeared near the piston, will move along the pipe at a constant speed (Fig. 1, b) . This compression wave is the sound wave in gas.

Figure 1. Occurrence of a sound wave in a pipe

A sound wave in a gas is characterized by excess pressure, excess density, particle displacement, and velocity. For sound waves, these deviations from equilibrium values ​​are always small. Therefore, the excess pressure associated with the wave is much less than the static pressure of the gas. Otherwise, we are faced with another phenomenon: a shock wave. In a sound wave corresponding to ordinary speech, the excess pressure is only about one millionth of atmospheric pressure.

It is important that the substance is not carried away by the sound wave. The wave is just a temporary disturbance that passes through the air, after which the air returns to a state of equilibrium. The movement of waves, of course, is not characteristic only of sound: light and radio signals propagate in the form of waves, and everyone knows the waves on the surface of the water. All types of waves are mathematically described by the so-called wave equation.

The wave in the pipe is called a sound pulse. A very important type of wave is generated when the piston vibrates back and forth like a weight suspended from a spring. These vibrations are called simple or sinusoidal harmonics, and the excited wave in this case is called harmonic.Sound waves in gases and liquids can only be longitudinal, since these media have elasticity only with respect to compression (stress) strains. In solids, sound waves can be both longitudinal and transverse, since solids have elasticity with respect to compression (tension) and shear deformations.

Sound perception mechanism

Sound perception mechanism

The perception of sound

The sound vibrations of the air, passing through the external auditory canal, cause vibrations of the tympanic membrane and, through the auditory ossicles, are transmitted in an enhanced form to the membrane of the oval window leading to the vestibule of the cochlea.

SOUND PERCEPTION

The resulting vibration sets the perilymph and endolymph of the inner ear in motion and is sensed by the fibers of the main membrane, which carries the cells of the organ of Corti. The vibration of the hair cells of the organ of Corti causes the hairs to come into contact with the integumentary membrane. The hairs bend, causing a change in the membrane potential of these cells and the appearance of excitation in the nerve fibers that braid the hair cells. Through the nerve fibers of the auditory nerve, the excitation is transmitted to the auditory analyzer of the cerebral cortex.

The human ear can perceive sounds with a frequency of 20 to 20,000 Hz. Physically, sounds are characterized by frequency (number of periodic vibrations per second) and force (amplitude of vibrations). Physiologically, this corresponds to tone and volume. The third important characteristic is the sound spectrum, that is, a composition of additional periodic oscillations (harmonics) that arise together with the fundamental frequency and exceed it. The sound spectrum is expressed by the timbre of the sound. This is how the sounds of different musical instruments and the human voice are distinguished.

The distinction between sounds is based on the phenomenon of resonance that occurs in the fibers of the main membrane.

The width of the main membrane, that is, the length of its fibers is not the same: the fibers are longer at the apex of the cochlea and shorter at its base, although the cochlear canal is wider here. Its natural vibration frequency depends on the length of the fibers: the shorter the fiber, the more sound it resonates. When a high-frequency sound enters the ear, the short fibers of the main membrane located at the base of the cochlea resonate in it and the sensitive cells located in them are excited. In this case, not all cells are excited, but only those that are in fibers of a certain length. Low sounds are heard by the sensitive cells of the organ of Corti, located in the long fibers of the main membrane at the apex of the cochlea.

+ At the same time, the speed of the signal’s passage through the structures of the auditory organ and its entry into the cortex requires some reserves. Therefore, it is known that initially the hearing organ simply assesses the arrival of the signal and then adjusts to the level of best audibility. This means that the first stage takes between 35 and 175 milliseconds and the second between 180 and 500. At the same time, the maximum number of distinguishable sounds depends on the frequency of vibration and the functional state of the organ, and is set at 3 – 4 thousand shades.

Therefore, the primary analysis of sound signals begins already in the organ of Corti, from where the excitation is transmitted along the fibers of the auditory nerve to the auditory center of the cerebral cortex in the temporal lobe, where they are evaluated. qualitatively.

Digital audio encoding

Digital audio encoding

Digital audio encoding

PC-based audio coding is based on the process of converting air vibrations into electrical current fluctuations and the subsequent sampling of an analog electrical signal.

DIGITAL AUDIO ENCODING

The encoding and reproduction of audio information is carried out using special programs. The quality of reproduction of the encoded sound depends on the sampling frequency and its resolution (sound encoding depth – the number of levels).

Digital audio is an analog audio signal represented by discrete numerical values ​​of its amplitude.

Sound digitization is a technology with a divided time step and subsequent recording of the values ​​obtained in numerical form. Another name for digitizing audio is analog to digital audio conversion, which includes the following operations:

Bandwidth limiting is done by using a low pass filter to suppress spectral components that are more than half the sample rate.

Time sampling, that is, replacing a continuous analog signal with a sequence of its values ​​at discrete moments of time: samples.

Level quantization is the replacement of the signal’s reference value with the closest value of a set of fixed values: quantization levels.

Encoding or digitization, as a result of which the value of each quantized sample is represented as a number corresponding to the ordinal number of the quantization level.

This is done as follows: a continuous analog signal is “cut” into sections with a sample rate, a discrete digital signal is obtained, which goes through the quantization process with a certain bit depth, and is then encoded, that is, it is replaced by a sequence of code symbols. To record sound in a 20-20,000 Hz frequency band, a sampling frequency of 44.1 and higher is required (today there are ADCs and DACs with a sampling frequency of 192 and even 384 kHz). To obtain a high-quality recording, 16-bit is sufficient, however, to expand the dynamic range and improve the quality of the sound recording, 24 (less often 32) bits are used.

Sound coding methods (of course an electrical signal coming from a microphone) are based on the fact that, theoretically, any complex sound can be decomposed into a sequence of simpler harmonic signals of different frequencies, each of which it is a sinusoid, called the spectrum of the original signal. The task of encoding sound, like any other analog signal, is to represent it in the form of another analog or digital signal, which is more convenient for its transmission or storage in each specific case. Real sound sources have a limited spectrum width, therefore, for encoding, transformation methods are used that transform the original signal into one, the spectrum of which is more suitable for transmission on the selected channel. Representing an analog signal as another analog signal is commonly referred to as modulation and digitally as encoding. This division is very arbitrary. An analog signal can be represented as a harmonic signal (that is, a sinusoid), the parameters of which change depending on the value of the original signal. In the event that the amplitude of the sinusoid changes with a change in the original signal, it is amplitude modulation (AM). If, depending on the value of the original signal, the frequency or phase of the sinusoid changes, we are dealing with frequency modulation (FM) or phase modulation (PM). Amplitude and frequency modulation, for example, is widely used to transmit sound by radio. These types of modulation, of course, are not the decomposition of the original signal into harmonics. The development of digital technology and the use of computer processing and information storage has led to the widespread use of pulse encoding or modulation methods. Such types of modulation are, for example, pulse code modulation, in which the value of the original signal at regular intervals is represented in code form. The vast majority of “computer sound” is precisely the recording of the binary code of the received signal in short equal time intervals, determined by the sampling frequency. For storage and transmission through communication channels, this signal is usually compressed (reducing the volume by discarding unnecessary or insignificant information). In addition to pulse code modulation, other types of digital modulation (pulse width, pulse frequency, etc.) are also used to encode sound.

X264 codec

X264 codec

H.264

Frequent questions

H.264

Question: What is the difference between the new H.264 standard and the old MPEG-4 standard?
Answer: The H.264 video compression standard (the full name is MPEG-4 Part 10 AVC / H.264) is a logical continuation of the MPEG-4 Part 2 ASP standard (which is often simply referred to as MPEG-4). . The standard itself was adopted in mid-2003, but the truly effective codecs of this standard started to appear recently.

For users, the transition to the new standard means an improvement in the encoding efficiency of their video streams. That is, with the same quality of the compressed sequence, the new standard’s movie will take up less disk space or a smaller channel width (the standard’s developers set a goal of reducing the size by 50%).

More information on the standard can be obtained from the following sources:

Question: Where can I get the x264 codec?

Answer: The x264 codec is an open source H.264 codec. Several independent comparisons (see for example the comparison on the Doom9 website or our lab comparison) show that the x264 codec is one of the best codecs in the new H.264 standard.

The official page for codec developers is http://developers.videolan.org/x264.html. In it, you can subscribe to the codec developers mailing list, download the latest sources or various versions of the codec assembly (executable programs already compiled and ready to use).

Interestingly, the developers do not make official finished versions (releases), that is, the codec changes all the time. New versions of the source code appear almost every day, so it is sometimes difficult to keep track of the changes that take place.

You can find more information and discussions about the codec on the Doom9 forums.

Question: How can I use the console version of the codec?

Answer: The command line is generally used to compress video with the x264 codec. The codec can also be assembled as a Video for Windows filter, but in this case, the user has a limited set of encoding parameters.

In addition, for the convenience of work, various versions of the graphical interface can be used.

Modes of
Bit rate control algorithm The codec has three different bit rate control algorithms:

CRF (constant rate factor): constant quantizer for each type of frame, set by the user. Initialized on the command line as –crf <integer>
ABR (Average Bit Rate): Variation of the quality in different frames to achieve the best quality of the stream at a given bit rate. – Bitrate <integer> se
initializes.There may be additional parameters that control the algorithm:
–ratetol <float> Bit rate tolerance (in percent)
–vbv-maxrate <integer> Maximum frame bit rate
–vbv-bufsize <integer> Buffer size
–vbv-init <float> Initial buffer fill (percent)
Additional parameters can also be configured to control the change in the quantization factor, such as –qpmin <integer>, –qpmax <integer>, –qpstep <integer>, which specify the minimum, maximum quantization factors, and the change maximum. in the quantization factor between frames, respectively. …
Multi-pass mode. Similar to ABR, but allows you to achieve better quality by making multiple passes through the film. The first pass fills the statistics file. To do this, the codec is launched with the –pass 1 parameter. Last Pass encodes the movie using the statistics file generated in the first pass. The codec starts with the –pass 2 parameter. Multiple additional passes can be added between the first and last passes, each of which refines the statistics. In such cases, the codec starts with the –pass 3 parameter.