Everything you wanted to know about MPEG-4 / DivX, but were hesitant to ask


Free Download Mp4Gain
picture

Everything you wanted to know about MPEG-4 / DivX, but were hesitant to ask

Mpeg Video

Will MPEG-4 / DivX Hit the Consumer Fixed DVD Player Market?

Divx Mpeg4

For its fame and bad reputation, DivX should be grateful to hackers and the Internet. Thanks to this revolutionary format, movies can be distributed over the Web, and a good-quality two-hour video program can easily fit on a standard CD. So when it comes to DivX, publishing publishers are holding on to their hearts and asking journalists, “Just don’t write about how to beat DVDs in DivX, otherwise movie studios and media organizations. human rights start a heartburn attack. ” However, our article is about the fact that DivX is not only used by hackers.

Although the very origins of the format were the story of a hack, today DivX is rightly called “MP3 for video”. And just as MP3 found its place in the mobile entertainment and home electronics industry in its time, DivX is beginning to pave its equally successful path in this direction.

DivX is synonymous with the mobile and desktop digital video applications of the future. The format was recognized by renowned manufacturers, leaders in technology. Now it is being actively introduced into electronic devices, from stationary DVD players to mobile phones, from digital television devices to pocket PCs.

Major consumer electronics companies such as Sony, Philips and Matsushita are working to create a digital cinema standard based on MPEG-4. Several telecommunications operators use the MPEG-4 standard for video transmission over mobile networks. Devices based on specialized chipsets for DivX playback are now available on the market.

Misunderstandings with formats and codecs

As practice shows, there is always a lot of confusion around MPEG-4 and DivX. The most common mistake, Avi, DivX and MPEG-4, is the same. AVI and MKV are containers (file formats), that is, data storage and packaging. Whereas DivX or XviD are codecs, that is, encoding methods and implementation for recording video data to a file and decrypting information, respectively, for playing back already recorded files. MPEG, in turn, describes both the codecs and the storage methods.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Basic principles to reduce Redundant video data in the MPEG encoding process.

Basic principles to reduce
Redundant video data in the MPEG encoding process.

MPEG video

Evolution of digital video compression standards

Mpeg video format

The MPEG encoding process removes redundant video data in a series of adjacent frames.

Two adjacent frames often contain many of the same picture elements. The information in them differs in a small part from all the information contained in the frame. The video is compressed, in which not all the data from each video frame is used, but the frame dynamics changes, since in most consecutive frames of a video clip the background hardly changes, and clearly noticeable changes occur in the foreground. .

For example, there is a smooth movement of a small object against the background of an unchanging background. In this case, the complete information about the image is stored for the reference images only. For the rest of the frames, only the difference information is digitized: on the position of the object, the direction and magnitude of its displacement, on new background elements that open behind the object as it moves. In addition, this difference information is calculated 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 data reduction process is as follows. First, a keyframe (I, Intra frame) is created.

The reference I-frames are used to restore the remaining frames and are placed sequentially every 10-15 frames. Only a few fragments of frames that are between I-frames have time to change, and it is these changes that are recorded during the compression process.

In addition to I-frames, two other types of frames are distinguished in MPEG:

predictable frames (P, Predicted) containing the difference between the current image and the previous I-frame or taking into account the displacements of individual fragments;
Bidirectional predictive frames (B, bidirectionally predictive), containing only references to before or after frames of type I or P, taking into account the offsets of the individual fragments.
I-frames form the basis of an MPEG stream and, through them, random access to a piece of video is performed. The I-frames are slightly compressed to ensure high visual quality.

The P-frames are encoded relative to the previous frames (I or P) and are used as a comparison pattern for an additional sequence of P-frames. In this case, a high level of compression is achieved.

B-frames are highly compressed. To link B-frames to a video sequence, it is necessary to use not only the previous image, but also the next one. B-frames are never used for comparison.

The I, P, B frames are combined into groups (GOP-Group Of Pictures), which represent the minimum repeated set of consecutive frames, for example:

(I0 B1 B2 P3 B4 B5 P6 B7 B8 P9 B10 B11) (I12 B13 B14 P15 B16 B17 P18 …)

Frames are made up of macroblocks, which are small fragments of an image 16 × 16 pixels in size. The MPEG encoder processor analyzes the frames and looks for identical or very close macroblocks by comparing the base and subsequent frames. As a result, only the difference data between frames, called vector motion code, is saved. Macroblocks that do not contain changes are ignored and therefore the amount of data to be transferred is significantly reduced. To reduce the impact of errors during data transmission, sequential macroblocks are combined into independent sections (slices). In turn, each macroblock consists of six blocks, four of which carry information on luminance (Y) and the remaining 2 blocks carry information on color difference signals (U / V). Blocks are basic units

Block diagrams are used 4: 2: 0 or for studio quality (broadcast) 4: 2: 2.

This is an important point that requires a more detailed explanation:

It is useful to know that RGB color data received from a video camera can be represented equivalently as the sum of the luminance signal (Y) and two color difference signals (U and V), called chromatic. The luminance signal Y determines the luminance of the point. The U and V color difference signals, together with the Y signal, can fully restore the original RGB data.

And it is calculated from RGB data using the formula: Y = 0.299R + 0.587G + 0.114B

The U and V signals are calculated as follows: U = R – Y and V = B – Y