DivX 6 Setup Guide

Original Page URL: http://www.divx-digest.com/articles/divx6_setup.html
Author/Publisher: Digital Digest
Date Added: Jun 20, 2005
Date Updated: Jun 20, 2006


Select the "DivX 6.x Codec" (where "x" is the sub-version number) in the codec selection section of your video conversion/encoding software. Press the "Configure" button or whatever button that let you configure the codec settings, and you should now have access to the configuration options described below (see screenshot below).

DivX 6 - Main


We'll now go through the three major encoding methods (1-pass, 1-pass quality-based and multi pass encoding), and click on the links in the listed steps to find out more about the configuration option. Please also refer to the official DivX guide (large file, also included in installer - check your Start Menu Folder) for more detailed and technical information on these feature - this guide will provide a quick run through of all the information needed for encoding, while the official guide offers more detailed explanations and technical information (please note that this guide is for DivX 5.x, but many of the settings are similar between both versions - there is no equivalent guide for DivX 6.x.


1-Pass Encoding :

1-pass encoding is the quickest way to encode your video in the DivX format, at the expense of some quality - it allows you to set a fixed average bit-rate to use for the entire encoding (the average bit-rate will be matched over the length of the content). 1-pass encoding is great for when encoding speed is an issue, and also when compatibility on DivX Certified equipment is required. The steps for 1-pass encoding are as follows :

1-Pass Quality-Based Encoding :

1-pass quality-based combines some ideas from multi-pass encoding with the quickness offered by single pass encoding - you get to select the quality of the output (using a constant quantizer setting), as opposed to the bit-rate (which will be adjusted accroding to the quantizer you've selected and the source video). This mode is not recommended for DivX Certification, and content encoded in this mode will more than likely fail with certified devices. This mode can be used for video capturing, since it has relatively good speed and maintains high enough quality for re-encoding later on. The steps for 1-pass quality-based encoding are as follows :

Multi-Pass Encoding :

Multi-pass encoding is the best way to achieve maximum quality with the DivX format, at the expense of encoding speed. The passes of a multi-pass encoding gathers information regarding the source video and then the subsequent pass use this information to dynamically adjust the size of the output, to get the best ratio between the specified output file size and video quality. Multi-pass encoding includes at least 2 passes. This is the most recommended mode for encoding, as it combines compatibility with high encoding quality (although it will take longer than the previous two methods, and cannot be used for video capturing or realtime tasks). The steps for multi-pass encoding are as follows :




Main Setup :

DivX 5.6 - DivX Codec Main Setup
Certification Profile :
Profiles are pre-programmed settings for the DivX codec that conform to standards set by DivX.com, hence ensuring maximum compatibility with DivX devices. This will make sure your encoded video files are compatible with DivX enabled devices that are available on the market (like standard DVD/DivX players). By turning certification off, the risk is that the file you have encoded will not playback properly on certified DivX devices, and can only be avoided if you knew exactly which settings are supported and not supported by specific certified devices.

To select a profile, choose a setting from the "Certification Profile" drop down menu.

DivX 6 - Select DivX Certification Profile
The four profiles currently available are Handheld, Portable, Home Theatre and High Definition, and a description is provided for them when you select a profile.

If you set the option to "Unconstrained", this will basically allow you to have access to more options, but at the expense of compatibility.
Encoding presets:
New in DivX 6.2 are "Encoding Presets", which are basically 11 pre-configured settings based on speed and quality. Enabling presets disable the selection of many of the options discussed here as the preset take over the setting controls. No documentation has been provided for the preset though, so doing it the manual way (as described by this guide) is still the best way if you want to control all aspects of the DivX codec.

DivX 6 - Encoding Presets
Encode Mode :
Choose the type of encoding method for this codec.

1-pass encoding allows you to specify an average bit-rate, which the encoder will try to achieve over the length of the content.

DivX 6 - 1-Pass


1-pass quality-based encoding is basically constant quantizer encoding (same quantizer used for every frame, and the bit-rate will depend on the complexity of the source), but you specify the quality of the output (using the "Quantizer" slider - the lower the quantizer, the higher the quality), rather than the bit-rate directly. File size, unfortunately, becomes unpredicatable as a result. In previous versions of the DivX Codec, this option was only available when the "Unconstrained" profile is selected. This is because the "Video Buffer Verifier" is disabled in this mode and because of this, the encoded video stream might not be fully compatible with DivX devices (it might still be, but there is no way to tell for certain and hence it was removed from certified profiles) - this is listed and explained in the DivX 5.x user guide, which is still the recommended guide for DivX 6.x (DivX.com FAQ entry). In the latest (6.2.5) version of the codec, all profiles now allow 1-pass quality based encoding (only the "Unconstrained" profile allows for a "fixed quantizer" setting - all others only allow you to set a "target" quantizer, which would allows the codec to encode the video so it is certified for use).

DivX 6 - 1-Pass Quality Based


multi-pass is the best encoding option (for smallest file size, and best quality) - multi-pass encoding takes longer than 1-pass encoding : the encoding time is roughly the encoding time of a "1-pass" encoding multiplied by the number of passes (eg. 2-pass takes twice as long, 3-pass takes three times as long ...), but the results may be worth it - multi-pass uses the bitrate you selected as appropriately as possible, to give you both an accurate file size and the best possible looking picture given that bitrate.

DivX 5.0.3 Pro added Nth pass encoding. Previously, only 2-passes were available. Now, you can have as many passes as you want, with each pass giving the DivX codec more information to work with, and hence, achieve a higher quality encoding (at the expense of time, of course). Note that it is very hard to achieve any noticeable quality improvments after 3-passes.

Using Nth pass encoding is similar to using 2-pass encoding : you have a common first pass using the "Multipass - 1st pass", and then subsequent passes can be performed using the "Multipass - nth pass" settings.

DivX 6 - Multi-pass Encoding
Bitrate Calculator :
DivX 6 has a built-in bit-rate calculator, which can help you figure out the exact bit-rate you need to ensure the output file is limited to a certain size. The idea here is to provide the length of the video and the audio properties, and then enter a desired file size to get the required bit-rate.

DivX 6 - Bitrate Calculator
Encoding bitrate :
This is the bit rate setting for the video. A setting of 1500 will produce very good quality video (lower will mean a smaller file size, but poorer quality). Don't go below 650 (650-1000 for 1 CD movies), and there is probably not too much point in going over 2000 (1300-2000 for 2 CDs).



Codec Setup :

DivX 6 - Codec Setup


Codec Performance:
Determines tradeoff between performance and quality. Leaving it as Balanced gives you the best possible picture/encoding speed ratio. The "Better Quality" option offers the same quality as "Balanced", but provides smaller file sizes. You would normally stick with one of these two settings, as the other ones will take a long time to encode a video. The graphic on the right provides a good indication of the speed/compression tradeoffs. If you really want to use the "Extreme" or "Insane" settings (which uses a "rate-distortion" algorithm), then use it during the last pass. Here's what Gej (the creator of DivX) has to say about this setting:
It's all about your CPU speed and the time you want to allocate to encode a video, on a modern 2.8Ghz CPU insane encoding mode will take around a night (8 hours) for a 2pass, 100 minutes movie, if you can afford that kind of time, this is the best option quality wise, remember, you encode once and view it several times, this can make the time investment worth it.
Enabling "Enhanced Multithreading" allows DivX to take advantage of the latest dual-core and hyperthreaded CPUs. Enable this for a speed improvement.
Frame Control:
These options allows you to select the three special encoding methods that will try to improve the quality of the encoding, while decreasing the file size.

DivX's use of profiles limits the use of these tools, and you may only be able to select some of these options if you disable the use of profiles.

Bidirectional Encoding - Bidirectional encoding allows for the use of B frames in the encoding, in addition to the I-frame (data for this frame is completely stored) and the P-Frame (predicted frame). There are two available options, "Adaptive Single Consecutive" and "Adaptive Multiple Consecutive", otherwise known as single and multiple B frames (may not be supported by DivX certified devices). It is recommended that you enable this option - the recommended is "Adaptive Single Consecutive". Not available for the "Handheld" profile.

Keyframe threshold
This setting determines the percentage of blocks not tracked by the motion search algorithm to trigger a scene change. Leave this at 50%, but if you do need to change it, make sure it is between 40% and 60%. This option is disabled when the "Multipass, Nth pass" Encode Mode option is selected.
Max Keyframe interval
Keyframes helps you to skip forward/backwards (seek) through the movie (when you skip, the picture has to land on a keyframe first). Keyframe are automatically inserted at scene changes, but in case you have a movie where the scene never changes, then set this to a reasonable value to avoid having no keyframes. For example, you can insert a keyframe every 10 seconds by multiplying the framerate of the movie (eg. 23.976 or 25 or 29.97) by 10 (eg. 240, 250, 300), and entering it here. Keyframes will still be inserted at scenes changes, but if the interval between keyframes (or scenes) is greater than the specified number of frames, then another keyframe will be inserted.
Motion Estimation:
Quarter-pixel search - Q-Pel (Quarter pixels) increases the resolution of motion search, and hence, will improve quality, especially with the fluidity in motion of objects in the distance. The motion search resolution is increased, the search time will be longer and hence, encoding time will be longer as well. Not available when profiles are used (that is, do not use if compatibility with consumer devices is an issue).

Global motion compensation - GMC (Global Motion Compensation) is useful in improving the quality of scenes where lots of movement (especially panning, zooming) occur, although these types of scenes are very rare in most content (and so there is only a very small advantage to enabling this option). Not available when profiles are used (that is, do not use if compatibility with consumer devices is an issue).



Video Setup :

DivX 6 - Video Setup


Source aspect
Allows you to specify the video property of the source/input video. This is necessary to retain the correct aspect ratio if your input video does not have square pixels (eg. if it is an anamorphic DVD source). Normally, your encoding software will already have a setting that deals with this (as well as resizing), so "Square Pixels" is the default selected value.

DivX 6 - Source Aspect


Cropping
Cropping allows you to remove a part of the picture that you don't want encoded - for example, the black bars on widescreen movies (they will be added back by your DivX player anyway, so there is no point wasting bitrate on them). Generally, your conversion/encoding tool will have a similar feature, so you should just ignore this section.
Custom resize :
Same deal as cropping, except this is for resizing the overall picture - you should just disable and ignore this section.
Resize filter :
When the resolution has been changed, this option becomes available. This option allows you to choose a resize filter.

DivX 6 - Resize Filter


As the various selectable options describe, these filters will determine how soft (blurry) or how sharp the output image will look. Bicubic (Normal) is usually a good middle ground type selection. The Lanczos4 option will produce a very sharp picture, but the problem with a sharp picture is that the noise and jagged edges are enhanced as well, making the picture look very unnatural. Please note that resizing will slow down encoding times. In DivX 6.2, dual-core/hyperthreading support is now supported by the resize filter, making resizing faster.
Image Processing :
Noise Reduction :
Unless your source has lots of noise in it (which shouldn't be the case if you are converting from a DVD), so you should just set it to Off.
Quantization Type
You can select between H.263, H.263 Optimized and MPEG-2. The recommended quantization is H.263 Optimized. MPEG-2 quantization may not be supported by all DivX certified devices, and hence only recommended for very specific content, but with possibly increased artifacts for other types of videos. In general, MPEG-2 quantization is not very efficient and shouldn't be used.
Interlace :
You can encode the video as progressive or interlaced. If your original source is interlaced, then encoding it as interlaced may result in a better looking picture, although it may increase file size. Similarly, encoding the video as progressive if the source is progressive will be benefitial. There are many ways to check if your video source is interlaced or progressive, but using DVD2AVI and checking for the "Frame Type" is a good way to achieve this.

The middle option allows you to "De-interlace source", which is just a way to convert the interlaced source into a progressive one. This is not really recommended, as it can lower picture quality.

DivX 6 - Source Interlace
Psychovisual Enhancement :
Just like how MP3 encoding removes bits that the human ear can't hear, to decrease file size, psychovisual enhancement does the same with the video. And just like MP3, some people can see (or hear) the difference, but some cannot. Here's what Gej (the creator of DivX) has to say about this setting:
It's hard to make a recommendation here, it depends a lot on people preferences, I personally use the "mask" psychovisual all the time, as I find it to be efficient to reduce size without generating unwanted artifacts but it's the slower option, "shape" psychovisual reduces size even more, but has a tendency to accentuate ringing artifacts (little dots around hard edges), but it's faster than "mask".


About Digital Digest | Help | Privacy | Submissions | Sitemap

© Copyright 1999-2011 Digital Digest. Duplication of links or content is strictly prohibited.