Digital video: an overview of formats


Free Download Mp4Gain
picture

Digital video: an overview of formats

Digital Video

Recently, home users have the opportunity to create digital videos with their own hands. It goes without saying how convenient it is to store family video files in this way. Digitized records do not deteriorate over time, do not lose quality when copied, and can be easily edited. Video compression technologies, which continue to improve even now, played an important role in its distribution.

Digital Video

First, let’s find out why compress video. To understand this, let’s move on to the basic principles of digitizing moving images.

The video sequence is formed from consecutive 720 x 576 pixel frames, which are changed 25 times per second (according to the PAL standard). If you scan them with 16-bit color depth, each frame will take up about 1.2MB, which means that to store 1 second of video, you’ll need about 30MB of disk space, and about 150GB will go to one movie. 1.5 hours. This is at least five times the capacity of hard drives found in modern home computers. Try to figure out how many 650MB CDs you need to burn one of these movies. To reduce the size of files containing digitized video, various data compression algorithms are used. There are two types of algorithms that work, respectively, without loss of information and provided.

Lossless compression (with virtually no degradation of image quality) in digital video is done using methods similar to those used in archivers such as WinZIP or WinRAR. However, due to some peculiarities of the video information, such algorithms in this case are not efficient enough (the minimum size of a compressed file is 1/3 of the original) and therefore it is practically not used.

Lossy compression is the main method of reducing the size of video files. These algorithms allow us to determine that part of the information that the viewer, most likely, will not notice when watching a movie, and remove it from the file. The main digital video formats using lossy compression today are Apple QuickTime, Intel Indeo, MPEG-1, MPEG-2, MJPEG, and MPEG-4. The specifications of the MPEG-7 standard are also under development, but it is still too early to talk about it.

Apple QuickTime

The MOV file format was developed by Apple for Macintosh computers and later ported to the PC platform. From 1993 to 1995, this format was dominant. Its latest version, number 4.1, allows you to transfer data in streaming mode. This means that you don’t need to fully download the file to start watching the video. However, with the advent of MPEG specifications, this format is gradually losing popularity. Its main problem is that the QuickTime standard is closed. Apple keeps secret the methods by which video is encoded. Consequently, third-party programmers cannot write programs that compress video in this format.

Intel Indeo

This format was developed by Intel Corporation to compress video data using the new capabilities of the Intel Pentium MMX processor. In addition to supporting streaming and copyright protection features, this standard implements several features that were innovative at the time of its introduction. It allows you to apply various effects to a video sequence (for example, change the brightness or contrast) in real time, decode not the whole frame, but, for example, the central fragment, make part of the frame of a video transparent and superimpose two videos one on top of the other. The latter effect is often used in television news programs, when a commentator is depicted in front of a video report of the scene.

However, the Indeo format is not widely used. And with the release of MPEG-4, which also contains all these features, this standard generally doesn’t work.

MPEG-1

The MPEG-1 video compression format was developed by the Motion Picture Expert Group, an international organization that creates video compression standards. It supports a maximum frame resolution of 4095 x 4095 pixels at a frame rate of up to 60 times per second.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Digital sound on modern home theater equipment.

Digital sound on modern home theater equipment.

CD AUDIO QUALITY

The modern consumer AV equipment industry has more than a dozen digital audio coding algorithms in use, both stereo and multichannel.

DVD AUDIO QUALITY

Some allow you to firmly “pack” the stream, but at the expense of quality, others – to convey it in all its glory. Can all the abbreviations be understood? Let’s try.

Digital sound: formats, abbreviations, varieties

Digital sound: formats, abbreviations, varieties

In order to somehow structure the data, we decided to link digital audio formats to media formats such as audio CD, DVD-Video, etc. Since the topic is too broad, this time we will consider only those audio formats that are used in consumer equipment. We will leave the sound formats for computer games for one of the following articles.

Audio CD

Digital Sound: Audio CD

Digital Sound: Audio CD

Description
Regular music CD. It is based on a single coding algorithm: LPCM, linear pulse code modulation – linear pulse code modulation. The Audio CD format assumes two-channel (stereo) audio encoding with a sampling frequency of 44.1 kHz and 16 bits with a bit rate of 1.4 Mbps.

Digital output methods
Via Optical TosLink, Electrical Coaxial, HDMI in any version.

DVD-Video

Digital sound: DVD-Video

Digital sound: DVD-Video

Description
Unlike a music CD, the DVD-Video format involves a more developed audio component, which includes not only stereo, but also multi-channel sound. However, even stereo sound is encoded in higher quality DVD-Video than audio CD. LPCM can also be used for encoding, but with a sampling rate of 48 kHz and a resolution of up to 24 bits.

Dolby Digital
Founded by Ray Dolby Laboratories, Dolby has established Dolby Digital, perhaps the most famous of the modern multichannel audio formats. It is based on a compression algorithm that allows a full-range multi-channel audio signal with up to six channels (5.1) to be “packed” into a stream with a bit rate of up to 448 kbps. The sampling frequency is 48 kHz. For the sake of fairness, it is worth mentioning that the Dolby Digital format itself allows you to encode thicker streams for better sound (for example, on Blu-ray, Dolby Digital’s standard bit rate is 640 kbps) , but for DVD-Video it was such a limitation. Later, the Dolby Digital Surround EX format was introduced, whose main difference from the basic Dolby Digital is the number of channels increased to 7 (6.1).

DTS
California-based Digital Theater System’s alternative multi-channel audio coding algorithm … Thanks to a more efficient “compression” mechanism and higher bit rate, DTS soundtracks are traditionally considered to have better sound quality than those of Dolby Digital. That is why music DVD videos (concerts, video clips) are preferable to buying with a DTS track. Initially, DTS had a bit rate of 768 kbps or 1536 kbps, the number of channels was up to six (5.1), and the sample rate was 48 kHz. Later, more progressive varieties of DTS appeared: DTS ES with a large number (up to 8) of channels and DTS 96/24, in which each audio channel had 96 kHz / 24-bit parameters. Before the advent of the latest high definition digital audio formats, DTS 96/24 was a very attractive format for storing multichannel music recordings.

MP2
Sampling frequency 48 kHz, number of channels up to 8 (7.1), bit rate – 912 kbps. But it makes no sense to talk about the MP2 format for a long time, since in our latitudes it is very difficult to find DVD with such an audio track.

Digital output methods
All the above formats can be transmitted via Optical TosLink, Electrical Coaxial and HDMI of any version.

Blu-ray Disc (BD) and HD DVD

1/2
Digital sound: Blu-ray Disc

Description
Blu-ray and HD DVD specifications cover a wide range of audio formats. Most of those described above are included in it, however, they differ, as a rule, in slightly higher bit rates: the “blue” means allow this, and the sound quality requirements since the advent of DVD have increased. However, in addition to high definition video, Blu-ray and HD DVD also offer a completely new soundtrack, also in high definition.

Dolby Digital Plus
The evolutionary development of Dolby Digital. The number of channels has been increased to fourteen (13.1), although in fact only six (5.1) or eight (7.1) are used so far, the bit rate has been increased to 6 Mbps (maximum; in practice – up to 3 Mbps for HD DVD and 1.7 Mbps / s for Blu-ray).

What are the differences between MP3, FLAC and other audio formats? Part 2

What are the differences between MP3, FLAC and other audio formats? Part 2

FLAC vs MP3

Lossless formats: FLAC, ALAC, APE

FLAC vs MP3

Free Lossless Audio Codec, Apple Lossless Audio Codec, and Monkey’s Audio are all formats that compress audio in the same way as anything compressed in the digital world: using algorithms. The difference between compressed files and FLAC files is that FLAC is specifically designed for audio and therefore has a higher compression ratio without loss of data. It usually sees about half the size of the WAV. In other words, a FLAC file for “CD” quality stereo sound runs at approximately 5MB per minute.

On the plus side, if you want to do some audio manipulation, you can convert back to WAV with no quality loss. If you are a music lover and listen to a lot of music with dynamic ranges, these are the formats for you. If you have a large set of speakers, cans, or headphones, these formats will display tones for display.

Lossy formats: MP3, AAC, WMA, Vorbis

Most of the formats you see in everyday use are “lossy”; a certain degree of sound quality is sacrificed for a significant increase in file size. Average “CD quality” MP3 runs at around 1MB per minute. A big difference compared to PCM, right? It’s called compression, but unlike lossless formats, you can’t get that quality back if you understand lossy formats. Different lossy formats use different storage algorithms, so they generally differ in file size for comparable quality. Lossy formats also use bit rate to indicate audio quality, which is typically viewed as “192 kbps” or “192 kbps.” The higher the number, the more data is pumped in, so more detail is preserved.

MP3: MPEG 1 Audio Layer 3, the most common lossy audio codec today. Despite a ton of patent issues, it’s still incredibly popular. Who doesn’t have MP3 files?
Vorbis – A free, open source and lossy format that is most commonly used in PC games like Unreal Tournament 3. FOSS fans like many Linux users are sure to see a lot of this format.
AAC – Advanced Audio Coding, a standardized format now used with MPEG4 video. It is actively supported due to its DRM compatibility (such as Apple’s FairPlay), its improvements over mp3, and because no license is required to transmit or distribute content in this format. Apple fans will probably have a lot at AAC.
WMA: Windows Media Audio, a lossy audio format from Microsoft. It was designed and used to avoid MP3 licensing issues, but due to major enhancements and DRM support and lossless implementation, it still exists. It was very popular before iTunes became the DRMed music champion.
Lossy formats are what you use for everything you listen to and store. They are designed to save space on your hard drive. The format you choose depends on the type of digital audio player you are using, how much space you have, what quality objections you have, and a bunch of variables. Computers will play anything these days, most audio players (except of course Apple) support various lossy formats and more and more FLAC and APE. Apple sticks to MP3, ALAC, and AAC.

Is the sound quality subjective?

This is absolutely true. Ultimately, your ears consume most of your belongings, but this is another reason to give serious thought to quality. When I started to build my digital music collection, I couldn’t understand the difference between 128Kbps MP3 and Audio CD. In my opinion, there was not a noticeable difference. However, over time, I realized that 256 kbps sounds a lot better, and after getting some really good (and expensive!) Headphones, I went back to the Audio CD! It also depends on the musical genre.

There are a lot of variables here guys, make no mistake about it. It was a while before I decided to use FLAC for music and 320kbps MP3 for the rest. The point I’m trying to emphasize is that you have to experiment to see what works best for you and your music, but remember that as your tastes, your perceptions, your gear, and the importance of quality change. will also be.

And it all gets even more complicated when it comes to not only music, but also voice tracks, sound effects, white and brown noise, etc. There is a whole world of sound, so don’t be discouraged! If you learn what you can and listen to yourself, you can use this information in your future audio projects. I leave you with some of the best advice I’ve ever received: “do what sounds good.”

What are the differences between MP3, FLAC and other audio formats?

What are the differences between MP3, FLAC and other audio formats?

FLAC vs MP3

Digital audio has been around for a long time, so many audio formats can certainly be found. Here are some of the most common, what sets them apart and what to use them for.

FLAC vs. MP3

Before talking about everyday audio formats, it is important to understand the basics, what it means to understand PCM. After that, we will tackle compressed formats.

PCM audio: where it all begins

Pulse code modulation was created in 1937 and is the closest approximation to analog sound. That is, the analog signal approaches at regular intervals. PCM has two properties: sample rate and bit depth. The sample rate measures the frequency (per second) that the amplitude of the signal is taken and the bit depth measures the possible digital values. In terms of audio formats, this is pretty much the base.

True sound in the real world is continuous. This is not the case in the digital world. In some ways this is more confusing for audio than video, so let’s take a look at the video for comparison. What we interpret as “movement” or think as “fluid” and in constant motion is actually a series of still images. Also, the amplitude of digital sound waves is not “smooth” or constantly changing. It changes based on certain criteria at predetermined intervals.

I know there are a lot of things here that might not be second nature unless you’re an engineer, a physicist, or an audiophile, so let’s make a little analogy.

Let’s say the water coming out of an open tap is your “analog” sound source. We can compare the temperature of the water with the amplitude of a sound wave; It is a property that must be measured in order to enjoy it properly. Sampling is the number of times per second that you place your finger in plain water. The more often you put your finger on it, the more “continuous” the temperature changes will be. If you put your finger in running water 44,100 times per second, it’s like keeping your finger there all the time, right? This is the basic idea behind sampling.

Bit depth is a bit trickier. Instead of using your finger, let’s say you actually used a thermometer. Basically it said “Hot” for anything above room temperature and “Cold” for anything below. No matter how many times you put it in the water, it won’t give you much useful information. Now if instead of two choices, let’s say a thermometer has 16 possible values ​​that you can use to measure the temperature of the water. More useful, right? Bit depth works in the same way, as higher values ​​allow more dynamic changes in the amplitude of the sound to be accurately displayed.

As mentioned above, PCM is the foundation of digital audio, along with its variants. PCM tries to simulate the waveform of glory uncompressed as much as possible. It’s special, it’s ready to get stuck in a DSP and more or less universally playable. Most other formats manipulate the audio using algorithms, so they need to be decoded during playback. PCM audio is considered “lossless”, it is not compressed and therefore takes up a lot of hard disk space.

Uncompressed packet: WAV, AIFF

Both WAV and AIFF are PCM-based lossless audio container formats with minor changes to the data store. PCM audio for most people comes in these formats, depending on whether you are using Windows or OS X, and they can be converted to each other without any degradation in quality. Both are also considered “lossless”, they are uncompressed and a stereo PCM (2ch) audio file sampled at 44.1 kHz (or 44,100 times per second) with 16 bits (“CD quality”) is approximately 10 MB for a minute. If you are recording

Cables for digital audio. (Part 2)

Cables for digital audio. (Part 2)

Coaxil

Coaxial cable

Coaxial

• What are you doing? Digital coaxial cable resembles standard analog RCA cables, however standard audio connections should be avoided to carry coaxial digital signals. This type of cable is specially designed for the transmission of digital signals and offers an impedance of approximately 75 ohms, a wider frequency range and a superior signal transmission. Like the optical, it also supports surround sound and can only stream 5.1ch audio. The sound quality transmitted by coaxial and optical cables is roughly the same, although many lovers of pure sound prefer coaxial cable for connecting high-performance components.

• When to use it? Digital coaxial cable, along with optical, ranks second after HDMI. Although coaxial connections are not used as often as optical connections, they are still a great way to get surround sound from your DVD player or cable TV to your receiver.

• What should I pay attention to? When looking at the specs, make sure the cable has an impedance of 75 Ω. A copper braid is also needed, not aluminum, as it conducts the signal better and provides higher performance, and is safer for you according to http://www.medkrug.ru.

Analog audio connection
Most people are not familiar with this type of connection. You’ll typically see a simple red and white stereo connection with two channels, although some components offer XLR and multi-channel analog connections.

• What does XLR do? This type of connection is used primarily with professional audio equipment that requires “balanced” audio. The connector has three pins: one for the positive conductor, one for the negative conductor, and the last one for the ground or shield connection. When the amplifier receives signals from an XLR cable, it compares the signals received from each source and rejects any differences that indicate interference. Therefore, the XLR is less sensitive to external noise sources and is optimal for situations where exceptional sound quality is required over long distances. XLR connections are used primarily for analog audio audio, but digital XLR cables are also available.

• When to use it? XLR is suitable for high-performance home audio broadcasts, such as compatible preamps and power amplifiers that have XLR connectors. They are commonly found in professional audio equipment, especially microphones, that require “phantom power” – an electrical charge passes through a grounded wire and activates the internal microphone preamps.

• What should I pay attention to? Choose insulated cables to prevent unwanted signals from interfering. It is also important that the cables are well shielded to avoid interference. And conductors with copper, gold or silver centers will provide the best signal transmission.

• What are you doing? The multichannel analog audio cable uses six to eight RCA cables to carry a full 5-7 channels and one channel of low-frequency audio.

• When to use it? If you don’t have an HDMI-compatible receiver, this may be your only option for high-definition Blu-ray surround sound. This setup uses the player’s internal surround decoder and outputs the signal similar to a Home Theater compatible player. Multi-channel outputs can be found on DVD players.

• What should you pay attention to? Good sound quality requires a copper center conductor, double or triple shielding, and a gold-plated high-pressure RCA connector.

• What are you doing? This is the most basic audio connection. Two channel analog audio cables carry two channels of stereo sound. The cable is usually packaged with audio components, and these are generally made of inexpensive materials: two unshielded audio cables with red and white RCA plugs on each end.

• When to use it? This is the most common type of cable for making stereo audio connections between home theater components.

• What should you pay attention to? Choose cables with a copper center conductor, double or triple shielding, and gold-plated RCA plugs.

Cables for digital audio.

Cables for digital audio.

HDMI

Quality cables preserve the dynamic and precise sound of the original recording. Even good cables cannot improve or extend the quality of the sound that is recorded on the disc.

HDMI Cable

But poor quality cables can limit the frequency, as a result of which the sound will be flat and not animated. Therefore, when purchasing audio cables, the following will suit you:

– Cables with an oxygen-free copper center conductor (OFC) as they almost guarantee that the signal is not lost.

– The best shielding you can find is cables that include two separate shields: one braided copper for RFI shielding and one foil for EMI shielding. This will help protect the signal from noise and contamination.

– Good connectors that provide constant high pressure contact with the receiver sockets. If the cables you choose have metal plugs, look for gold-plated to prevent corrosion and reliably maintain a high-quality signal.

Digital audio connection
This connection should be your top priority when it comes to sound. It generally provides the best audio quality, including the ability to reproduce surround sound. Here are three main types of audio cables.

• What does HDMI (High Definition Multimedia Interface) do? This type of cable can carry high definition video and audio, while all information is transmitted over a single cable. It uses a 19-pin connector to transfer digital video and audio signals between components, eliminating the threat of loss of audio quality caused by digital-to-analog and reverse conversions. This cable is capable of transmitting surround sound and supports up to 8 channels of super high quality “lossless” soundtracks, including the latest Blu-ray high definition audio formats such as TrueHD Dolby and DTS HD ™ Master Audio.

• When to use it? Whenever you connect an HD source to your home theater, such as a Blu-ray player, HD cable or satellite TV, or a game console.

• What should you pay attention to? The density of HDMI cables is incredibly high, so each strand must be within 1 / 20,000 of an inch to ensure the signal is displayed correctly. All cables are constructed of different materials and methods, and it is especially important to find a certified HDMI cable that transmits the signal with guaranteed quality. Remember that HDMI has undergone several changes throughout its history, including changes in audio characteristics. Make sure your cable meets HDMI standards.

• What are you doing? The optical cable transmits the digital audio signal as a pulse of light. In addition to coaxial (we’ll talk about it below), it can handle 5.1ch surround sound, but it can’t handle high-resolution audio formats from Blu-Ray discs. Today, equipment with an optical connection is more popular than coaxial.

• When to use it? Optical and coaxial digital cables are second only to HDMI. Almost all HDTVs have an optical connector for playing Dolby Digital audio with streaming output to your receiver. You will also find optical connectors on CD players, cable / satellite modulators, DVD players, and home theater players.

• What should I pay attention to? Because they use pulses of light rather than electrical pulses to transmit audio signals, optical cables are virtually immune to interference. However, it is still important to buy a quality cable as it can reduce “jitter” – small changes in the timing of digital signals that can damage sound quality. Good optical cables also tend to have tighter connectors for added resistance.

Output sound quality

Output sound quality

Sound Quality

When a digital device (PC, portable media player, etc.) plays a digital audio file (ogg, mp3, flac, etc.), the audio output is always the same regardless of the type / brand of the device, right? In this case, the sound quality should not differ. For example, I have an iPod that plays an mp3 file. If I play the same file on a different brand of media player, the audio quality should be the same as the same signal (no equalizer or audio changes).

Sound Quality

Unfortunately, the real world gets in the way – there are a number of things between you and the “perfect” signal coming from the MP3 decoder:

As you can see, user-controlled filtering (eg graphic equalizer) can be disabled.
Sound “enhancements” made in the digital domain (eg compression to make it “louder” and bass boost); this can also be disabled
Internal processing is often done at a bit depth greater than the output DAC capacity, for example 32-bit processing, but only a 16-bit DAC. So there must be a process to reduce the bit depth. This may or may not include blurriness. The results of this will sound different depending on the implementation.
D / A converters can be of different qualities, which will affect (among other things) the linearity and noise floor of the analog output.
Synchronizing the DAC’s power will also affect performance – higher fluctuation will be louder.
The headphone controller will also have different analog characteristics, for example. minimum noise level, tinting frequency, etc.

For the quality of the output signal to be the same, not only must the final digital signal be the same, but the path from the digital data to your ear must also be the same (D / A converter including any digital pre-processing , amplification, induced noise in analog wiring). transducers / speakers, spatial paths to the ear, etc.) should not add any audible difference. This may or may not be true. Not all DACs are equally linear. Not all amplifier power supplies have the same shielding (especially the really cheap ones). Etc.

WAV or FLAC are lossless, so digital data must be identical when sent to a DAC. However, lossy formats like MP3 and OGG do not store the signal. It must be reconstructed from rarer data and the decoder may interpret the data differently. However, for MP3:

Decoding, on the other hand, is carefully defined in the standard. Most decoders are “bitstream compliant”, which means that the uncompressed output, which they produce from a given MP3 file, will be the same, within a certain degree of rounding tolerance, as the mathematically specified output in the ISO / IEC high standard document (ISO / IEC 11172-3). Therefore, the decoder comparison is generally based on their computational efficiency (that is, how much memory or CPU time they use in the decoding process).

So assuming the EQ and other enhancements are off, as you said, there shouldn’t be any difference between the file and the DAC. The only differences will be after the DAC in the quality of the analog circuits, amplifiers, and speakers (which are usually the main reason for the differences anyway).

Digital audio formats: how to choose the best one (Part 2)

Digital audio formats: how to choose the best one (Part 2)

Digital Audio

The higher the bit rate, the better the sound quality. For example, at a bit rate of 128 kilobits per second, five minutes of music will require only about five megabytes on a hard drive or flash drive. The optimal bit rate for storing MP3 music files is believed to be 256 or 320 kilobits per second.

Digital Audio

Another popular lossy compression format is OGG Vorbis. Unlike MP3, it was originally free and open source, so it quickly gained popularity among independent developers. In terms of quality, it is in no way inferior to MP3, although it does use its own psychoacoustic model for file compression.

WMA is a lossy audio compression format developed by Microsoft Corporation. It can be found on any Windows operating system, but it is not very popular with users. Another relatively common lossy audio compression codec is AAC, which differs from MP3 in slightly less quality loss at the same bit rate.

Audio codecs for music lovers
Newer formats provide lossless audio compression. The most popular among users is the free FLAC format, introduced in 2001. FLAC is perfect for archiving your audio collection, as well as for listening to music on high-quality sound reproduction equipment.

In so-called lossless codecs, encoded data can always be retrieved with bit precision. The encoding is carried out using a mathematical scheme: a certain regularity is found in the initial data and, taking this regularity into account, a second sequence is generated, which fully describes the original.

The second most popular lossless compression format is Monkey’s Audio, which is distributed as free software for Microsoft Windows. The WavPack format has support for multi-channel streaming and a slightly better compression ratio. Apple introduced its own lossless ALAC codec in 2004, which resembles FLAC.

Digital audio has huge advantages over analog files. The user can store and replicate their material for an infinitely long time without losing the original quality. At the same time, storing the “digit” is more cost-effective, because it takes up much less physical space, unlike a collection of records or cassettes.
Thus, a powerful ZIP archiver can compress a WAV file by only 10-20%, while FLAC achieves compression rates of 30-50% for most audio files. At the same time, the audio codec allows the recovery of partially corrupted data and the decoding process itself is very undemanding on processor resources.

To archive your music collection, it is now optimal to use lossless compression formats, for example FLAC, which is supported by most players. However, to store audiobooks, where high fidelity of the original sound is not required, you can use cheaper MP3 or OGG.

Digital audio formats: how to choose the best one

Digital audio formats: how to choose the best one

Digital Sound

Most users store music and other audio files in various digital formats. There are about a hundred digital audio encoding algorithms, but they all have their own characteristics. What format to choose to store your home audio collection and why is the well-known MP3 losing popularity?

digital sound

Analog audio is a wave. Almost every process in our world can be described using mathematics. Digital audio is the description of an analog waveform using a sequence of numbers. For example, more than 44,000 digital values ​​are used to digitize one second of music on a CD.
How digital sound was born
The theoretical foundations of digital sound in 1928 were laid by Harry Nyquist in his work “Certain problems in the theory of telegraphic transmission”, where for the first time it was possible to determine the “width” of the communication line for the transmission of a signal pulse without distortion. Regardless of the American, the Soviet scientist Vladimir Kotelnikov published similar studies in 1933.

Kotelnikov and Nyquist independently discovered that restoration of any analog signal can be guaranteed using a certain mathematical algorithm from discrete samples, that is, fragmentary data. So instead of full data for the sake of economy, you can encode only a small part, and then restore the original.

They began to digitize analog sound using pulse code modulation; today this technology is still the most widespread. The sound wave is converted into numbers by three sequential operations: time sampling, amplitude quantization and final coding. Battery calibration: how to extend the life of the smartphone

What is sampling? This is a sample of values ​​at regular time intervals. The algorithm reads the levels of the analog waveform at an incredible speed: 44,100 readings per second for the CD standard. This indicator is called the sample rate. For example, audio in movies is standardized to a sample rate of 48,000 Hertz.

To achieve this speed, all values ​​are slightly rounded to previously calculated values. This process is called quantification. The more often the algorithm reads the readings, the better the digital recording will sound. However, microscopic quantification error is unavoidable.

Computers use memory to store information – billions of tiny electrical switches that can only be in two positions: on or off. The position of one of those switches is a bit informative. The CD standard provides 16 bits for audio, which provides 65,536 different values ​​for encoding.

How are digital audio formats different?
Digital sound is a very long sequence of numbers. However, these numbers can be encoded in different ways. For example, on a CD, music files are stored in WAV format. Its main problem is that it takes up too much space, since all the information is digitized without using compression algorithms.

To reduce the amount of space taken up, mathematical algorithms have been invented – audio codecs that compress digital audio data according to certain psychoacoustic models. However, there are two main types of compression: lossless compression and lossy compression.

The most famous lossy compression format is MP3. Its developers have relied on the fact that the human ear is imperfect and a lot of redundant information is transmitted in uncompressed sound. The algorithm divides the entire frequency spectrum into small parts and then eliminates sounds that are practically not perceived by humans.

The quality of MP3 files is irretrievably degraded compared to the original, but the file itself can be 10 times “lighter” than the original. In this case, the user can choose the degree of compression of the file. For this, there is a bit rate; in fact, this is the space needed to store one second of music.