Divx Video Encoding

Divx Compression

Divx is one of the most popular video compression techniques used today. It can encode quality video for PCs, Home theaters, Portables and Handhelds. DVD videos use MPEG-2 standard of encoding data. The need for higher quality video has highlighted its inability to do an efficient job. The MPEG-4 standard picked up steam because of its ability to compress data and maintain video quality at the same time. This is extremely helpful for media that needs to be streamed online. This standard is being used by different codecs like DivX, XviD, and 3ivX to treat digital video in a way to maintain quality while increasing packing strength. Divx compression technique follows the MPEG-4 standard. This standard basically specifies how digital video should be encoded. The codec pack follows these basic principals and also uses its own algorithms, special techniques for better quality and compression. Now look at how DivX uses MPEG-4 compression.

Frames and A video consist of frames. Each frame is further divided in to 16×16 pixel squares known as “macro blocks”. Each macro block in a frame is compared with a corresponding one in the previous frame. If motion is detected in the frame then it is represented by a vector (has direction as well as magnitude). This “motion vector” represents the position of the image in a macro block (with respect to the previous frame). Referring to previous Frames for motion estimation allows the codec to store less information of the entire macro block. There might be a slight difference between the original and the encoded form. DivX makes up for this with its own data correction during playback. I, P and B-frames

Each frame is treated in a different way depending on the amount of motion detected in a frame. MPEG-4 may encode a frame in three ways.

·         If very little or no change is detected from the previous frame then it is encoded as an Intra-Frame (I-frame). This means that the macro blocks store the information as an image, rather than as a motion vector. Increasing the number of I-frames increases the quality and the size of the output. I-frames (are also known as “key frames”. P-Frames or “predicted frames”) use motion estimation as discussed above. They usually follow a “key frame” and there can be several in a row. The blocks in a P-frame include ones that have been predicted with the help the vectors in a previous frame. Blocks that don’t have any motion vectors assigned to them are saved as images, similar to an I-frame. Greater the number of predicted, motion estimated blocks in a P-frame, better is the compression. Bframe or Bi-directional frames may be present in an encoded video stream if the option is enabled during the encode process. These frames refer to the previous frame as well the next one. A B-frame can also contain “Intra-blocks” – as mentioned above – if it cannot forward or backward predict it. Bi-directional encoding produces a better compression ratio keeping quality in mind and is useful while creating low bit rate videos.

Temporal Filrg

·         Spatial and temporal filtering are techniques to remove or normalize aberrations in color. Spatial filtering involves the comparison of color between adjacent pixels in a single frame while a temporal filter compares adjacent frames. These smoothens sharp changes in color between adjacent pixels or frames. All the information stored for each pixel is further converted into frequency values (in an ascending order) using a complex mathematical function.

·          The “quantizer” is a fixed value that is used to control the accuracy of image data (according to the MPEG-4 standard). A higher value increases the percentage of error but also reduces the file size. For high quality “quantization” one uses a lower value.

Encoding Types: 1.Pass encoding: single pass encoding means the video stream will be proceed and compressed as it receives each frames. This is the fastest way to encode a video clip. Multi pass encoding: A multi pass encode can be a 1st-pass or nth-pass. Both do more or less the same thing; the only difference being the number of times it analyses the video clip. In both methods, the encoder goes through the entire video stream before beginning any sort of encoding. It decides on the bit rate as it goes through the video and logs it in a file .If it is using 1st –pass, it will begin encoding after the first analysis and use the log file for information on the frames. The nth –pass technique analyses the clip a few times, updating the log file each time, Fine-tuning it before the final encode. This procedure take time but produces an optimal quality out put.

Explore posts in the same categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: