Most MPEG-4/H.264 codecs are probably the best choice for HD video. XviD is free and easily available from sites such as
http://www.koepi.info/xvid.html if you don't have any H.264 codecs installed already. DivX works as well but typically is a lot more annoying to install and may put watermarks on your video.
I've heard XviD may crash because of the extra window it pops up when encoding unless you go to it's options (Configure) and select Other Options and uncheck "Display encoding status".