Both AVI and MP4 are the media container formats while the former uses the DivX codec and the latter supports the MPGE-4 codec. Another difference is that AVI has a larger file size and brings higher quality, and MP4 adopts a lossy compression to reduce the file size, but the video quality will be affected as well.