About video compression


Free Download Mp4Gain
picture

About video compression

Video Compression

As the days go by, the demands for video quality are constantly increasing.

Video Compression

At the same time, channel width and media capacity could not keep up with this growth if video compression algorithms were not improved.
Next, we will talk about some of the basics of video compression. Some of them are somewhat outdated or described too simply, but at the same time they give a minimal idea of ​​how everything works.

Video Streaming Features

Most everyone knows that any video is a collection of still images that will replace each other over time. In what follows, we will call this ordered set video stream. They are different, so it is extremely useful to do a little classification here:
Pixel format. The pixel does not give us more information than its color. However, color perception is highly subjective and great efforts have been made to create color rendering and rendering systems that are acceptable to most people. So the color that we see in the real world is quite complex in terms of the frequency spectrum of light, which makes it extremely difficult to transmit it in digital form and display it even more. However, it was observed that the three points of the spectrum can quite accurately bring the displayed color closer to the present in the metric of color perception by an ordinary person. These three points are red, green, and blue. That is, due to its linear combination, we can cover most of the spectrum of visible colors. Therefore, the simplest way to represent a pixel is: RGB24, where exactly 8 bits of information are allocated for the Red, Green and Blue components. And so we can transfer 256 gradations of each color and a total of 16,777,216 of all kinds of shades. But in practice, during storage, this color representation is practically not used, not only because we spend up to 3 bytes per pixel, but also for other reasons, but more on that later (on YV12).
Frame size. We already grab and encode all the pixels in the video stream and receive a lot of data, but it is inconvenient to work with. In the beginning, everything is very simple, the frame is characterized by: width, height, size of the visible part and format (more on that later). Here the numbers will probably be familiar to many: 640×480, 720×480, 720×576, 1280×720, 1920×1080. Why? Yes, because they appear in different standards, for example most European DVDs have a resolution of 720×576. No, of course you can make a 417×503 video, but I don’t think there is anything good in that.

Frame format. Even knowing the size of the frame, we cannot represent the pixel array in a more convenient way without knowing how to “pack” the frame. In the simplest case, there is nothing complicated: we take a row of pixels and write the bits of each encoded pixel in a row, and so on line by line. That is, we write as many lines as we are tall by as many pixels as we are wide and all in a row, in order. This is called progressive. But maybe you tried to watch TV shows on a computer without the proper settings and saw the “comb effect”, this is when the same object is in different positions relative to the odd and even lines. You can argue for a long time about the desirability of interlaced (interlaced) scanning, but the truth is that it has remained a relic of the past of traditional television (those who are interested in reading about the kinescope device). I will not talk now about methods to remove (deinterlace) this unpleasant effect. This is where the magic designations come from: 576i, 720p, 1080i, 1080p, where the number of lines (frame height) and the type of scan are indicated.
Frame rate. Some of the standard values: 23.976, 24, 25 and 29.97 frames per second. For example, 25 fps is used on European television, 29.97 on American television, and 24 fps is used in movies. But where did the “strangers” 23.976 and 29.97 come from? Let me tell you a secret: 23.976 = 24 / 1.001, and 29.97 = 30 / 1.001, that is, the 1.001 divisor is included in the American NTSC broadcast standard. Consequently, when the movie is shown, there will be a very slight slowdown, which will not be noticeable to the viewer, but if it is a musical concert, then the speed of the show is so critical that it is better to occasionally skip frames and again the viewer will not notice anything.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Author: R. Arias

R. Arias is the author of this article and has extensive experience for more than 30 years as a recording engineer and audio specialist, as well as more than 20 years of experience creating algorithms related to audio and video. Linkedin