I suppose you mean mp4 instead of avi, as avi is only a container. So the discussion is two-fold, the container format (mp4, mkv, avi) and the encoding of audio, subtitles and video, of which the latter, h264 is pretty much the standard, and xviD/Divx are and have been for almost a decade, deprecated.