Digital video, its advantages


Free Download Mp4Gain
picture

Digital video, its advantages

DIGITAL VIDEO

Digital technologies provide undeniable advantages over analog technologies.

Digital Video

The digitized signal can store all the information stored in analog form. Modern digital data transmission, recording and storage technologies practically do not distort the signal.

One of the indisputable advantages of digital technologies is the ability to apply a powerful mathematical apparatus to compress video and audio information into a digitized signal. Unlike “analog”, “digital” can be reproduced at any time with 100% repeatability. Consequently, the digitized signal opens up convenient post-processing, analysis, and simulation options.

The main video compression methods come down to compressing data within a single frame and optimizing the transfer of changes between frames. Even when looking at a still image, you can see that it contains a lot of information of the same type and duplicate information. For example, the background intensity is usually a constant value; many separate areas of the image, occupying significant frame sizes, also have the same digital signal level. Naturally, it makes no sense to transmit all this information without compression. With the use of specialized video compression techniques, smoothly changing frame by frame, it is possible to further reduce the resulting density of information transmission over the network.

Unlike universal archivers (such as WinRar or WinZip), video compression can occur with some loss, the amount of which depends on the selected codec. Modern compression algorithms use extensive logical analysis of the video to extract duplicate fragments between frames and reduce the size of the final file. During playback, the compressed information is “stretched” and then displayed to the user. On a low-powered computer, it can take a long time to decompress images compressed with some codecs.

Digital video compression technologies
There are many digital video compression technologies. Some of the compressors considered use more than one compression technology, but a combination of them. For example, both Indeo 3.2 and Cinepak use vector quantization. The international standards MPEG-1, MPEG-2, MPEG-4, H.261 and H.263 use a combined BDKP technology and motion compensation. Some modern algorithms use Discrete Wavelet Transform (DWT) technology. Other technologies include fractal image compression.

Lossless compression

Image compression can be performed without quality loss only if there was no data loss during the compression process. As a result, the image obtained after decompression will match exactly (bit by bit) the original. Examples of such compression are GIF for static graphics and GIF89a for video.

Lossy compression

Compression can be lossy if information is lost during the compression process. However, from the point of view of human perception, lossy compression should be considered only that compression in which it is possible to distinguish with the naked eye the result of compression from the original. Thus, despite the fact that two images, the original and the result of compression with one or the other compressor, may not coincide little by little, however, the difference between them may be completely imperceptible. Examples include the JPEG algorithm for compressing static graphics and the M-JPEG algorithm for compressing video.

Lossless compression from a perceptual perspective

Being formally lossy compression, a compression scheme can at the same time appear to be lossless in terms of human perception. Most lossy compression technologies have the so-called Compression Quality Factor (QF), which characterizes the perceived quality side and ranges from 0 to 100.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

About video compression

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.

Video compression, how it works

Video compression, how it works

Video Compression

Video – This is essentially a three dimensional pixel color matrix. Two measurements indicate the vertical and horizontal resolution of the frame, and the third dimension, this time. Frame – is an array of pixels, visible camera at this moment of time, or just an image. Video is also possible so-called half images (see: Interlace Scan System).

Video Compression

Compression might be impossible, if I would each frame was unique and the pixel placement was completely random, but it’s not so. Therefore, you can compress, in – first, the image itself – for example, the sky blue photo without sun will actually be reduced to the outline dotted description and a gradient fill. In – Second, you can compress a similar neighboring frames. Ultimately, the algorithms for image and video compression are similar, if you consider video as a three-dimensional image with time as the third coordinate.

Lossless compression
In addition to lossy video compression, it can also be compressed and lossless. This means that when the decompression result will be a precision (bit bits) that matches the original’s. However, when lossless compression is impossible to achieve high compression ratios in real (not artificial) video. For this reason, almost all commonly used videos are lossy compressed (by that number on consumer digital video discs, video sharing, on satellite broadcast). On the web – sites for small clips without sound sometimes use simple GIF and APNG formats.

Compress technology and video compensation motion
One of the most powerful technologies, which allows to increase the degree of compression, this compensation movement. When any modern video compression system later frames in the sequence uses the similarity of regions in the previous frames to increase the degree of compression. However, since – for any traffic – any objects in the frame (or the camera itself), the use of adjacent frame similarity was incomplete. Motion compensation technology allows you to find similar sites, even if they move from the previous frame.

The current state of affairs

РЕКЛАМА
Cm. See also: HTML5 video
At the end of 2011 the year almost all algorithms compress the video (for example, the standards, adopted by the ITU – T and ISO) using a discrete cosine transform (DCT) or its modification to eliminate spatial redundancy. Other methods, such as a fractal compression and discrete wavelet- transform, have also been the subject of investigation, but are now generally used only for compression of still images.

The use of most compression methods (such as the discrete cosine transform and wavelet – conversion) also involves the use of the quantization process. Quantization can be like scalar, so and vector, so there are less, most compression schemes in practice use scalar quantization for its simplicity.

Television
Modern digital television broadcasting is available precisely thanks to video compression. The television station can transmit not only high definition video (HDTV), but also it and several channels on one physical channel (6 MHz).

Although most of today’s video content is broadcast with the use of the MPEG – 2 video compression standard, the no less new and more efficient standards for video compression already used in broadcasting – for example, H . 264 and VC – 1.

Video compression

Video compression

Video Compression

Video compression (video compression) is the art of removing the maximum possible amount of data without noticeable degradation in quality.

Video Compression

Most common compression methods are lossy (lossy), ie the unpacking result is not identical to the original source. By reducing resolution, color depth, and frame rate, postage stamp-sized video first appeared on PC, but then ways were developed to better render images and reduce data volume without affecting images. physical dimensions. Video compression is implemented by so-called codecs (codec – from COmpression / DECompression). Various types of codecs were developed, implemented in hardware, software or hardware-software, which provided efficient video compression and decompression.

Lossy compression techniques reduce data size (through complex mathematical transformations and the selective removal of visual information that our eyes and brains often ignore) and can result in degraded image quality. On the other hand, lossless compression only removes redundant information. Codecs can be implemented in hardware, software, or hardware / software. Codec compression ratios range from 2: 1 to 100: 1, allowing it to handle large amounts of video data. The higher the compression ratio, the worse the resulting image will be. It shows faded colors, distortions and interference, the outlines of objects become sharper, and in the end the result may be useless.

At the end of the 90s of the last century, the most used methods were based on a three-stage discrete cosine transformation algorithm (Discrete Cosine Transform – DCT). The DCT algorithm takes advantage of the fact that neighboring pixels in an image (physically close, in space, or close in successive images, in time) can have the same meaning. The mathematical transformation (similar to the Fourier transform) is performed on 8×8 pixel grids; this explains the block distortions (artifacts) at high compression levels. Low-frequency components have been shown to be more important than high-frequency components in visual systems. Consequently, the quantization process weights them and removes those that contain the least visual information depending on the level of compression required. For example, deleting 50% of the converted data can result in the loss of only 5% of the visual information.

Compression was originally done in software. Insufficient processor power limited the algorithm to execute its task in 1 / 25th of a second, that is, the time it takes to form a frame of fully moving (“live”) video. However, Avid Technology and other non-linear editing (NLE) pioneers released PC-based editing systems that used software compression in the late 1980s. Although the video had a quarter of the resolution of the broadcast television, color fade and block distortion, the NLE system revolutionized the production process. In the beginning, these systems were used for offline editing, when the material was polished with software.

Although the video quality of early PC-based NLE systems was inferior to the quality of offline editing with VHS VCRs, NLE systems had certain advantages. As a word processor for video, they provided a faster and more creative work style. The user could quickly cut and paste parts of the video, enhance them, and perform various editing actions typical of the production process. Also, importing the NLE-generated Edit Decision List (EDE) onto a floppy disk on an online computer was much more convenient than writing a temporary code list. The NLE system not only provided a more convenient edition, but also provided an offline product close to the final version,

However, NLE systems practically disappeared in 1991 when hardware compression provided VHS quality video. The first hardware video compression was called M-JPEG (Motion JPEG). It is derived from the DCT standard for still images called JPEG. This standard was never designed for video compression, but when C-Cube released a codec chip in the early 1990s that could compress JPEG up to 30 still images per second, the pioneers of NLE systems couldn’t resist for long time. By compressing data 50 times, personal computers were able to process digital video.

Meanwhile, PCs were getting faster and memory cheaper, allowing for lower compression ratios with better capacity.

The perfect video compression

We all like to enjoy great image quality in the videos and movies we watch on the computer, especially if you make your own compressed copies of DVD movies. I have always relied on the popular DivX but, now that there are other types of compression such as Xvid and some as modern as the H.264, it would be worth comparing to discover which one offers the best quality in the smallest size.

 

For the test I have chosen the movie Transformers, released in November 2007 and directed by Michael Bay, with Shia Labeouf and Megan Fox as protagonists. It is an action movie with a variety of scenes: static in great detail, with movement, explosions, lots of color … ideal for testing. The DVD boasts a very high image quality, as evidenced by the editors of a well-known magazine.

codecs

Choice of codecs, bitrates and encoders

To carry out the test, you have to choose different “compression methods”, each of them to several different “qualities” and using one or several programs that allow to compress in this way.
Things have changed a lot since in 2000 I compressed my first movie in DivX 3.11 format. It took me a whole day looking for information on the Internet on how to do it and my computer at that time (an AMD K6 II of 400Mhz) took all night to compress it in only 650 MB. Since then I have been using all versions of DivX, from 3.11 to the current 6. But the Xvid codec sounds more and more and there are excellent comments from the newest H.264, so the question is on the table: what is The best way to compress to achieve sublime image quality? Well, for this you have to discover which is the best codec and use it at the optimal bitrate with the ideal encoder. But what about that “codec”, “bitrate” and “encoder”?

Codec, the type of compression

The “compression method” is what in the video world is called “codec”, which is the acronym for COmpresor-DECompresor, a program capable of compressing and decompressing the image in a certain way. It is something similar to what photography programs incorporate to allow them to read and write files in JPEG format, for example. The type of compression that incorporates the DVD is called MPEG-2 and is already considered somewhat old, being surpassed by the MPEG-4 standard, more modern and efficient.
The problem is that there are many types of MPEG-4 and it is not clear which one is the best.

On the one hand there is DivX (a variant of the MPEG-4 type called ASP; see official page), which is tremendously popular and more and more DVD lounge players admit it. The decompressor (necessary to watch the videos) is free, but the compressor (to generate them) is paid.

There is also Xvid, (which is the same type as DivX; official page) a competitor of DivX (its name is the same, but vice versa) although completely free.

codec

And finally, the very modern H.264, of the MPEG-4 AVC type, a prodigy of compression according to experts. Well, to find out which one is better, I have compared the generic MPEG-4 with these three contenders. There are several codecs to use this type of compression, but the most popular is the x264, mostly because it is free, which is what I used.

The versions that I have used for this comparison are the following: DivX Pro v6.8.2, Xvid v1.2 and x264 revision 808.

Bitrate, the amount of compression

Already with each of them, you can select the “quality” image, similar to how you choose the quality between 0 and 12 when saving a JPEG file from Photoshop. The difference is that in the world of video this is known as bitrate, which is nothing more than the bit stream per second of video, and is measured in bits per second and their multiples. Since video is a succession of frames formed of pixels (ultimately bits), this parameter measures the flow of information per second; at higher flow, higher quality and vice versa. In our case, I will use measures in “kbps” (“Kb / s” would also work), that is, kilobits per second (be careful, don’t confuse it with KB / s, which would be kiloBytes per second, an 8 times larger unit).
In order not to make the mistake of falling short, I have chosen 7 different bitrates, starting from an intermediate one. Taking the original DVD image, with a 720×304 pixel size frame