Dude
I had the exact same problem, what i had to do is change the Four CC code using (Mini AviC Four CC Changer) its a free download but hard to find somethimes when u search for it, but there is an Xvid program that has it included, what i have to do is open the Xvid movie in virtualdub1.3 extract the sound file, and save it as a .wav file, then save the video file with no sound as an .avi file, then uninstall the Xvid codecs, open the Fourcc changer and change the Xvid files to divx file.
That way you shouldnt have any probs ancoding the files in Tmpgenc

.
I know its a long way to do it but it really works well.
GaZzA