Audio compression algorithms for streaming purposes.


Free Download Mp4Gain
picture

Audio compression algorithms for streaming purposes.

Audio Streaming

The problem of transmitting the necessary number of audio channels through a network of limited capacity forces us to resort to audio compression. Despite the use of modern digital technologies, compression negatively affects sound quality and causes additional delay in signal transmission.

Audio Streaming

Currently, there are two fundamentally different approaches to compressing audio signals. This article will provide a general comparison between these two different compression principles. Also presented are graphs of the frequency response (amplitude frequency characteristic) of the sound sample in its original uncompressed form and after one cycle of encoding and decoding using MPEG Layer II and Enhanced apt-X.

Algorithms like MPEG and AAC use encoding using a psychoacoustic model of sound perception. Another approach is time encoding using Adaptive Differential PCM (ADPCM) in algorithms like Enhanced apt-X.

Linear PCM audio
Before compression, the audio is generally digitized in linear PCM format at 32 kHz, 44.1 or 48 kHz with a resolution of 16 or 24 bits.

The analog signal will be digitized in uncompressed digital PCM. The digital inputs of the codecs use oversampling to ensure conversion without timing issues. The uncompressed PCM signal is our benchmark for comparing compressed audio files.

MPEG Layer ll compression
MPEG 1 Layer ll is a widely used format. This is a typical example of a psychoacoustic perception coding algorithm that analyzes the incoming signal and compares it to a theoretical model to determine what frequency and what time domain information could be lost. The need to analyze the audio signal results in a mandatory delay, typically greater than 30 ms.

In theory, high compression ratios can be achieved, but even with relatively low compression, MPEG can seriously degrade audio quality. In Fig. 2 shows the frequency response after one pass of MPEG encoding of the source file.

Be aware of frequencies that are lost or distorted from the original PCM audio.

Compression Enhanced Apt-X
Enhanced apt-X uses ADPCM audio processing technology. The signal is divided into four frequency bands that can be processed at a quarter of the original sample rate using a variable bit rate and a variable quantization step. Since all processing is based on a time domain method, there is no delay other than the actual processing time required.

As a result, a 4: 1 compression ratio retains the entire frequency content of the original signal with a coding delay of less than 3 ms. Frequency response graph in Fig. 3 shows the result of one pass encoding / decoding using Enhanced apt-X at 256 kbps and illustrates the high fidelity of Enhanced apt-X compared to the original uncompressed signal.

How Enhanced apt-X Works
The improved apt-X encoding algorithm passes the original PCM data through a specially designed two-stage Q-mirror filter to divide the signal into four subbands and reduce the clock to 1/4 of the original clock frequency. The quantization procedure consists of processing four sub-signals to reduce each signal from 16 bits to 7 bits in subband 1, 4 bits in subband 2, 3 bits in subband 3 and 2 in subband 4.

The inverse quantizer and prediction scheme uses the above values ​​to predict the size of the next signal. This value is compared to the actual signal and the “difference” is measured. The encoder transmits this measured “difference” signal to the decoder. Each subband is processed in parallel and the output of the string quantizer and predictor is encoded with a predetermined resolution. The processing output of the four subbands is multiplexed into a single 16- or 24-bit enhanced apt-X signal. Then additional data and sync data are added to it for streaming.

Comparison by main points
MPEG / AAC encoding is destructive: frequencies are lost during the encoding process.
Enhanced apt-X encoding is non-destructive, as every frequency present in the original signal is stored in the encoded and decoded signal.
MPEG and AAC suffer from the concatenation effect: repeated encoding and decoding cycles rapidly degrade audio quality.
Enhanced apt-X is resistant to concatenation – repeated encode and decode cycles do not cause any noticeable degradation in sound quality.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

How to achieve high-quality videos with low bandwidth

How to achieve high-quality videos with low bandwidth

Video Bandwidth

The bit rate can be reduced, in particular, due to noise reduction. Noise is quite a damaging factor causing clogging of the encoding process. It leads directly to an increase in the bit rate.

Video bandwidth

Optimize bitrate to reduce streaming

The classic noise reduction systems are of two types. Spatial noise reduction techniques are applied within the frame to help reduce noise, while temporal noise reduction averages the pixels over multiple frames. These are very effective techniques for still images, but they can cause problems when there is movement. In the event that temporary noise reduction is applied to a moving image, a ghost image may appear.

By combining spatial and temporal noise reduction with the ability to dynamically adjust them based on lighting levels and the detection of moving objects, we obtain images with low noise, maximum detail and low bit rate. The bit rate can be optimized by adjusting the amount of noise reduction based on the analysis of important moving objects in the surveillance camera’s field of view. When there is no movement, the bit rate is kept to a minimum. If an important object is detected, the bit rate increases, allowing you to capture as much detail as possible. The result is that the network bandwidth requirements remain low until something major happens in the frame.

Other ways to reduce the bit rate
For some megapixel surveillance cameras, the bit rate is limited by default. Constant bit rate is often used for this. The constant bit rate is kept at a fixed level. This can result in a consistently high bit rate, and setting a low bit rate can result in poor image quality.

In contrast, a variable bit rate preset a certain level of image quality that is maintained regardless of whether there is movement in the frame or not. The bit rate will change depending on the shooting conditions and the presence of motion.

Dynamic noise reduction, as described above, works on the same principle as variable bitrate, but with the addition of intelligent decision-making capabilities based on the presence or absence of motion. This can reduce the bit rate by 50 percent over the standard variable bit rate in non-motion scenes.

Priorization
In addition to reducing noise, prioritization can help lower bit rates. By setting priority areas, you adjust the level of compression for different parts of the image. Multiple areas can be marked on the image, each of which is assigned compression level parameters. A less important area can be configured to use a higher compression rate and therefore a lower bit rate, while important areas can be assigned a lower compression rate to display in more detail.

Take video surveillance at the entrance of a building, for example. Some parts of the image showing the sky can be considered unimportant for better compression. The area of ​​the entrance to the building can be marked as important and assigned a lower compression ratio to ensure recognition of facial features and other identifying details. Finally, the driveway can be defined as a zone with normal compression.

Reduce costs with dynamic noise cancellation
The combination of noise reduction and image area prioritization produces measurable results. The key benefit of this combination is that you get a significantly lower bit rate without losing image quality. A lower bitrate, in turn, reduces bandwidth and memory usage.

Take, for example, a shopping center with a video surveillance system with 200 surveillance cameras installed throughout the premises inside and outside the facility. Let’s say the mandatory requirement for 1080p HD video surveillance cameras is to record continuously for 12 hours a day and once the mall closes, they can only record when motion is detected. In this case, storing video recorded at a rate of 10 frames per second will require almost 70 TB, allowing you to store it for 30 days. The introduction of surveillance cameras that use dynamic noise reduction can save more than 7 TB of required storage capacity. This translates to over $ 10,000 depending on the storage devices used …. Additional savings can also be achieved by adding priorities in certain areas, which will further reduce the bitrate.