The relationship between Divx, Xvid, and MPEG4 is often confusing. I'll try to explain it:
MPEG4 is the name for both a video codec standard, AND a file format standard used for storing both video and audio (using the MPEG4 video codec standard and AAC audio).
Divx and Xvid are names of MPEG4 video codecs. They are both based upon the MPEG4 video codec standard, and produce MPEG4-compliant video. Divx/Xvid video, however, are rarely used in standard MPEG4 files. Instead, they're most commonly stored in AVI files, along with mp3 audio. This is partly because when Divx was first becoming widely adopted, the MPEG4 file format standard was not finalized, and the archaic AVI container has just sort of stuck. Also, originally Divx was NOT an MPEG4-compliant video codec. It was originally adapted from Microsoft's own proprietary implementation of "MPEG4" (which wasn't
really MPEG4 at all...oh, Microsoft!). Divx was the name given to the codec after it was "cracked", and now it has been advanced by a separate group of developers (not Microsoft), and is MPEG4-compliant.
Still confused? Let me put it another way.
MPEG4 is a set of rules defining how video can be compressed. However, there are many different ways of encoding video while still obeying these rules. An encoder needs to make many decisions when compressing video, because there are many different ways to obey the rules. Some encoders are built for speed; others are built for quality. So there is room for many distinctly different encoders, such as Divx, Xvid, QuickTime's MPEG4 encoder, etc. They all obey the MPEG4 rules, but they do it in different ways.
-----END OF LONG CONFUSING EXPLANATION-----
Now, a fully MPEG4-compliant file needs to use MPEG4 video (which could be produced with any of the encoders I mentioned above), AAC audio, and must be stored in a .mp4 file.
QuickTime can easily produce such files, IF you have QuickTime Pro.
My personal favorite way of creating .mp4 is a great freeware program called
OpenShiiva. It takes DVDs or QuickTime content and converts them to fully-compliant mp4 files. Plus, it gives you high-quality scaling and cropping abilities, and lets you choose which encoder you want to use to create your MPEG4 video. QuickTime only lets you use Apple's encoder, but OpenShiiva lets you use Xvid (which is generally considered the best out there), Divx, or 3ivx.
Whew! Hope that helps!