Lossy Compression Part 3


Free Download Mp4Gain
picture

Lossy Compression Part 3

lossy compression

MPEG-1 and MPEG-2 video compression formats

lossless  compression

As an initial step in image processing, the MPEG-1 and MPEG-2 compression formats divide the reference frames into several equal blocks, which are then subjected to a floppy cosine transform (DCT). Compared to MPEG-1, the MPEG-2 compression format provides better image resolution at a higher video bit rate by using new compression algorithms and elimination of redundancy and encoding of the output data stream. . Also, the MPEG-2 compression format allows you to select the compression level due to quantization precision. For video with a resolution of 352×288 pixels, the MPEG-1 compression format provides a bit rate of 1.2 – 3 Mbps and MPEG-2 – up to 4 Mbps.

Compared with MPEG-1, the MPEG-2 compression format has the following advantages:

MPEG-2 provides scalability for various levels of image quality in a single video stream.
In the MPEG-2 compression format, the precision of the motion vector increases to 1/2 pixel.
User can select arbitrary discrete cosine transform precision.
Additional prediction modes are included in the MPEG-2 compression format.
Compression format MPEG-4

MPEG-4 uses a technology called fractal image compression. Fractal compression (contour-based) means extracting the contours and textures of objects in the image. The contours are presented in the form of so-called. splines (polynomial functions) and are encoded with reference points. Textures can be represented as spatial frequency transform coefficients (eg, discrete cosine or wavelet transform).

The bit rate range that the MPEG 4 video image compression format supports is much wider than that of MPEG 1 and MPEG 2. The new developments from the specialists are aimed at a complete replacement of the processing methods used by the MPEG 2 format. The MPEG 4 video compression format supports a wide range of standards and data transfer rates. MPEG 4 includes interlaced and progressive scanning techniques and supports arbitrary spatial resolutions and bit rates ranging from 5 kbps to 10 Mbps. MPEG 4 has an improved compression algorithm that improves quality and efficiency at all supported bit rates.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Lossy Compression Part 2

Lossy Compression Part 2

Lossy Compression

Compress audio and video

LOSSY COMPRESSION

The term “bit rate” refers to the number of bits of information transmitted per second. This term is translated into Russian in different ways in different sources. Recently, the word “bitrate”, which is new to the Russian language, is often used instead of a formal translation. The translation options are also as follows: “data stream width”, “bit stream complexity”, “stream rate”, “bit rate”. This same parameter is sometimes called the file compression rate for sound files. For example, the file is said to be compressed at 128 Kbps. The fact is that the bit rate value is directly related to the physical size of the sound file per second of sound.

All compression formats of the MPEG family use a high redundancy of information in images separated by a short time interval. Between two adjacent frames, usually only a small part of the scene changes; for example, there is a smooth movement of a small object against the background of a fixed background. In this case, the complete information about the scene is saved selectively, only for reference images. For the rest of the frames, it is enough to transmit differential information: on the position of the object, the direction and magnitude of its displacement, on new background elements that open up behind the object as it moves. Furthermore, these differences can form not only in comparison with the previous images, but also with the later ones (since it is in them, as the object moves, that the previously hidden part of the background is revealed).

The MPEG family of compression formats reduces the amount of information as follows:

Temporal video redundancy is eliminated (only difference information is considered).
The spatial redundancy of the images is eliminated by suppressing the small details of the scene.
Some of the color information is removed.
The information density of the resulting digital stream is increased by choosing the optimal mathematical code for its description.
MPEG compression formats compress only anchor frames: I-frames (intraframes). The intervals between them include frames that contain only changes between two adjacent I-frames: P-frames (predicted frame – predicted frame). To reduce the loss of information between the I frame and the P frame, so-called B frames (bidirectional frame) are introduced. They contain information that is taken from the previous and next frames. When encoding in MPEG compression formats, a chain of frames of different types is formed. A typical sequence of frames looks like this:

I B B P B B I B B P B B I B B …

Consequently, the sequence of frames according to their numbers will be played in the following order:
1 4 2 3 7 6 5 …

Lossy compression

Lossy compression

Lossy compression

Compress audio and video

lossy compression

High-quality digitized audio requires a large amount of disk space. Attempts to reduce file sizes using standard cabinets do not yield significant gains due to the specificity of the audio data. However, it is possible to achieve a fairly significant level of compression of the audio information using special methods based on the analysis of the data structure and subsequent compression with some loss.

The real possibility of sound processing comparable in quality to existing analog examples appeared only in the late 1980s. In 1988, the International Organization for Standardization (ISO) formed the MPEG (Moving Pictures Expert Group) committee, whose main task is develop coding standards for moving images, sound and their combination. During the ten years of its existence, the committee has developed a series of norms on this subject. As a result, when summarizing extensive research in this area, several specific formats were recommended for storing data, differing in the quality of the results and the data flow.

Currently, there are three most common video storage standards: MPEG-1, MPEG-2, and MPEG-4. Within the first two formats, there are also formats for storing audio information: Layer-1, Layer-2 and Layer-3. These three audio formats are defined for MPEG-1 and minor extensions are used in MPEG-2. The three formats are similar to each other, but use different levels of compression and complexity compensation. Layer-1 is the simplest, it does not require significant compression costs, but it also provides a negligible compression ratio. Layer-3 level: the most time consuming and provides the best compression. Recently, this format has gained immense popularity. It is often called MP3. This name is associated with the extension of the audio files stored in this format.

Founded idea, in which all lossy audio signal compression methods – ignore the subtle details of the original sound, which are outside of that perceived by the human ear. Here several points can be highlighted.

Noise level. Sound compression is based on a simple fact: if a person is next to a loud siren, it is unlikely that he will hear the conversation of the people who are nearby. Also, this happens not because a person pays close attention to a loud sound, but to a greater extent because the human ear actually misses out sounds that are in the same frequency range as a louder sound. This effect is called masking, it changes with the difference in volume and frequency of the sound.

The second point is the division of the audio frequency band into subbands, each of which is further processed separately. The encoding program extracts the loudest sounds from each band and uses this information to determine an acceptable noise level for that band. The best encoding programs also take into account the influence of adjacent bands. A very loud sound in one band can affect the masking effect and nearby bands.

Another point of coding is the use of a psychoacoustic model based on the peculiarities of human perception of sound. Compression The use of this model is based on the removal of obviously inaudible frequencies with a more careful preservation of sounds that are clearly distinguishable by the human ear. Unfortunately, there can be no exact mathematical formulas here. Human perception of sound is a complex process that is not fully understood, so the choice of compression methods is based on analyzing listening and comparing compressed sounds differently by teams of experts. But here there are practically unlimited possibilities in the field of improving psychoacoustic models. Most of the existing algorithms to encode the human voice are based on the high predictability of said signal; Universal MPEG compression algorithms have tried to apply this technique with variable success.

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.

Lossy compression format at a glance

Lossy compression format at a glance

lossy compression

“As you know, the music we listen to consists of a set of signals, each of which has its own characteristics, including loudness.

LOSSY COMPRESSION

The human hearing aid is designed so that we do not distinguish or poorly distinguish a weak (low) signal from the background of a strong (strong) signal. This principle forms the basis of modern means of compression (compression) of audio data.

If we imagine that a signal of a certain length is divided into many parts, and each part is processed in such a way that a weaker signal, which is difficult to distinguish from the background of a strong one, falls under the knife, and one remains a signal louder, then this will be an approximate audio compression model. Consequently, the level of data compression will depend on how many parts (samples) the original file will be divided into and how many weak signals from each individual sample will be removed (what the bit rate will be, the number of bits in a sample). sample of a specified duration). This coding principle is called lossy coding or lossy coding.

Ogg Vorbis is a completely open and patent-free audio format that allows you to store and transmit audio information with high sound quality (44.1-48.0 kHz sample rate, more than 16 bits, polyphony (multi-channel audio) ) and bit rates ranging from 16 to 512 Kbps per channel. In this case, the number of processed channels can reach 255.

MP3 or MPEG-1 Layer 3 audio is by far the most popular format for storing and transmitting compressed data. This format was developed by the Fraunhofer Institut, Germany. “Http://ru.wikibooks.org/wiki/Compression_Audio_data_with_lossy

Comparative tests

Sound Forge 7.0 (Spectral Analysis / Spectrum Analysis function) was used for the analysis of the sound signal.

“Spectral analysis is a signal processing technique that can reveal the frequency content of a signal. Solving the problems of spectral analysis is possible through the use of the fast Fourier transform, which makes it possible to determine the contribution of individual components of the vibration spectrum to the overall vibration picture. “Http: //masters.donntu. edu.ua/2007/fema/belinskaya/library/a4/art4.htm

The following graphs were obtained in the form of an amplitude distribution in the frequency domain, the spectrum of the signal is presented using a Blackman-Harris / Blackman-Harris window and a maximum sampling frequency (FFT size) of 65536, this gives allows you to analyze the smallest details of the signal at frequencies around 20,000 Hz, without smoothing.

The analysis of the spectrum of the compressed signal assumes the presence of a recording of the original quality, for this we use a licensed audio CD made in the USA “Kevin Yost – Bongo Madness”, with standard characteristics 44100 Hz / 16 bit

The rich electronic sound spans the entire frequency spectrum and captures even the inaudible range (20,000 Hz to 22,000 Hz), as can be seen in the graph below. Considering that it is generally possible to notice codec compression at higher frequencies, the 10-20 kHz range will be considered.

The Truth About High Bitrate Lossy Compression

The Truth About High Bitrate Lossy Compression

Lossy compression

In the understanding of most people, the word music lover is most often associated with a person who not only loves and collects music, but also appreciates high-quality music, and not only in artistic and aesthetic terms. but also the quality of the recording. of the phonogram itself. Just think, a few years ago, an audio CD was considered the standard for music quality, whereas a computer, even in dreams, could not compete with the quality of a CD. However, time is a great joker and he often likes to turn things upside down. It would seem that quite a long time passed, one or two years and … that’s it, the CD on the PC went into the background. Don’t ask “why?” You know the answer to this question yourself. Everything is to blame for the revolution in the world of sound on a computer: audio compression (hereinafter referred to as audiolo compression which means lossy compression to reduce the size of the audio file), which made it possible to store music on the hard drive, lots of music! In addition, it was possible to exchange it over the Internet. New sound cards have been released, capable of squeezing almost studio quality out of a piece of hardware that seems useless in terms of music. Nowadays, even having a computer that is not very smart in performance, having bought a Creative SoundBlaster Live! and remembering that since Soviet times there is a good amplifier and good acoustics, you will get nothing but a high-quality music center, the sound of which is inferior only to very expensive audio equipment (average or even the highest hifi category ). Add to this the general availability of music files and you understand that you have the power at your fingertips. And then there is a revolution, and you understand that a compact disc is no longer so convenient, you are fascinated by something completely different: the magic signs of the “MP3”. You cannot eat or sleep; At first glance, the “chicken and egg” question is insoluble: how to “squeeze” and, most importantly, how to “squeeze” …

This is where I will help you. This article is the beginning of my new series of informational materials on music on the computer. For over a year developing OrlSoft MPeg eXtension and maintaining an extensive database of MP3 files, I have accumulated a great deal of research on audio compression. It is these studies that I will try to share with you. Several respected authors have written many articles on audio compression, so I will try not to write what I can easily find in other sources of information. I would like to express my position on the subject under discussion simply and clearly. We will not consider audio compression to be as compact a tool as possible put audio information on your hard drive (so that you can record so many hours of music there). Yes, compression allows you to record music more compactly, but my goal is to minimize quality loss by converting “pure” audio to compressed audio. This is why only high bit rates and qualitatively compressing encoders are considered in these modes. So it is much more convenient to work with compressed audio – instant access to any track from any album, convenient software for playback. And, of course, the financial issue has not been forgotten either.

Of the audio compression formats that exist today, three deserve attention, in my opinion: MP3 (or MPEG-1 Audio Layer III), LQT (as representative of the MPEG-2 AAC / MPEG-4 family) and the completely new OGG format (Ogg Vorbis) developed by a group of enthusiasts:

MP3 is by far the most widely used of these (mainly because it is free). Let me remind you that it was thanks to the MP3 format that the victorious procession of compressed audio took place. However, as is often the case with pioneers, little by little it is losing ground and giving way to new and better formats.
The second format, LQT, is a representative of a new direction of audio coding algorithms, a representative of the AAC family. This is a fairly high quality, but commercial and highly classified format.
OGG became widely known to the public this summer and is currently developing rapidly, soon (with the release of the Encoder and Decoder) it should beat MP3 with better sound quality with smaller file size.
I will not give a detailed description of technologies and formats here, you can easily find them yourself. There will only be facts, conclusions and recommendations. I plan to present my research separately for each format in separate articles.