Are you starting with a dvd video and going to divx/xvid? If so you can use a free program called AutoGK to go to xvid.
There are quite a few programs that can encode to xvid for you. Xvid4PSP (it can encode to many formats), SUPER, WinFF, FairUse Wizard, etc. Most of them are free. Look through the conversion programs available over at www.videohelp.com