Full name: Audio Video Interleave. This is probably the most common container format out there, which is due to the fact it can be played in almost every media player and on every operating system / platform. It was created back in 1992 by Microsoft.
AVI is often seen as the 'baseline' of video containers, because it supports the least number of features and is the oldest and most common. Some people still prefer this container over others, this guy points out that AVI supports many of the features that newer containers (like MKV and MP4) do, however this support is usually non-standard or bad. Despite this, if you don't actually need any of the features that the more advanced containers support, AVI might be all you need.
Verdict: Fine (sort of, you should still prefer Matroska) if all you want to store is xvid+mp3, but anything else requires a better container.
Full name: Flash Video. The container used by Flash to stream video. It's what the flash player streams on sites such as YouTube etc., and what you download from them when you use a site like KeepVid. Almost always holds MP3 audio and either h263/h263+ or VP6 video, it can probably hold other formats but there is little reason to do so. Since this should not be a format you should encode to (unless you want flash video), there is no verdict for usability.
Full name: Ogg Media. Originally developed by Tobias Waldvogel as a means to use the amazing new Vorbis audio codec (at that time) with your typical MPEG-4 ASP video formats. Considered by many a "hack" of the Ogg container to fit in such video formats. The format became extremely popular for a short time as it allowed chapters, multiple audio streams, and softsubs to be added in the container. Eventually though development declined for the OGM "standard" by Tobias and was eventually taken on by the Xiph Project. However their stance seems to still be ignore it's existence. The formats use eventually ceased to exist with the rise of the Matroska container, which could do everything it did and more and with less overhead.
Verdict: Less features than Matroska, and with a higher overhead. Unless you have some wacky device that can play ogm but not mkv or similar, you probably shouldn't use this.
Full name: Matroska Video. Probably the best container for computer playback, you can do almost anything with it. It allows the use of all video formats with ease, uses any audio or subtitle format you want and provides advanced features such as vfr encoding, chapters, and softsubs. A common misconception with it is that it requires more CPU to decode than normal AVI, which is true, sort of. It requires such a tiny increase in CPU that you can safely assume there to be no difference. Matroska also offers lower overhead for muxed files which decreases filesize and allows you to pack more bitrate into your video and audio files.
The homepage is matroska.org, but it doesn't really contain that much information useful to a precious newbie like yourself.
Verdict: The most versatile container around. It's lovely!
Full name: MPEG-4 File Format. The first version was finalised in 1998 and standardised in early 1999. It was the first MP4 file format developed by MPEG and primarily designed for web video and portable hardware (such as mobile phones). Version 1 was superseded by Version 2 shortly after, at the end of 1999 (standardised in 2000) and is fully backward compatible. Since then, MP4 has been extended, and constantly developed.
In addition to supporting the latest MPEG standards, it is also backward compatible with older standards. In MP4 you can contain:
- h263 (and extensions) (via .3gp which is a simplified MPEG-4 V1)
- MPEG-4 ASP and MPEG-4 AVC (H.264) video
On the audio side you can store
- SLS (a scalable lossless extension to AAC)
- AMR (via .3gp)
- CELP & TwinVQ (for low bitrate/speech)
- SAOL (MIDI)
- ALAC (Apple Lossless)
- ALS (MPEG4 standardised lossless format)
It also has its own softsub format, 3GP timed text. Last but not least, MP4 support JPEG & PNG image formats.
MP4 also has a user data atom where you can store meta info about the stream, album art etc. Through the use of private streams, you could also mux Vorbis, AC3 or DVD Subpictures. This is not standard and players aren't required to support it. If you want such features, this is the time to use MKV. MP4 also supports menus (there are working players and examples to test).
Bond has a very informative MP4 faq posted at doom9.
Verdict: Doesn't support as many formats as MKV, but it supports all the common, popular formats and ISO standards helping to ensure interoperability. MP4 has more "out of the box" support than MKV, this is reflected in commercial software and hardware players, but obviously audio/video decoder support is another matter. If you want native MPEG-4 ASP or H.264 video with MP3 or AAC audio, or you just want to transmux a .ts or .mpg file, MP4 offers just that. If you want softsubs and vorbis, use MKV.
Full name: Quicktime Movie Format. This format is a proprietary format from Apple. Supports a lot of the stuff that mp4 does, however those are considered unofficial hackish use and will not play in its native player.
Verdict: Do not use this for anything other than iPod files.