Data lost due to compression is irreversible


Free Download Mp4Gain
picture

Data lost due to compression is irreversible

Audio Compression

In this series, we will focus on the basic knowledge about “sound” that is necessary for video production, and we will make it easy to understand by omitting small and difficult things as much as possible, such as a little general knowledge and sound, including music. . I look forward to delivering it, so I look forward to working with you!

Audio Compression

Now, let’s talk about the first memorable event under the name [Digital Audio Basics]. There are several types of digital audio. Among them, I have summarized the main ones.

[Format types and functions]
◉ Uncompressed format: linear PCM (WAV, BWF, AIFF)
→ The most basic format for digital audio. BWF is a commercial WAV that can contain metadata.

◉ Lossy compression format: P3, AAC (MP4), MQA, etc.
→ Format used mainly for general purposes. In many cases, the information in the uncompressed data is shrunk and compressed. The data capacity is reduced, but the sound quality also deteriorates accordingly. MQA is a new format that is irreversible in terms of data, but reversible in terms of sound quality.

◉ Lossless compression format: FLAC, ALAC, etc.
→ Format mainly used for high-quality listening. It has the reversibility of being able to reproduce exactly the same sound quality as before compression, but the data capacity is not that small.

◉ Others: DSD (DSF, DSDIFF, etc.)
→ It is also called 1-bit audio, but since the concept is fundamentally different from multi-bit audio like linear PCM, it can be compared to “24bit” WAV, etc. in the same line I have not. Currently, it is one of the highest quality formats, but it has the weakness of not being editable.

How is it? I think there are several things, from the familiar ones to the ones you see for the first time, but among them, the one that is most suitable for today’s video production is “Linear PCM”! The reason is as follows.

1. Since it is an uncompressed format, it has excellent sound quality.

2. You can edit like cut and paste.

3. The digital voice tracker is the most popular Ma ‘around the world because the bet, any device, can be managed by software.

Since MP3 and AAC (MP4) are compressed formats, there is a considerable loss in sound quality. Depending on the compression ratio, it may not be obvious at first glance, but it is not suitable as processing-based material such as video production and music production. FLAC and ALAC are lossless compression formats that do not deteriorate sound quality, but do not significantly reduce capacity, and there is no software that can be edited natively (without conversion to other formats), so it is still unsuitable for the production. . DSD was adopted from SACD which appeared in 1999, and is said to be the most analog digital audio today, and it has a smooth texture that is different from linear PCM in terms of sound quality. This format has finally attracted attention in recent years, but due to its mechanism, it has the weakness that it cannot be edited as is, so on the production site, mainly one-shot music recording (recording without editing) and mixing (long-playing recording without editing) and mixing (often used as a master recorder when combining multiple sounds into one stereo or surround sound (also called track down). “Almost Ichi 択 linear PCM” video production, I think I could understand that you can refer to. Of course, if the compressed format does not make you uncomfortable, you can use it, but consider it as an emergency. If you still want quality, you must use linear PCM. The data lost by compression is irreversible. The file that will be the master of the work must be of the highest possible quality. By the way, whether you use WAV or AIFF, the sound quality is almost the same. However, co Considering compatibility, even Mac users can be relieved to use WAV for data transfer.

“16 bit / 44.1 kHz” is
the lowest line of CD quality

Now let’s dive a little deeper into linear PCM. There are “number of quantization bits” (bit depth) and “sample rate” (sample rate) that represent linear PCM specifications. Have you ever seen the notation “16 bit / 44.1 kHz”? This means that the original (analog) audio is sampled (digitized) 44,100 times per second at the 16-bit volume stage (2 raised to 16 = 65,536)! Still, I think it’s “what is this?”, So I tried to sum up the points by comparing it to the video!


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Methods of compression and compression of audio signals Part 3

Methods of compression and compression of audio signals Part 3

Audio Compression

The most popular compression format today is MP3.

The MP3 (MPEG Layer 3) format was developed, after several intermediate formats, by the Fraunhofer Institute in Germany. Actually, the .MP3 format relies on fooling the human ear. After some research, it turned out that human hearing tends to adapt to the appearance of new sounds, which is expressed in an increase in the hearing threshold. Therefore, some sounds are capable of masking (that is, making them subjectively inaudible) others. So in this format, some of the sounds that, according to the corresponding theory, are made inaudible, are simply removed from the general sound. The resulting “semi-finished product” is then encoded using the Hoffman method. Be sure to note that in the MP3 format, programs that compress the sound of the original are not standardized, that is, each competent programmer can implement their own compression scheme. And only the decoders obey the standards, which leads to the fact that the quality of MP3 playback does not always depend on the player that plays this file. Due to the different abilities and predilections of implementers of various encoders, some of them are better at handling symphonic music, some at rock and metal, some at rap and rave, etc.

JointStereo, which is one of the features of MP3, means that instead of encoding stereo as two independent channels, it encodes the call. center channel and the difference from the original stereo channels. Many stereo channel audio components are the same, and encoding them on the common channel allows you to free up additional bandwidth for more detailed encoding of the difference, leading to improved quality.

Be sure to mention the variable bit rate or VBR. This means that the encoder changes the compression ratio on the fly, depending on the nature of the sound. This approach results in a reduction in the final file size or, if quality requirements increase, the same file size produces better sound.

MP3 Pro – Introduced in 2001, the MP3 Pro codec was developed by Coding Technologies in association with Thomson Multimedia. It is MP3 based and as a result it turned out to be fully MP3 backward compatible and only partially forward compatible. It uses SBR (Spectral Band Replication) technology, so the codec provides good quality at low bit rates. However, the encoding quality at medium to high bit rates is inferior to almost all other codecs. As a result, MP3 Pro is used more for streaming on the Internet and demonstrating snippets of new musical compositions.

The MPEG-4 audio standard does not require a single or small set of highly efficient compression schemes, but rather a complex set to perform a wide range of operations, from low-quality speech coding to high-quality music and audio synthesis.

The MPEG-4 family of audio coding algorithms ranges from low quality voice (up to 2 kbps) to high quality audio (64 kbps per channel and higher).

RAW – Yes, it is not just the image format in which some digital cameras write photographs. In fact, RAW is the so-called. “Pure digitization”, which does not contain a title and contains only a sequence of samples of a sound wave. Typically, the scan is stored in 16-bit format.

Shorten is one of the first lossless codecs to appear. For a long time the project “slept sweetly.” However, in 2007, it began to develop again.

TTA (True Audio) – Finally about the most interesting. TTA is being developed by a team of our compatriots. And, I must say, the result of their work is impressive. All in order.

The codec is still quite young, but despite this it contains all the necessary features. We won’t list them again, we’ll just note that the format only lacks support for streaming audio over the network.

The format is open, as well as the source codes of the encoder program. There are compiled versions for Mac and Linux. There should be no compatibility issues during playback either, because there are already plugins for all popular players, as well as DirectShow filters for Windows Media Player. There is a plugin for Adobe Audition, which is important for musicians. For the past 4 years, hardware support has even appeared on players!

WAV – This is the primary audio format for many, many digital audio playback systems and is used as a standard audio file format on personal computers.

Compression and compression methods for audio signals Part 2

Compression and compression methods for audio signals Part 2

audio compression

FLAC is a member of the Xiph.Org codec family. By the way, it also includes the well-known ogg vorbis, one of the best lossy music compression algorithms. As a container for audio data, of course, OGG (files with the extension .ogg) and another open source container – Matroska (files with the extension .mka) are used.

It should be noted right away that both the FLAC format and algorithm are fully open. They are not patented, so they can be used completely free of charge in any program. This is the reason for the wide support for FLAC in players – any serious gamer has a plugin for FLAC. In addition, there are hardware mp3 players that support the FLAC codec.

The FLAC encoder is compiled for most platforms in use, so there should be no compatibility issues on alternative Windows operating systems.

FLAC supports tags in its own “FlacTags” format. There is the ability to encode multi-channel audio, a great advantage over Monkey’s Audio. The format supports any sample rate in the range of 1 Hz (!) To 65,535 Hz. Audio bit depth from 4 (!) To 32 bits.

FLAC is believed to be the most efficient use of system resources when decoding (playing) audio compared to other lossless codecs. Unfortunately, this is achieved at the expense of a significant increase in encoding (compression) time.

The FLAC website is regularly updated and new versions of the codec are released. Overall, FLAC is without a doubt the leader in terms of development activity. This may make it the main format in the future. Well, let’s see …

FLAC is the best option for storing high quality music.

MIDI (Musical Instrument Digital Interface) is a standard for hardware and software that allows you to play (and record) music by executing / recording special commands, as well as the format of the files that contain those commands. The playback device or program is called a MIDI synthesizer (sequencer) and is actually an automatic musical instrument.

Unlike other formats, it does not store the digitized sound, but sets of commands (played notes, links to played instruments, variable sound parameter values) that can be played differently depending on the playback device. The convenience of the MIDI format as a data representation format enables devices that produce automatic arrangements according to given chords, as well as 3D sound visualization applications. Additionally, these files tend to be orders of magnitude smaller than digitized audio of comparable quality.

Monkey’s Audio is a popular lossless digital audio encoding format. Distributed for free along with open source and a suite of encoding and playback software, as well as plugins for popular players. Monkey’s audio files use the following extensions: .ape to store audio and .apl to store metadata. Despite being open source, Monkey’s Audio is not free, as its license imposes significant restrictions on its use.

Audio files compressed with the Monkey audio codec have the extension ‘APE’; As you can see, the monkeys are present not only in the logo or the name (from English monkey: monkey, primate).

The average bit rate in an audio file is 600 to 700 kbps; compare with 128 kbps in MP3. Average compression is 40-50%, depending on the genre of music: if classical or jazz pieces are compressed in the best way, then compositions in the style of trash-metal or something similar “electronic noise” will show the worst result. . For codecs with acceptable quality loss, compression is approximately 80%.

There are four levels of compression. Maximum compression may seem like the only correct solution, although the compression time is quite long. However, you must also take into account the resource consumption of the system that plays the file; for the most compressed file, it is relatively high.

The .APE format provides tag support for searching for songs in your music collection. Another advantage is the verification of the integrity of the file during decoding. Recovery of original compressed .APE wav files is supported.

Monkey’s Audio has a graphical interface for Windows, in other words, a convenient window program to manage the encoding process. The rest of the codecs require the use of the command line or third-party interfaces.

Compression and compression methods of audio signals

Compression and compression methods of audio signals (types, differences, use)

Audio Compression

Basics of the analog-to-digital conversion principle, sound conversion and compression method, existing sound storage formats. Programs to convert and process sound and audio files. Application of these programs in linguistic research.

Bit rate is the amount of information per unit of time. In general, the bit rate is the number of bits that we spend encoding a sound with a duration of 1 second.

Analog-to-digital converter (ADC): A device that converts an input analog signal into a binary code (digital signal). The reverse conversion is done using a DAC (digital-to-analog converter, DAC). Typically, an ADC is an electronic device that converts voltage into a binary digital code. However, some non-electronic devices with digital output must also be classified as ADCs, such as some types of angle-to-code converters. The simplest one-bit binary ADC is a comparator.

The circuit to convert an audio signal from analog to digital:

Sampling is the transformation of continuous images and sound into a set of discrete values ​​in the form of codes.

Quantization is the process of aligning a set of musical notes to a grid.

Compression (compression) of audio data is a process of lowering the bit rate by reducing the statistical and psychoacoustic redundancy of a digital audio signal.

The underlying idea behind all lossy audio compression techniques is to neglect the subtle details of the original sound that are beyond the reach of the human ear.

Codec (CoDec) is an abbreviation for compressor and decompressor. Basically, a codec is a collection of files, drivers, and libraries required to package a video or audio file into a compressed format and play the compressed file.

Formats:

AAC (Advanced Audio Coding) is an audio file format with less quality loss when encoding than MP3 of the same size. The format also allows you to compress without losing the quality of the source (ALAC AAC profile).

AAC (Advanced Audio Coding) was originally created as a successor to MP3 with improved encoding quality. The AAC format, officially known as ISO / IEC 13818-7, was released in 1997 as the new seventh part of the MPEG-2 family. There is also the AAC format known as MPEG-4

Apple AIFF: This file type is standard for Apple Macintosh systems and sound processing systems built on top of it. Apple AIFF stands for Audio Interchange File Format, an audio interchange file format, it is somewhat similar to WAV. Its peculiarity is that it allows you to place additional information along with the sound wave, in particular WaveTable samples (examples of the instrument sound together with synthesizer parameters), which improves the quality of the final result. Although today Apple computers are capable of playing files of almost any format, including MP3.

FLAC (Free Lossless Audio Codec) is a popular free codec for audio compression. Unlike lossy Ogg Vorbis, MP3 and AAC codecs, it does not remove any information from the audio stream and is suitable for both daily listening and archiving of audio collection. Today, the FLAC format is compatible with many audio applications.

Digital audio compression methods

Digital audio compression methods

audio compression

Lossless compression

AUDIO COMPRESSION

Generally speaking, the meaning of lossless compression is as follows: some pattern is found in the original data, and taking this pattern into account, a second stream is generated, uniquely describing the original. For example, to encode binary sequences in which there are many zeros and few ones, we can use the following replacement:

00> 0
01> 10
10> 110
11> 111

In this case, sixteen bits:
00 01 00 00 11 10 00 00

will be converted to thirteen bits:
0 10 0 0 111 110 0 0

If we write a compressed string without spaces, we can still add spaces in it, which means restoring the original sequence.

FLAC (Free Lossless Audio Codec)
Coding principle: the algorithm tries to describe the signal with this function so that the result obtained after subtracting it from the original (called difference, remainder, error) can be encoded with the minimum number of bits.

When the model is fitted, the algorithm subtracts the approximation from the original to obtain a residual signal (error), which is then losslessly encoded.

Lossy compression (MP3, AAC, WMA, OGG)
Using a lossy compression algorithm, the size of an MP3 file with an average bit rate of 128 kbps is approximately 1/11 of the original file of an Audio CD (uncompressed audio in CD-Audio format has a rate bit rate of 1411.2 kbps). MP3 files can be created at high or low bit rates, which affects the quality of the result.

The principle of compression is to reduce the precision of some parts of the sound flow, which is almost indistinguishable for most people. The audio signal is divided into segments of equal length, each of which, after processing, is packed into its own frame (frame). Spectral decomposition requires continuity of the input signal; therefore the table above and below are also used for calculations. The audio signal contains harmonics with a lower amplitude and harmonics that are close to the strongest; Such harmonics are cut off, as the average human ear will not always be able to determine the presence or absence of such harmonics. This characteristic of hearing is called the masking effect. It is also possible to replace two or more nearby peaks with an averaged one (which, as a rule, leads to sound distortion). The cutoff criterion is determined by the outflow requirement. Since the entire spectrum is relevant, the high-frequency harmonics are not cut off, but are only selectively removed to reduce information flow due to spectrum sparsity. After spectral removal, mathematical compression and frame packing methods are applied.

Masking effect
In certain cases, a sound can be hidden by another sound. For example, talking near the railroad tracks can be completely impossible if a train passes. This type of effect is called masking. A weak sound is said to be masked if it becomes indistinguishable in the presence of a louder sound.

Simultaneous masking
Any two sounds when heard simultaneously have an impact on the perception of the relative volume between them. A louder sound reduces the perception of a weaker one, until the disappearance of your hearing. The closer the frequency of the masked sound is to the frequency of the masker, the more it will be hidden. The masking effect is not the same when the masked sound is shifted down or up in frequency with respect to masking. Low-frequency sound masks high-frequency sound. However, it is important to note that high-frequency sounds cannot mask low-frequency sounds.

Time masking
This phenomenon is similar to frequency masking, but time masking occurs here. When the masking sound is stopped, the masking remains inaudible for some time. Under normal conditions, the temporary masking effect lasts significantly less. The masking time depends on the frequency and amplitude of the signal and can be up to 100 ms.
In the case where the masking tone appears at a time after masking, the effect is called post-masking. When the masking tone appears before the masking (this is also possible), the effect is called premasking.

Post-stimulus fatigue
Often after exposure to loud, high-intensity sounds, a person’s hearing sensitivity drops dramatically. Recovery to normal thresholds can take up to 16 hours. This process is called “temporary change in hearing sensitivity threshold” or “post-stimulus fatigue.”

What audio formats are compatible with iPhone, iPad, iPod?

What audio formats are compatible with iPhone, iPad, iPod?

Iphone

Now there are far fewer such questions on the net, but before in many forums people asked before buying an iPhone: “What audio formats are compatible with iPhone, iPad, iPod?”

Apple Music

iPhone and iPad support the following audio file formats:
AAC (8 to 320 kbps), AAC (from iTunes Store), HE-AAC, MP3 (8 to 320 kbps), MP3 VBR, Audible (formats 2, 3, 4, Audible Enhanced Audio, AAX and AAX +) , AIFF and WAV, Apple Lossless (ALAC).

Most of the time iPhone and iPad users prefer MP3 and ALAC (Apple Lossless) formats, which they download from trackers, so there is practically no problem to copy music to iPhone, iPad.

What is Apple Lossless (ALAC) and how is it different from FLAC?
A few separate words should be said about the rather unusual Apple Lossless (ALAC) – this is an analog of the FLAC audio codec. Apple Lossless was specially designed by Apple to ensure that the user can enjoy the highest quality music while keeping battery consumption within reasonable limits.

Apple Lossless (ALAC) does not require high performance, so you can listen to music without quality loss, even on old iPod Nano. Apple takes great care to ensure that its devices can work for a long time without recharging, which is why we have a FLAC analog in the person of Apple Lossless.

In what format is it better to listen to music? PART 4

In what format is it better to listen to music? PART 4

Audio File Format

What has changed today

AUDIO FORMATS

A rare sound engineer makes a digital master recording (which is then played back on physical media), using modern technologies to the full. So the chance that a 24-bit track is actually only 16-bit is extremely high.

High-quality analog recording on high-end gear is even harder to find today, if only for fans of this sound. Such is, for example, Jack White, the former leader of the White Stripes. At the same time, some of his recordings reference lo-fi variations, and looking for the scandalous sonic characteristics of the song becomes something of a foodie treat.

If you imagine an ideal source, only the trained ear or listening on high-quality audio equipment will allow you to find a compressed file. And already based on this (and without forgetting perception), it is worth drawing the following conclusion:

AAC is necessary and sufficient for medium-priced equipment, in the absence of which (and in the absence of sources that can be encoded in AAC) – MP3 with a constant 320 kbps bit rate, created with the Lame 3.93 codec (recommended keys for decoding: -cbr -b320 -q0 -k -ms).

The exceptions are recordings originally recorded in high quality, say, recorded on DVD-Audio, SACD, or recordings originally collected in DSD (or similar format) with a high bit rate.

Although without losses it has some characteristics. And we will tell about them next time.

The author does not like Apple. The author greatly appreciates the achievements of the Fraunhofers and was greatly surprised to learn that AAC is his work. 🙂

In what format is it better to listen to music? Part 3

In what format is it better to listen to music? Part 3

audio formats

Due to its advanced age, MP3 has significant limitations: the bit depth can be 16-24 bits, the sample rate is expressed only in discrete values ​​(8, 11,025, 12, 16, 22.05, 24, 32, 44.1, 48), the bit rate is limited to 320 kbps. Also, in the normal version of MP3, the number of channels is limited to two.

audio formats

AAC
The same rake, only in profile. Also developed by the Fraunhofer Society. Later and uses a different, more modern psychoacoustic model. The publicly available information allows us to conclude: yes, they managed to improve their own creation.

Even with the simplest numbers, AAC is a more flexible format. The bit depth of the files obtained with the help of this development varies from 16 to 24, the sampling frequency, if desired, will also allow not to lose the sound image and is in the range of 8-192 kHz. The data stream is generally close to lossless formats (up to 512 kbps), while the maximum number of AAC file channels reaches 48.

Which format is definitely the best?
Considering that AAC is MP3 reinvented after a dozen years, then the choice is in its favor. If you want, it makes sense to only compare MP3 and OGG.

On the graphics – good AudioCD, compressed OGG with 350 kbps variable bit rate and MP3 using Lame. The lower the graph, the closer the sound is to the original. It turns out to be a very interesting image. Although MP3 has clearly cut the high frequencies, unlike OGG, in which you can see a blockage below 2 kHz.

The frequency-time distribution of sound does not speak of less interesting things. At a constant 320kbps bit rate, MP3 is almost identical to the original recording. Everything seems to fit now. But … In fact, everything is even more confusing.

Why use at a loss at all when there is no loss available?
Common sense.

The fact is that most analog recordings do not contain the amount of information that would need to be stored in high-quality formats. Don’t forget that the native sample rate for CD is 44.1 kHz, the quantization is only 16 bits.

The above graphics well demonstrate the high fidelity of MP3 streaming. But for an audio cassette, magnetic tape (unless of course it is a master tape), the characteristics of an audio CD are unattainable. And for mass studio equipment, the ability to record analog sound corresponding to AudioCD has appeared relatively recently. It makes no sense to digitize in FLAC (and even more so in WAV) a concert recording or a disc from the pre-digital era, especially those made with magnetic media. They do not contain those spectra and the amount of information that containers can store without compression.

In what format is it better to listen to music? Part 2

In what format is it better to listen to music? Part 2

Audio Formats

The reference value of the audible range for humans is 16 Hz to 20 kHz, but you cannot hear and be aware of all incoming sounds simultaneously.

audio files

Hearing is discreet and your hearing sensitivity is not linear.

Modern psychoacoustic models accurately assess human hearing and are constantly improving. In fact, despite the guarantees of music lovers, musicians and audiophiles, to the inexperienced middle ear, the initial appearance of MP3 in maximum quality has become extremely noticeable. There are exceptions, they cannot cease to exist. But they are not always easily noticed by blind listening.

Formats using psychoacoustic compression models
There are many of these formats for lossy audio compression. The most common today are the following.

OGG (Vorbis)
In general, a file with the * .ogg extension is a “container”: it can contain multiple sound recordings with their own tags and characteristics. Most of the time, the files stored in it are compressed with the Ogg Vorbis codec, although others can be used, including MP3 or FLAC.

Its main advantages include a wide range of possible parameters during encoding: the audio sampling frequency can reach 192 kHz, the bit depth is 32 bits. By default, OGG uses a variable bit rate (although this is not shown on the properties screen), which can go up to 1000 kbps.

MP3
Unlike the free OGG, MP3 was developed by the Fraunhofer Society, an association of German institutes for applied research, which is very important for modern acoustics. Among audiophiles, by the way, this is an extremely respected office, yet they don’t like to admit it. But its developments are closely watched.

Unlike OGG, it can have variable (VBR) and constant (CBR) bit rate. By the way, it was thanks to MP3 that it was discovered that not all recordings can be encoded with high quality with a variable bit rate (see the above reasons, the encoding algorithms and their results in this case may be different when encoding the same source ).

In what format is it better to listen to music?

In what format is it better to listen to music?

Lossy compression

Understanding digital audio formats is not easy. It is even more difficult to come to an unequivocal conclusion in which format it is better to listen to music.

Lossy Formats

If you look at the audio format comparison table on Wikipedia, your eyes will start to flutter with columns of silent numbers. Let’s try to find out what’s behind this.
In what format is it better to listen to music? Three lost whales
Share this
sixteen
Let’s make a reservation right away that the article talks ONLY about general characteristics and will not include some details. Moving forward, Lifehacker will conduct its own unbiased investigation. And today we will try to generalize the already known experience in one way or another.

There is an analog and a figure.

The analog is good, but short-lived and inconvenient. Therefore, analog media, despite high vinyl sales, will not be making a comeback.

Digital audio can be of three main types:

in a format that does not use compression;
in a format that uses lossless compression;
in a format that uses lossy compression.
At first glance, lossless formats are more promising. This is not always the case, as we will discuss in more detail in one of the following materials. Uncompressed formats make no sense other than storing the master recordings needed to create audio content. They are easier to restore. Storing and listening to home recordings is superfluous.

Of the many parameters of digital audio, the user must first be concerned with sample rate (the accuracy of digitizing an analog signal in time), bit depth (the accuracy of digitizing in amplitude – volume) , the bit rate (the amount of information contained in the file in terms of one second).

Today we will talk about lossy.

For compressed sound, the concept of the psychoacoustic model is very important – the ideas of scientists and engineers about how a person perceives sound. The ear perceives the entire spectrum of acoustic waves entering it. However, the brain processes the signals.