Advanced

Under the Advanced tab you'll find even more tabs that divide the settings into four sub-groups called Video presets, Pre-processing, Codec, and Audio.

Advanced Video presets

Video Presets

You can waste away your years tinkering with all the settings under the Advanced tab, but Dr. DivX trys to simply things for you. Stick with the Video presets tab and just move the slider left or right until you find the settings you'd like. The doctor tries to make a tradeoff between speed and quality depending on where you place the slider. There's a good chance one of the many presets will be adequate for your needs.

If the presets don't look tempting enough for you, then uncheck the Use presets checkbox and proceed on to the other three advanced tabs. You are sure to find more settings then you'd care to look at.



Advanced Pre-processing

The Pre-Processing options are split into three boxes named Crop, Resolution and Image Processing.

Crop

Automatic Crop Example

The Crop box does not refer to vegetables. It's a technical term that folks use when they cut up pictures. If you check the Enabled box, you can shave unwanted borders off your input video. There are many reasons why you might want to trim the picture down a bit. For example, you may be planning to watch the output video on a tiny cell phone with a square display. In that case, you could trim some columns of pixels off the left and right so you end up with something that fills the screen of your phone.

It's also quite common to see letter boxed videos that include black borders along the top and bottom of every frame. Dr. DivX will happily encode the black borders that appear in the original source. However, that just makes your output file larger and doesn't really enhance your viewing pleasure. You are probably better off trimming down the top and bottom.

Videos with borders are so common that Dr. DivX includes an Automatic Crop option that does the math for you. Instead of manually counting the number of pixels you need to crop, just check the automatic button. The doctor will figure out where the black borders are and dutifully trim them out.

You'll find the automatic setting works great most of the time, but keep an eye on the results in the preview window. Sometimes videos don't provide a sharp break between the border and the picture. If the video contains pictures that kind of fade into the border, Dr. DivX will have a hard time automatically finding the best place to crop. You may have to manually adjust the crop settings to ensure you've eliminated every row of black pixels.

What's the big deal? Why worry about a few rows? In fact, why not just leave all black borders exactly where they are? The answer is rooted in the way video compression algorithms work. The DivX codec achieves miraculous compression ratios by eliminating tiny details that you don't notice. It turns out that encoding thin black lines is tough. Your output files will be measurably larger and/or your picture quality will be noticeably worse if you keep borders on every frame.

Image Processing

Image Processing Options

As if pounding your videos into different resolutions isn't enough, Dr. DivX offers a few advanced image processing options for you. The Image Processing box really dives deep in to the voodoo of video compression. Don't worry; the following sections describe these options in fairly plain language.



Noise Reduction

The noise reduction filter attempts to smooth out grainy images. This usually makes it easy to compress videos but it can also make the images appear flat. Dr. DivX can perform various degrees of noise reduction from Light to Extreme or you can just leave the option Off.

Quantization

When encoding video, Dr. DivX looks at differences in small blocks of pixels and basically rounds them off to a set of predefined thresholds. This process is called Quantization and it is a key step in achieving the high compression ratios that DivX delivers.

There are two sets of Quantization thresholds available. The old-timers may prefer the original H.263 collection. However, the first H.263 quantization values were later optimized and Dr. DivX recommends you try the H.263 Optimized set.

Interlace

Interlaced video attempts to make motion appear smoother by alternating between two frames on every other line of a display. Usually this appears like jagged edges when you slow the video down and look at one frame at a time. At full-speed on a standard television, the video will look pretty good so Dr. DivX will create interlaced videos if you'd like. However, for high definition televisions and computer monitors you'll want to stick with the Progressive Output setting which does not interlace frames.

Psychovisual Enhancements

Psychovisual Enhancements is based on visual property of Just Noticeable Difference (JND). When Psychovisual Enhancements is not off, Dr. DivX will analyze each frame and concentrate on areas that are more noticeable to the human eye. These are areas of high contrast, while large areas of low contrast are averaged out and the number of colors is reduced. Usually, this results in smaller file sizes and an overall increase in visual quality of the movie. It also means that the encoding process will take a bit longer.

Other than off, there are two settings available for Psychovisual Enhancements. Shaping attempts to enhance fine details in the texture and mask differences between the source and encoded video in complex textures, which make them much less noticeable. In other words, it shapes the texture based on certain parameters.

Masking uses a slightly different algorithm, whereby each block in the frame and the surrounding blocks are analyzed such that the psychovisual enhancement introduces minimal artifacts.

While it's a matter of personal choice, generally shaping produces better results in almost all circumstances. Masking may be more visually pleasing for anime videos.

Resolution

Resolution Settings

Except around New Year's Eve, resolution refers to the number of pixels that are used to make each frame of your video. The resolution and aspect ratio together determine the picture size. The whole thing is particularly confusing because not all pixels are square.

It will be easier to understand if you consider an example like a DVD movie. Please keep in mind that decrypting movies from DVDs is illegal in the U.S.A., even if you own the disc. However, suppose your wedding video was shot by Francis Ford Coppola and burned on to an anamorphic wide screen DVD years ago. Now you want to convert that video to a DivX file.

On your television, the film may appear in a dramatic 2.35:1 aspect ratio with black borders on the top and bottom. Like most DVDs, you'd find resolution of the video file is 720x480 pixels. Since the film is anamorphic, your DVD player knows to stretch the video horizontally before you see it. So if the DVD knows that the pixels are supposed to be about 1.57 times wider than they are tall, the end result will be a widescreen picture with a 2.35:1 aspect ratio.

Unfortunately, it's not that simple. If you look at the video file on the DVD, you'd see that it claims the pixels are 1.18 times wider than they are tall. Then, you'll notice that there are 60 rows of black pixels across the top and bottom of every frame. Yes, it's crazy, but there are actually just 360 rows of pixels that make up each frame. Once the DVD player stretches the picture horizontally by 1.18 and you account for 120 rows of black pixels, you end up with frames that appear to be about 2.35:1 which is what Mr. Coppola had in mind all along.

Sadly, things are even more complicated than that. Not all videos will have borders exactly 60 pixel high. Some will be 55 on top and 65 on the bottom. Some will have 5 to 10 columns of black pixels on the sides. You just never know what you'll find.

The automatic cropping feature should make it easy to get rid of the borders, where ever they are. Just be careful with the resulting resolution. Dr. DivX only makes videos with square pixels so the aspect ratio will be defined by the resolution you choose. Most of the time, for 2.35:1 films, you'll want to crop the borders and resize the video to 720x304 pixels. High Definition Television is usually 16:9, so resize those videos to 720x400. Standard Television is 4:3, so 640x480 is a good size in that case.

Resize Filter

If you are resizing your videos, Dr. DivX gives you several resizing filters to choose from. It turns out that resizing a digital picture can be accomplished many different ways. For example, to cut a picture in half, you could just remove every other pixel. That's actually a rather crude technique and the results are very satisfying. What you'd rather do is take some kind of average between neighboring pixels and use that instead. Lots of mathematicians like Cornelius Lanczos spend countless hours trying to find a better way to resize pictures. Each algorithm has different tradeoffs between things like quality and encoding speed. You can try some experiments to find your favorite, or just settle for default option.

Advanced Codec

Codec Performance

The Codec tab under the Advanced tab is divided into three areas. They are Codec Performance, Rate Control, and Frame Control described in the following sub-sections.


Codec Performance

The options available for Codec Performance are the same as the Quality options on the Basic page. Flip back to the Quality section of the User Guide to jog your memory.

Rate Control Based on Bitrate

Rate Control

Adjusting the Rate Control setting begins with choosing a Mode. Would you like 1 pass or 2 passes? The answer may depend on how much time you have. The 1 pass option works just fine, but if you insist on getting the best possible picture quality, then tell the doctor to make 2 passes through your input file. That ensures that Dr. DivX doesn't miss any opportunity to optimize the picture quality but it also means the whole process will take about twice as long.

After you flip a coin to decide how many passes to make, you need to choose a maximum Bitrate. The higher the bitrate, the better the picture but it also makes for larger file sizes. You have to make the tradeoff. In practical use, video codec bitrates over 1300 kbps look clear even on big screen TVs. You'll certainly find them better looking than your average television broadcast anyway. If you are encoding files for small screens like PDAs or phones with only 320 pixels across, you may want to run the video down to 130 kbps. The result looks pretty decent on 3 inch displays and an hour of video is only slightly more than 100 Meg in size.

Rate Control Based on Quality

If quality is more important to you than file size, then try out the 1-pass quality-based mode. Using this option you get to pick a target quantizer. Sound nifty? The quantizer is just a number between 1 and 31. Opting for a lower number will give you better picture quality but you'll also get larger files. Larger numbers reduce the file size but give you worse quality.

In practice, a quantizer of 4 is good quality with reasonable file size. You may want to move it down to 3, but anything less than that won't make much visible difference for most people.

Frame Control

Frame Control Box

The Frame Control box will allow you tinker with key frames and rates. Each setting is explained in the following sub-sections.





Bidirectional

While many of the settings available under the Advanced Codec tab will simply affect picture quality, the Bidirectional setting can affect compatibility so this is an important one to consider.

Without going into too much detail about how video compression works, you should understand that the output file is basically a mixture of partial images with a few complete pictures sprinkled around (keyframes). DivX will start with a complete picture then progressively apply changes to make the picture move. Every once in a while, a new, complete picture is displayed and the process starts over again.

Turning the Bidirectional setting off, reduces the number of complete pictures that a DivX player has to track while displaying your video. Changing the setting to Adaptive Single Consecutive, makes DivX players remember more pictures at one time.

The catch is, not all players are capable enough to handle Adaptive Single Consecutive encoded videos. Particularly, small devices like phones may have trouble playing those videos. However, any devices that are DivX certified for the Portable profile or better, will be able to handle those videos with no problem.

You certainly want to use Adaptive Single Consecutive if your DivX player can handle it. Most can and it will provide significantly better picture quality in almost every case.

Max Keyframe Interval

Fundamentally, video compression is achieved by not including every frame from the original video. Only a few key frames are included in the compressed video. The DivX player creates the frames in between by incrementally applying the necessary differences. Dr. DivX tries to figure out the best place for keyframes and will try to go as long as possible without using keyframes. This gives the highest compression but it's also a lot of work for the DivX player. The Max Keyframe Interval allows you to limit how long Dr. DivX will go without a keyframe.

If you are experimenting with low-bitrate encoding, you may want to increase the Max Keyframe Interval to improve the over-all quality assuming your player can handle it.

Framerate

The Framerate setting controls how many frames per. second will be displayed while your video is playing. The exact numbers available for you to choose from will be dependent on the framerate of your original video, but you'll usually have two options that amount to full-rate or half-rate. Typically, you'll want the highest framerate possible. However, if you are making videos for small, portable, slow devices like PDAs or cell phones, you may want to drop the framerate to make sure that the player will be able to keep up. The result might not look as smooth but at least it will play.

Advanced Audio

Advanced Audio Tab

Each audio track can be encoding using different quality settings. For example, you may want the main audio to use a high bitrate for the best quality. At the same time, you could use a low bitrate for the director's commentary track to reduce the overall file size.

Select each track, one at a time, from the drop down list. Choose the encoding settings you want to use for the selected track. Most of the settings are fairly obvious although for MP3 files, you have a choice between CBR or ABR mode.

In Constant Bitrate (CBR) mode, the bitrate will be the same for the whole file. It means that each part of the audio will use the same number of bits. As a result, complex parts of the music will be of a lower quality than the easiest ones. The main advantage is that the final size won't change and can be accurately predicted.

In Average Bitrate (ABR) the encoder will maintain an average bitrate while using higher bitrates for the parts of your music that need more bits. The result will be of higher quality than CBR encoding but the average file size will remain predictable, so this mode is highly recommended over CBR. Unfortunately, not all players support ABR mode during playback.

Near the bottom of the Advanced Audio tab, there is a check box to encode all selected tracks with these settings. You may find this option handy if you are converting a video file with lots of tracks.