This has been talked about many times before if you would do a search.
H.264 is the newest and best codec. It keeps very good quality at a very low filesize. The problem is, HTC only lets you record 800x480 and lower with h264. To use 720p on the phone, you have to use the old mpeg codec, which basically sucks. So the best thing to do is try it out. I have found that 720p with mpg and 800x480 with h264 produce VERY similar results.