.avi, .mov, mp4, those are all container formats for whatever codec is used for the media inside. When you use QuickTime Player choose File->Export instead of File->Save As and there select Movie->QuickTime Movie or Movie->MPEG-4 and in the Options you can select H.264 for the video codec and AAC for the audio. That's the most efficient option, but requires QuickTime 7. If you want to be more compatible use QuickTime Movie with Sorenson 3 as the codec.