DivX it for the computer - update July 2003

This page modified July 2003 - updated content for a later version of the codec.

My Home Page from here.

July 2003: 18 months has passed since this page was written and of course there are changes in the DivX codec and its presentation. Its now reached new heights at version 5.05 and is still, in my view, the best alternative for the computer although some of the later MPEG1 encoders will challenge. The process described is time consuming to achieve, by comparison with the times take to achieve the mpeg alternative, DivX takes at least 3 times as long. I currently use a P4 2.4G computer.

This page is essentially the same but some information is deleted as changes in version 5.05 have superceded the original discussions and instructions.

This page is not about getting the very best out of the DivX(tm) avi Codec. It is however, about using the codec with DV handicam source material that has been edited in Premiere 6 or 6.5 and is ready for exported for use on a standard auto start CD-R so that your friends and relations can enjoy your masterpiece without the need for appropriate software or a DVD player that plays DVD-R’s or DVD+R’s.

Because the codec is not resident on the computer I will assume your friends or relations are capable of downloading the latest codec from the DivX(tm) web site and installing the codec on the computer as necessary.

So lets use it!

This paragraph does not indicate or refer to any specific limitations of the codec itself, it is a list of the limitations associated with editing and authoring an outcome suitable for playing on almost any computer.

1) Since the aim is to achieve a product that is suitable for playing on a computer the 2x CDROM is used as the basis and means employing a maximum data rate of approximately 300KB/s (2400 kbits/sec) including sound. This is far below the capability of the codec.

2) Even though “the playa” from DivX is far better than it was 18 months ago the MS Windows Media Player is used for this discussion. Further down the page is the syntax for an auto start file for the Windows Media Player. You should take note that DivX include the version number in the exe file name of their player so any CD-R with a DivX player auto start will have a life only with that player. When they update their player, as no doubt they will, the CD-R will no longer auto start with the new player. The choice of the windows player is therefore based on extending the life of the auto start file.

3) The authoring tool is Adobe Premiere 6 or 6.5 and in my case, is based on editing DV handicam material captured with firewire using standard MS DV capture methods. The DivX outcome is not the prime objective of the editing process, it is only secondary to a DVD-R for playing on a set top DVD player.

4) It matters not if the project is an original camera capture or one made from archive tape using what ever “capture” program your currently using. The DV source will have frame sizes of 720 x 576 (PAL) or 720 x 480 (NTSC) and will be interlaced. You can actually substitute other source material such as that associated with analogue capture cards and systems and the process is the same. The output is a VGA square pixel avi for your choice of viewing aspect ratio.

5) As it is has been assumed the project has been edited for another purpose that involves a TV it is therefore an interlaced fields project based on the standard DV field order of “lower field” first. Only the “export” settings will or need to be changed. None of the project settings need to be altered at all, they remain as standard DV.

6) The viewing aspect ratio will be either standard 4:3 or 16:9 being dependent on the original shoot settings. 99% of what I shoot is 16:9 these days having already made the transformation for the future. You choose what ever suits your needs.

7) For the 16:9 aspect ratio the widescreen process system is as discussed on my web page specific to that subject. The process is applicable to both poorman’s and to the anamorphic widescreen process as described.

Of prime importance in this exercise it how much video can I get onto a CD-R?

There is no magic about this at all, it is purely a data rate calculation problem for the average required to achieve the proposed track time. This has been given on my other pages and is repeated again here. Remember however, we are dealing with an ordinary data disk. I will assume a standard 80 minute CD-R which has a data capacity of 700megs. The equation for the maximum data rate is therefore:

700 times 136.5 divided by the total video track time required in minutes.

As an example if you require an hour on the disk then the calculation results in 700*136.5/60 = 1592 kilo bits per second as the average required for video and audio. If you wish to use the full data rate associated with the assumption of a 2x CDROM then the time that can be fitted is no more than 700*136.5/2400 = 39.8 minutes.

In all of these calculations the sound is included as part of the average. If you wish to use full 44.1/16 bit PCM stereo sound then you will need to take off 1376 kbits/s from the calculated answers and that results in the basis for setting up the encode. So as you can see, sound content is going to be an interesting subject in the setting up discussions below.

You will also have to cope with Premiere giving achieved data rate information in "kilo bytes" and not in "kilo bits" (8x). Nothing is easy in a mixed up video world, it all seems to hinge on whether its a render or an encode. I have used kilobits in this discussion as that is what DivX uses where k=1000.

Achieving data rate accuracy may well be another thing!

Where you require longer track times you may have to consider reducing sound quality for better vision quality in the end result. That is entirely your choice.

You may also opt to instruct the receiver of your presentation that the track on the data CD-R must be copied to the hard drive, in which case, of course, there is still a time limitation based on the same 700 meg data file. Take for example you could encode at and achieve an average of 6000 kbits/sec, including sound, and that would result in a hard drive file with a track time of almost 16 minutes. – maybe its worth considering for those special occasion’s as the results will be quite stunning!

SETTING UP FOR EXPORT – Initial Decisions!
The project is based on interlaced fields and therefore for a progressive scan computer screen the export must be de-interlaced. However, DO NOT use the DivX codec option for de-interlacing, USE the Premiere 6 or 6.5 option as will be described, it provided in my tests, by far the best motion on the computer screen. Although this paragraph was written 18 months or more ago I still find Premiere, as old as its engines are, still gives better de-interlaced results with DivX and the DV source material I am using. You just need to do your own check and make your own choice.

Choosing the frame size for the picture! Many will want to play the product full screen. Be aware then, that unless you encode it full screen size there will be a loss when the smaller image is stretched to fill the screen, particularly so for large definitions. You will make your own choice for that aspect.

My preference is for “non full screen” as I wish to see the player controls. In 16:9 768 x 432 is perhaps as large as I would like to go. Maybe even 640 x 360 is a nice selectable size. Again its all your call.

Autostart the CD I think its important to provide a CD that will auto start in your friends computer. No big deal as it is only a specific written “autostart.inf” file containing text and for windows media player the following will suffice, assuming your system hard drive is C:

open=C:\Program Files\Windows Media Player\ mplayer2.exe /play /close \File.avi

SETTING UP FOR EXPORT – Premier 6 or 6.5
Having edited your project it is recommended you make a specific Premiere export template containing the following settings, you only have to make it once, save it and reuse it each time you export using the DivX codec:

Timeline File - Export Timeline - Movie - Settings Gets from the timeline to the export window.
General File type = Microsoft avi.
Range = Work Area
Selecting work area allows easy setting for checking exports.
Video Compressor = DivX Codec (current version loaded)
Depth = millions
Configure to be discussed separately below.
Video Pixel Aspect Ratio = Square (1.0)
Frame Rate = 25 PAL or 29.97 NTSC
Frame size tick 4:3 and enter the width you require to use.
untick 4:3 to enter 16:9 dimensions where height must be 0.75 the width.
If necessary make a template for 16:9 separately, frame dimensions are the only differences.
Audio Rate, Format and Compressor is your choice
Interleave = 1 Frame.
If uncompressed 44/16 stereo = 1376kbits/sec
22/16 stereo = 688kbits/sec, 11/16 stereo = 344kbits/sec
Note the value for configuring the codec.
You may like to consider audio compression.
Keyframe and Rendering Untick all options, Fields = No Fields Converts interlaced fields to frame based.
Special Processing Modify – select de-Interlace,
if the frame is not masked, crop 4 frames
from the top of the frame
do not tick scale.
de-interlace at the export stage tested better than by doing it in the codec options.
Removes the wobbly line that can occur in the output.

Save the template giving it the name of your choice, perhaps DivX 43 Export. You can load this template at any time and can modify it to suit your needs in the normal way.

Follow the same procedure for 16:9 project exports, call the template DivX 169 Export perhaps. You could use use a frame size of 736 x 416 (306176) as this also relates very closely to the same number of pixels in a 4:3 640 x 480 (307200). Note: Save the template but do not use the colon in the aspect ratio.

How you configure the codec controls the file size outcome. Unfortunately all types of encoders are renowned for not achieving set averages, you MUST check your file average with a test as the results may vary from source to source.

Remember from the discussion so far and the calculation of data rates to fit a file on a CD disk that sound is included in the average. You must allow for the sound content by subtracting it from the calculated average. There in lies the compremise you must make in the quest for image quality on the computer screen when playing from a CDROM.

Here then are the settings I have used for testing both PAL and NTSC. I opted to use 11/16 bit stereo for the exercise so 344kbits/sec comes off the calculated data rate as noted in the discussion.

The table below assumes you have the export window open in P6 or 6.5 and can activate the video tab and Codec Configure button:

DivX & General Parameters VBR mode = 1-pass
Set Performance/quality to Slowest
Set Bit rate to 2050kbits/sec
Select Profile to suit needs
select progressive scan output.
data rate average of 2400 – 344 = 2056, wonder how close we can get?

Burning! simply burn a standard data disk in your burning sofware/CD burner that includes the autostart file. Fire up the computer by putting the disk in the CDROM and ENJOY!

Trouble shooting when the CD-R does not play correctly! If you experience jumpy play back from your CDROM it will be a indication that the data rate is too high either as an average or as a peak (see below) which may be above the limit of a 2x CDROM. You will have to reduce the data rate setting in the DivX encoder settings.

When you have the player freeze for a moment and then carry on! This is an indication that a peak data rate well above that set and well above the limit of the CDROM is occuring. You can check this in Premiere 6 or 6.5 by looking at the graphics in the file properties pull down. The image below is a classic case of just this. Notice how the achieved hump occurs at well above the averate of 275, indeed its 3 times that value and if you get that then there is little you can do when the encoder does not control the average well enough. The image on the left is the place where this occurs, its a NTSC source and project..

If you have playing problems with “The Playa” supplied, try using Widows Media Player as described here, Good luck.


First written 30 October 2001.