How to convert video to required codec?
You can use ffmpeg to perform this conversion. Grab the 32-bit static build from here.

And run the following command from the command prompt:

ffmpeg -i "c:\path\to\input.avi" -c:v libxvid -vtag xvid -qscale:v 3 -c:a libmp3lame -qscale:a 4 output.avi


You can experiment with the value of qscale:v to get the quality or file size that you need. Values from 1 to 31 are accepted, with 1 being best quality (and largest file size) and 31 being worst quality and smallest file size.