simply put ...the codec that gives the Smallest file size for preceivably the same video quality = MEPG-4 H.264
(this is assuming you are asking about the free and most widely available codecs as of May 2010...)
AVAILABLE CONTAINER FORMATS for this CODEC type include:
XviD (MPEG-4 ASP codec), DivX H.264, Elecard H.264, Intel® MediaSDK AVC/H.264, MainConcept H.264, Microsoft Expression, Encoder, Theora, x264
This brings about some questions like (will I save more space if I compress XviD to DivX or MPEG to XviD..or RAW to Xvid?) If your not sure then seek out an MPEG-4 program to do it for you and save the headache. Containers also factor in player features/usability/flexibility/security.
Some convert programs automatically choose for you according to the professional opinion of the programmer. also some programs ask you the final size you want for the video, then automatically choose settings for you including screen size, codecs and more.
more detail: really you are mixing both 'video and sound' and therefore have to choose between a mix of different compression methods for both. Its a question of how much quality and size, versus time it takes to convert. (cloud hardware or home hardware)
the fallacy is that the more you compress the more quality you loose...'lossless vs. lossy compression' ....
or that you need to reduce the size of the video...
video compression is really a scheme of 'blocking' up groups of pixels. Then they are decoded and encoded according to how much detail is needed to render the picture. fast car = higher bitrate & higher frequency of decoding...
in reply to: "The H.264 codec has very good quality and file size.
But, if you want a lower file size, you should lower the bit rate and/or resolution, either by using a video converter, or re-rendering it with video editing software. Doing this will decrease the video's quality."