VirtualDub. In my opinion, this is a no brainer. Vdub is free, has few limitations, and works well. It's small, and it's what a good portion of the AMV/Anime scene uses for compression outside of their editing programs.
Of course, the downside is that it doesn't come with any codecs. However, if you have a codec pack installed, like CCCP or k-lite codec pack (which is outdated now, but either way) you should have the codecs required. There are lots of options, and I would highly suggest reading up a bit on how some of those options work.
And for what codec you should use, I personally suggest h264 encoding, if possible. It generally achieves higher quality and compression than divx and xvid (xvid tends to wash colors out, but does achieve better compression than divx)