Compressed audio formats


Free Download Mp4Gain
picture

Compressed audio formats

Compressed Audio File Formats

Understanding compressed audio formats
The digital age dictates its own laws, according to which, in particular, audio and video information is more convenient to store and transmit in compressed form. Let’s briefly discuss the principle of sound compression.

Compressed Audio file formats

As you know, the music we listen to consists of a set of signals, each of which has its own characteristics, including loudness. The human auditory system is designed so that we do not distinguish or misdirect 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 a strong one, falls under the knife and a stronger signal remains, then this will be a rough model of audio signal compression. … 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 of a specified duration).

The first versions of codecs for data compression acted quite crudely: they just cut off a weak signal and did not take into account the type of music, therefore, rather energetic music, without special nuances, in a compressed form does not it sounded worse than the original, whereas more complex classical and acoustic music simply lost all color and depth.

As a result of this, a transition to a more intelligent compression algorithm, with a variable bit rate, was made. Depending on the musical texture, that is, the ratio of weak and strong signals, the codec changes the amount of weak signals cut, so that we hear a more believable sound.

Obviously, with a higher sample rate (sampling) of 44.1-48.0 KHz and a higher bit rate (160-192 Kbps), we will get a sound more consistent with the original than with a sample rate 22 KHz and 64 Kbps bit rate. However, the size of the final compressed file is directly proportional to the selected sample rate and bit rate, and this is what people who distribute music in the form of compressed (compressed).

It should also be remembered that most algorithms cut the upper part of the audible range as well, starting at around 15 kHz.

There are currently several original compression algorithms, most of which are compatible with Linux.

Ogg Vorbis
Ogg Vorbis is a completely open audio format that allows you to store and transmit audio information with high sound quality (44.1-48.0 kHz sample rate, 16+ bits, polyphony (multi-channel audio)) and bit rates ranging from 16 to 512 kbps per channel. The number of channels processed can be as high as 255. This allows Vorbis to be on par with MPEG-4 (AAC and TwinVQ), WMA and PAC audio, and clearly superior to MPEG-1 Layer 3 (MP3) audio. .

Ogg Vorbis is also a streaming format, allowing it to be used, for example, for Internet broadcasts, especially since this format is compatible with Icecast. The characteristics of the codec algorithm allow you to get the final file smaller than MP3 files of similar quality.

For the reproduction the console program ogg123 is used, to encode – oggenc; both have graphic housings. More details on both are in the following sections.

MP3
MP3 or MPEG-1 audio layer 3 is by far the most popular format for storing and transmitting compressed data. This format was developed by the Frauenhofer Institut, Germany. However, despite the ubiquity of the format, it should not be forgotten that the patent for MP3 encoding and decoding algorithms belongs to a single company, so the end user at any time may find themselves in a very disadvantageous environment, such as It has already happened with the developers of free MP3 data compression tools …. You can get details about the license conditions on the developers website.

WMA
The WMA format is a proprietary product of Microsoft. It failed to occupy a market segment comparable to MP3, but it has some popularity despite serious security concerns identified. At the moment, only the universal MPlayer player can play WMA files. There are no free data compression tools for this algorithm and its appearance is unlikely.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Everything you need to know about high resolution

Everything you need to know about high resolution

Hi-Res Audio

High Definition Audio is the choice of the most dedicated digital music fans. What is it, where to get it, and what does it take to hear it?

Hi-Res Audio

If you’re a bit interested in digital music (whether it’s listening to CDs or streaming from Spotify on your smartphone), you’ve probably come across the term “high-definition audio” or “high-resolution audio.”

In recent years, the popularity of Hi-Res Audio is slowly but surely gaining momentum, fueled by the emergence of new components, streaming services, and even smartphones that support this standard. Until recently, it was a niche segment for a narrow circle of insiders, but today everyone wants to join it.

If you want to get the best possible music listening experience, or at least better sound quality, you should familiarize yourself with the concept of Hi-Res Audio.

This perspective is a bit overwhelming as it involves many factors. What is Hi-Res Audio? What do all these formats and numbers mean? Where can I get high-quality files and on what devices can I play them? Finally, where do you start?

Our guide to the world of Hi-Res Audio will help you understand the matter in depth. After reading this material to the end, you will be armed with all the necessary knowledge and take the first step into the magical world of the best sound.

WHAT IS HI-RES-AUDIO?

Unlike HD video, there is still no universal standard for high definition audio. Digital Entertainment Group, Consumer Electronics Association and The Recording Academy, as well as the largest recording companies define it as follows: “An audio file in a lossless format that carries a soundtrack across the entire frequency range in which it was mastered using higher quality equipment than CD ”.

In simple terms, this term generally refers to recordings with a higher sample rate and / or bit depth than a CD (i.e. 16-bit / 44.1 kHz).

The sample rate indicates how many times per second the signal is sampled during its conversion from analog to digital. The higher the bit depth, the more accurately the signal is measured at the sample point, so the transition from 16-bit to 24-bit can significantly improve quality.

High-resolution audio formats typically have a sample rate of 96 or 192 kHz at 24 bits. Also, there are files with 44.1, 88.2 and 176.4 kHz.

Small loss

However, Hi-Res Audio has one major drawback: the size of the files. They are typically tens of megabytes in size, and a few songs can easily take up all of your device’s memory. Because of this, they are difficult to transfer over mobile networks and Wi-Fi.

And that’s not all: each of the Hi-Res Audio file formats has certain compatibility limitations. Examples include FLAC (Free Lossless Audio Codec) and ALAC (Apple Lossless Audio Codec); both theoretically provide lossless transmission of musical information. In addition, there are uncompressed formats: WAV and AIFF, DSD (the format used in Super Audio CD) and the recently developed MQA (Master Quality Authenticated).

The relative advantages of each format can be discussed, but the first thing to consider is their compatibility with audio components and software solutions.

WHAT IS GOOD FOR HIGH RESOLUTION AUDIO FORMATS?

The main advantage of high definition formats over tablets is the higher sound quality. Downloadable sites like Amazon and iTunes and streaming services like Spotify offer relatively low bitrate compression formats, such as 256kbps AAC from Apple Music and Spotify’s 320kbps Ogg Vorbis.

During the compression encoding process, some information is lost; in other words, the signal resolution is reduced for convenience and file size reduction. This affects the sound quality: in these formats, your favorite songs will not be fully revealed.

Master class

While you can put up with this when listening to Spotify playlists on the bus ride to work, true music fans won’t have enough. High definition audio comes to your aid.

To understand why it should sound better than MP3, let’s compare its bit rates. The highest possible bit rate for an MP3 is 320 kbps, while a 24-bit / 192 kHz file is 9216 kbps for streaming and 1411 kbps for a CD.

Therefore, 24/96 or 24/192 high-resolution audio files should more accurately recreate the sound that musicians and engineers worked on.

How digital sound is reproduced

How digital sound is reproduced

digital sound

Have you ever wondered how sound is reproduced on digital devices?

Digital Audio

How is a sound signal formed from a combination of ones and zeros? I’m sure I was thinking, since I started reading! But often, even professionals have only a general idea of ​​the modern sound route. In this article, you will learn how the different formats appeared, what a digital-to-analog converter is, what types of DACs exist, and what determines the quality of sound reproduction.

PCM
As you know, in digital audio, almost any format, with rare exceptions, is recorded using a pulse code stream or a PCM stream – pulse code modulation. FLAC, MP3, WAV, Audio CD, DVD-Audio and other formats are just ways to pack, “preserve” the PCM stream.

How it all began
The theoretical foundations of digital sound transmission were developed at the dawn of the 20th century, when scientists tried to transmit an audio signal over a long distance, but not by telephone, but in a rather strange way for that time.

By dividing the sound wave into small parts, it could be sent to the receiver in some kind of mathematical representation. The recipient, in turn, could restore the original waveform and listen to the recording. In addition, scientists were faced with the task of increasing the bandwidth of the “ether”.

In 1933, the theorem of V.A. Kotelnikov. In Western sources, it is called the Nyquist-Shannon theorem. Yes, Harry Nyquist was the first to raise this issue: in 1927 he calculated the minimum sampling frequency for transmitting a waveform, which later received his name “Nyquist frequency”, but Kotelnikov’s theorem was published 16 years earlier.

The essence of the theorem is simple: a continuous signal can be represented as an interpolation series, consisting of discrete reports, from which the signal can be reconstructed. In order to roughly restore the original state of the signal, the sampling frequency must be at least twice the upper cutoff frequency of this signal.

For many years, the theorem was not in demand, until the advent of the digital age. It was then that it found a use. In particular, the theorem was useful in the development of the CDDA (Compact Disc Digital Audio) format, in common people it is called Audio CD or Red Book. The format was released by engineers at Philips and Sony in 1980 and has become the standard for audio CDs.

Format characteristics:

sampling frequency – 44.1 kHz;
quantization capacity – 16 bits.

INFO
Sampling rate: the number of samples of the signal “taken” during its sampling. Measured in Hertz.
Quantization bit: the number of binary digits that express the amplitude of the signal. Measured in bits.
The 44.1 kHz sampling rate was calculated from Kotelnikov’s theorem. It is believed that the hearing of the average person cannot pick up sound beyond 19-22 kHz. The frequency was probably 22 kHz and was chosen as the upper limit.

22,000 × 2 = 44,000 + 100 = 44,100 Hertz

Where does the 100 Hertz come from? There is a version that this is a small margin in case of errors or oversampling. In fact, Sony chose this frequency for its compatibility with the PAL transmission standard.

The bit depth of the CDDA format is 16 bits, or 65,536 samples, which equates to a dynamic range of approximately 96 dB. Such a large number of samples were not chosen by chance. Firstly, due to the strong influence of quantization noise, and secondly, to provide a formal dynamic range superior to that of the main competitors at the time: cassette records and vinyl records. I’ll cover this in more detail in the section on digital to analog converters.

Development of PCM continued on the principle of multiplying by two. Other sample rates appeared: first, the 48 kHz sample rate was added, and then the frequencies based on it were 96, 192, and 384 kHz. The 44.1 kHz frequency was also doubled to 88.2, 176.4 and 352.8 kHz. Bit width increased from 16 to 24 and then to 32 bits.

The next after CDDA in 1987 appeared the DAT format – Digital Audio Tape. The sample rate was 48 kHz, the quantization bit did not change. And although the format failed, the 48 kHz sample rate caught on in recording studios, as they say, due to the convenience of digital processing.

In 1999, the DVD-Audio format was released, which made it possible to record on a disc six stereo tracks with a sampling frequency of 96 kHz and a bit depth of 24 bits, or two stereo tracks with a frequency of 192 kHz, 24 bits.

How is analog audio converted to digital?

How is analog audio converted to digital?

Analog-to-Digital

Sound is a complex analog signal. To analyze such signals a technique widely used in electronics is used. Using the Fourier transform, a complex signal is converted into a harmonic series, consisting of sinusoids with different frequencies and amplitudes. But in practice the signal we are dealing with is of course very different from the sinusoidal one.

Analog to Digital

Musicians call the first harmonic in this spectrum the fundamental tone, and harmonics with higher frequencies are called harmonics. The main tone determines the pitch and the harmonics give it a certain color, creating the timbre of a voice or musical instrument.

To study the spectra of audio signals, complex and expensive instruments are used – spectrum analyzers.

With the help of such devices, it can be established that some musical instruments, such as a violin, have a relatively uniform spectrum and some wind spectra with pronounced maxima and minima, called formants.

There are no terms that directly describe the coloration of the timbre of a human voice or musical instruments, so it is necessary to resort to various metaphors such as “deep timbre”, “hard timbre”, “metallic” sound or even “transistor”.

Digital information processing methods were attempted many times in connection with sound recording, but the first serious results were achieved in the early 1980s, coinciding with the rapid development of computers and the success of the microminiaturization of radio components. The use of digital sound processing techniques has opened up exciting new possibilities.

To process sound on a computer, it must first be converted to a digital, encoded format. An analog signal is encoded by devices called analog-to-digital converters (ADCs). The main method of encoding an analog signal is pulse code modulation, which consists of three operations: sampling, quantizing, and encoding.

We will not go into coding theory now, especially since it is quite complex and requires higher math skills. It is important for us to understand that the quality of the digitized sound and the resulting file size depend on the sample rate and bit depth.

The sample rate is the frequency at which the characteristics of an audio signal are measured. It follows from Kotelnikov’s sampling theorem that to obtain an undistorted digital signal, the sampling frequency must be at least twice the highest frequency of the encoded signal. Therefore, when encoding an audio signal, the sample rate must be at least 40 kHz. In digital communication systems, the sampling frequency is 32 kHz, in laser CD players and consumer digital tape recorders – 44.1 kHz. In digital studio equipment, the sample rate is even higher: 48 kHz.

The bit depth of the recorded sound is the number of memory bits that are allocated to record each value of the amplitude of the sound signal at the time of its measurement. Modern sound cards use 8 or 16 bits of memory per dimension, and higher quality 32-bit cards are available. The higher the bit depth, the higher the quality of the digitized sound.

As already mentioned, the size of an audio file depends on the sample rate and bit depth of the sound. So with a sample rate of 44 kHz and a sound depth of 16 bits, one minute of sound requires a file size of 5.3 MB and with a sample rate of 11 kHz and 8 bits, 660 Kb.

It is clear that such a waste of disk space turned out to be unacceptable, and special algorithms and formats were created for cheaper storage of audio files.

When comparing different compression formats, the parameter “sound quality at a certain bit rate” is often used.

Bit rate is a parameter that indicates how much disk space is used to store 1 second of music. For example, a bit rate of 128 Kbps means that a three-minute song will occupy about 2.8 MB.

In principle, all programs for encoding audio (also called encoders) use algorithms of two types: for lossless audio compression and for lossy compression.

Lossless compression algorithms, in fact, are well-known archivers for PC users, specially modified to work with an audio stream. When playing sound on the fly, the archive is decompressed from the archive.

Video codecs and containers.

Video codecs and containers.

Video Codec

This article is intended to refer here to those who are trying to “convert” something, without understanding what they are doing and why.

Video Codecs

To work as efficiently as possible with any object, you need to understand how it works. If the video file is for you a mysterious black box, inside which mysterious things happen, perhaps not without the help of black magic, then your effectiveness will be minimal.

So. All information on the computer is in the form of files. This, I hope, is not a surprise to anyone. Here we will start from this basic concept.

Any video file must be a container. A container is a repository of content. There are multi-structure storages – these are container formats. For example, a bento box is an example of a container. You can put sushi or tempura on it. What can you put in a video container? Well, at least image and sound, one at a time. This is a set without which there is nothing to do. What can you put to the maximum? The modern Matryoshka container allows you to put various video and audio tracks, text and graphic subtitles, fonts to display them, images and I don’t know what else.

Going back to the bento box example, note that miso cannot be poured into it; will flow in fig. Not all containers can accept all flows. There are compatibility restrictions that make life difficult.

Container examples: mpeg, avi, mkv, mp4, ogm, vob, mov, rm, divx, asf. You don’t have to look closely at the list to understand that these are standard file extensions. Of course. Because file = container.

Streams or tracks are stored inside the container. These streams have a format called a codec. And this difference must be understood with particular clarity. The container is a file format. And the codec is the stream format it contains. They are two independent things. Yes, there are some inextricably linked containers and codecs. For example, the Real Media container can only store real video and real audio streams. And vice versa, these formats cannot be stored in any other container (almost, as I have already been corrected). But they are still different concepts that should not be confused.

The codec concept usually includes the following aspects:
1) The actual data storage format.
2) Software that allows you to encode information in this format and / or decode it from it.

Examples of video codecs: divx, xvid, avc, x264, vp6, vp7, mpeg-1, mpeg-2, huffyuv.
Examples of audio codecs: mp3, ogg, ac3, aac.

While containers are generally distinguished by file extensions, codecs are distinguished by the four-character FourCC code.

The codec concept is usually associated with a kind of compression. Raw (uncompressed) streams also have their own formats, but they do not require decoding, and therefore the concept of codec is generally not applied to them.

Now let’s take a look at the most popular containers, codecs, and related issues. As a general rule, the problems we have are of two types: related to reproduction and related to editing.

MPEG is one of the oldest containers. It can store only video in mpeg-1 format and audio in mp2 format. And in a friendly way, with quite strict restrictions on the size of the image and the bitrate of the sound. Due to the age and primitiveness of the format, almost all players and publishers understand it. But for the same reasons, it became almost impossible to meet him. Nobody needs these things.

AVI is also quite old, but it is still a very useful container. It’s good because, again, all the players and all the editors get it. Almost all mpeg-based formats fit into it, as well as many that support them. The following video formats do not fit avi: avc (aka Nero AVC or Nero H.264), wmv below version 9, as well as any tinsel like actual video, which was originally designed to be incompatible with anything in the world. By sounds, supposedly anything, except Vorbis ogg.

OGM is where Vorbis ogg goes. Because the format was created on the basis of this very ogg. At the moment, he is practically ousted by the matryoshka because he can do the same, only better. It is also not compatible with any conventional software.

MKV is a nesting doll that can fit just about anything except flash video. But due to its complexity and versatility, it is still possible to do with it only things like: mount, look and dismount.

MP4 is actually modern MPEG. It only takes things that are compatible with the MPEG standard, but at the same time includes its latest updates.

Compressed audio encoding formats.

Compressed audio encoding formats.

audio encoding

MP3 (or rather, MPEG 1 Audio Level 3): no comment, compatible everywhere and by everyone, the lack of this “eternal” format is one: only two channels, which limits its use in cinema systems at home modern.
Multi-channel MP3 (5.1) MPEG 2 Audio Level 3.

audio encoding
WMA: Windows Media Audio, formally a better and more modern competitor to Microsoft’s mp3. It is not used much, although it is widely compatible with hardware.
OGG Vorbis is a best modern mp3 competitor from the open source community. Deprived of any license restrictions, it is used more and more frequently.
AAC: Advanced Audio Coding is Apple’s main audio format built into all of its iPads, iPhones, iTunes, etc. The main advantage is that it is technically more advanced than mp3, allowing sample rates of up to 96 kHz and theoretically a completely insane number of channels in one file, up to 48. It is also used in digital satellite radio. Just as mp3 is a compressed format, the quality of 96Kbps AAC is comparable to the quality of 128Kbps of mp3 (we are talking about two channels in both cases).
Dolby Digital (AC-3) is probably the most popular standard for digital audio in cinematography, due to the fact that it appeared on the market as early as 1995, it exists in two versions: DD2.0 (for high-quality stereo sound) and DD5 .1 – five full channels and one defective for a subwoofer. Players are compatible with all of them for obvious reasons, the bitrate is 640Kbps in all cases.
Dolby Digital Plus or E-AC-3 is an attempt to improve on the usual Dolby Digital, but the previous generation decoders and receivers do not support tracks in the Dolby Digital Plus format, the reasons for this are radical changes: the number of channels increased to 7.1, the bit rate – to 1, 7 Mbps This will not go through S / PDIF (when transmitting via such a cable, you will have to use downmix on DD5.1 ​​or on DTS with quality loss), but HDMI normally copes with Dolby Digital Plus as of version 1.3, you can find such tracks on Blu-Ray discs …
Dolby TrueHD – We practically have 8 tracks almost uncompressed at 96 KHz / 24 bits or 6 at 192 KHz / 24 bits, the total bit rate reaches 18 Mbit / sec, which requires decoding in the player and transmission to the receiver in the analog path, or using HDMI 1.3 or higher. For Blu-Ray, this audio coding system is optional.
DTS is a lossy digital audio coding system for cinemas, which later appeared on DVD, it is analogous to Dolby Digital 5.1, but somewhat more flexible, allowing in addition to 2.0 and 5.1 to use other schemes, such as 4.0 and 4.1, there is also a choice between two fixed bit rates of 1500 Kbps and 750 Kbps. In the first case, DTS clearly outperforms Dolby Digital in sound quality; in the second, the difference between systems is controversial.
DTS-HD is a further evolution of DTS, the number of channels has been brought to 7.1 in 96KHz / 24bit mode, the bit rate can be selected between 6Mbps and 3Mbps, it is an optional audio format for Blu-Ray. The situation with the sound transmission to the receiver is almost the same as with DolbyTrueHD.

Lossless or uncompressed compressed audio encoding formats.

LPCM is simply uncompressed audio. It is usually stereo. It should not be confused with a WAV file, it is a container and there may be something other than PCM WAV inside.
APE is a specific lossless audio compression format. Loved by audiophiles.
Flac is its competitor and analog, the differences between them are beyond the scope of this review.
Lossless audio
Lossless apple

Subtitle formats.
SRT: text format, can be attached as a separate file with the same extension. Compared to the first versions of this format, the design possibilities have been significantly increased. It can also exist within MKV.
SUB / IDX is a graphic subtitle format extracted from DVD. It can fit MKV or MP4.
s2k, ssa, ass: some more advanced text formats, ass can be placed inside MKV.
smi is a textual format based on SGML, the direct ancestor of HTML.
PGS is a graphical subtitle format, the main one for Blu-Ray, but it can also exist in ts and MKV containers.

Currently popular video containers

Currently popular video containers

video containers
:
AVI (Audio Video Interleaved) is an old (1992!) Container type and still very popular. We appreciate your appearance at Microsoft and the Video for Windows package. It is currently starting to lose ground to more modern containers due to lack of normal support for various modern audio tracks, subtitles and codecs (such as h.264), however it will remain popular for a long time due to increased support. from appliance manufacturers. It is generally used in combination with MPEG4 / DivX / Xvid codecs and compressed mp3 audio.

video container
MKV (Matroska, “Matryoshka”) is a modern container, developed as an open source project and lacks all the downsides of AVI: modern audio and video codecs, multiple audio tracks, and multi-track intro with Subtitle. Usually, but not necessarily, it is used in combination with modern h.264 / x.264 / AVC-1 codecs. Subjectively, it is the most popular for Internet distribution and local storage of high-quality video.
But nobody bothers, for example, to put MKV video inside, compressed by the “good old” Xvid. Also, in some situations, such actions are justified.
QuickTime (file extensions – *. Mov or *. Qt) is a fairly progressive container created by Apple, it supports almost all popular codecs and subtitle embeddings, moreover, unlike MKV, it is much more suitable for editing video material. engraved on said container. …
However, its normal support is only possible with the Apple QuickTime package installed on the computer; third-party open source reverse engineering developments do not provide full functionality.
ASF / WMV / WMA (Advanced Stream Format / Windows Media Video): Microsoft’s AVI replacement, file extensions, respectively: ASF, WMV, WMA (for audio files). Despite all the progressive innovations (support for multiple tracks, chapters, new codecs), support for h.264 is still difficult for them, which puts the future of this container in doubt.
FLV – Adobe Flash Video. It became tremendously popular thanks to YouTube. In the process of evolution, I learned to use modern audio and video codecs, but its focus on short, highly compressed Internet videos limits the scope of its distribution. For some reason embedded subtitles are not supported.
BDMV is in fact an uncompressed Blu-ray disc image, it has all the imaginable “advantages” (support for all modern audio and video formats, up to 3D), but it has serious demands on disk space and loading decoder. Therefore, the support of hardware players is still very limited.
3GP is a container focused on filming videos with mobile phones. Hence the limited support for audio formats, video formats are supported very progressively. There are no alternate audio tracks, timecode instead of subtitles. The weapon of a mobile reporter, in a nutshell.
MP4 is quite a progressive container, it supports video compression not only in MPEG4, as you might think from the name, but also using more modern methods. But I lost to the “matryoshka” in terms of support for subtitles and audio formats.
Divx is a container from the creators of the codec of the same name. Despite some progressiveness, it did not receive the same distribution. The reason is that you can only use the codec of the same name for video, and who needs it after that, if the “nesting doll” is more universal.
VOB is actually the official name of this MPEG 2 program stream container, that is, it is actually the content of the DVD. It supports only two video codecs, MPEG1 and MPEG2, otherwise the standard of the “before HDTV” era, because there is support for subtitles, chapters (if you take the whole disc as a single container) and various audio formats, including very progressive ones.
.ts MPEG 2 Transport stream, also found in files with the m2ts and mts extensions, popular due to digital satellite transmission, capable of using, despite the name, modern codecs and FullHD resolutions. Popular with fans of satellite TV, but inferior to “Matryoshka” in terms of flexibility of use.
OGG is a container formally designed to store audio in the OGG Vorbis format, but it can also store video. Despite the stated capabilities, it is exotic (this applies to video), for sound this container has already taken hold.
WAV is a container for storing sound, not necessarily uncompressed.
ISO is just an optical disc image. Anything can be inside. How the player will assimilate it is up to its developers.
MPG: Legacy VideoCD, MPEG 1 single format video container.

Video containers

Video containers

Video Container

For most users, video files with AVI extension are a separate video file format. In fact, this is not the case. In this case, the extension of an AVI video file is a container of a certain structure, which is used to store various information, such as video and audio data streams, and possibly also subtitles. The AVI video file container can hold video of almost any format, and maybe just audio. Next, we will consider the most widely used containers that can store audio and video information.

video container

AVI is the most popular and widespread type of video file. It was developed by Microsoft during the early days of the Windows operating system and is designed to store synchronized audio and video streams. AVI has a number of limitations that prevent the latest advances in data encoding from being applied, but despite this, it remains popular. Several of these restrictions were successfully circumvented in various clever ways, for example using variable bit rate audio streaming. In the Windows operating system, absolutely all video encoding programs can work with this container.

The OGM container is a completely open system that is part of the OGG project. It can accommodate a video stream of any format and sound in Ogg format, but it also has support for tracks in MP3 format. The main advantage over AVI is its instant rewind capability and built-in error correction.

MKV, called “Matryoshka” on the Internet in Russian, is a relatively recent new development of the video container. It is completely free and open source for any developer. MKV allows you to combine the latest advancements in video and audio encoding. When generating a file, any codecs can be used, both video and audio. Additionally, it supports variable bit rate, a DVD-like navigation menu, and the ability to link to movie chapters. To play files, you must install the Matroska Splitter filter, which will split the container content into sequences. To process video in this container, it will not be easy to find a suitable video encoding program that can trim MKV without re-encoding.

MP4 was developed by the MPEG group to store audio and video computing, and it also supports some types of animation. To play animations in 2D and 3D formats, the installation of special players is required, but these capabilities are still in the testing stage. Most of the portable devices save their files in the MP4 container.

The Quick Time container is used primarily on the Apple platform. Files with this container have the MOV extension and contain high-quality compressed video and sound. It can also be used on standard PC platforms, which requires the installation of the appropriate codec.

Video compression formats

Video compression formats

video file formats

Before building a video surveillance system, a technician will have to solve a number of critical problems and tasks. Along with the choice of cameras, servers, and software, it is necessary to select the optimal compression format for the system’s video transmission. The main formats for video surveillance systems are MJPEG, MPEG-4 and H.264 (MPEG-4 part 10). Controversy “Which format is better?” Similar to the disputes “what is the future for: analog or ip?”, have been going on for several years, but experts still cannot reach a consensus. In this article we will talk about the characteristics of the formats, the parameters that must be taken into account when choosing, and the technologies used to analyze video streams.

Video File Formats

Compress video

The videos from the IP surveillance cameras reach the server in compressed form. Compression generally involves removing features that are almost invisible to the human eye, although compression is sometimes done without loss of information. Compressed video stream requires less network bandwidth and less free hard disk space. To view or analyze the video, the resulting stream must be unzipped; apply the reverse conversion algorithm to compression. The combination of compression and decompression algorithms is called a video codec. Video codecs of different standards are not compatible with each other; video information compressed with one codec, as a rule, cannot be decompressed with another.

There are several types of compression.

Lossless compression allows you to obtain an image after decoding that does not differ from the original frame.
Lossy compression loses information after decoding.

Several lossy compression implementations are possible:

lossy percentage compression – loss is so insignificant to the human eye that the frame before and after decoding is virtually indistinguishable to the operator;
lossy compression – the differences between the frames before and after decoding are noticeable, but still not very pronounced, all the information necessary to analyze the events is saved;
Lossy Compression: Low-quality streaming video compression, causing artifacts (noticeable video distortion) during decoding. The appearance of artifacts leads to a decrease in image clarity, the appearance of fields of the same color (when different color tones are combined in one), the appearance of image blockages (pixelation, graininess). The presence of artifacts leads to false results of the analysis of the video stream by the system software.
In the compression process, to reduce the size of the video stream, the amount of color tones in the image are reduced, color resolutions are lowered, and small details in the image that are invisible to the human eye are removed; predict changes based on data already received; remove duplicate pixel values.

Video compression formats

There are many compression formats, MJPEG, MPEG-4 and H.264 are the most popular in video surveillance.

MJPEG format

For the MJPEG compression format, a video sequence is a sequence of still images: JPEG images. Compression occurs individually for each frame (intraframe). We get total independence from individual images. When playing a video file, the image quality is still good: from the MJPEG format you can always get frames with a clear image of the events that take place, it does not require high processor performance, but significantly loads the network and requires a large amount of disk space. This format is characterized by image blocking artifacts, fields of the same color. Camera data is lossy, so it’s impossible to say there is no distortion. Another thing is that if the camera is correctly adjusted, the human eye in JPEG hardly notices distortion.

MPEG-4 and H.264 formats

For MPEG-4 and H.264 formats, compression is performed both within a frame and for a series of frames (between frames). H.264 video (MPEG-4 optimized or MPEG-4part 10) is not a sequence of individual images, but a chain of related data – video streaming. The advantages of this format are that not all frames are saved, but only the reference image and its subsequent changes.

When a significant part of the image remains unchanged, the resulting video size is much smaller than for MJPEG. In case the MJPEG format can send a set of images of 200 KB each, the H.264 format will send a reference image of 200 KB and its subsequent changes, which are much smaller.