MeGUI/Computer movie files
A computer movie file is a computer file that contains audio and video. Movie files are made up of several components, and these components are largely modular, which means they can be easily swapped for other compatible pieces while leaving the other parts of the file intact. This page explains the different types of components and gives common examples of them.
Important Note: This page (and subpages) contains subjective quality comparisons. The final word in any quality comparison is your eyes (or ears), so take all comparisons with a grain of salt.
The Container[edit | edit source]
The container is the part of the file that holds everything together. You put your video (as in, the actual pictures), your audio and anything else you want inside the container, sort of like how you can store multiple files in a zip archive.
Containers are used for a few reasons:
- Allows media players to make better sense of the other components
- Allows additional features to be added to the file, such as:
- Indexing of streams
- Metadata (information about the streams inside)
- Error recovery capabilities
- Chapters and other forms of meta-navigation
The Container subpage has more information on the various types of container.
The Video Stream[edit | edit source]
The video stream contains the data about the actual pictures that are shown ("video file" refers to both audio and video, but "video stream" refers to the picture component of a "video file"). Basically it consists of instructions on how to display a sequence of still pictures.
Read about the multitude of video formats on the video subpage.
Many video formats have limitations about what can be displayed. Most video codes perform optimally when frame sizes are Mod16.
The Audio Stream(s)[edit | edit source]
The audio stream (or streams) contains the data for the audio component of the video file. Audio formats are similar to video formats in terms of the whole standard vs. encoder, so read the section on standards vs encoders in that section for information about how it works.
The audio subpage has extra information on some of the various audio formats around.
The Subtitles[edit | edit source]
In this case, 'the subtitles' refers to softsubs. Subtitles which are overlaid onto the video during playback, as opposed to hardsubs which are encoded directly into the video. Softsubs have quite a few advantages (only the main ones are outlined here):
- You can have multiple subtitle streams (i.e. different languages, different styles, etc ad nauseum)
- You can turn subtitles on and off (e.g. if your language is available as an audio stream)
- The video is untouched, allowing slightly higher quality compression.
Read more on different subtitle formats on the subtitle subpage.
Additional Information[edit | edit source]
Some of the more advanced containers can store extra stuff, such as chapter files, embedded fonts and the like. Read on to learn about some of these.
Attachments[edit | edit source]
Matroska, being the cool little container it is, lets you include any sort of random file you want as an attachment. Want to include a text file with information about the release? A zip file of the soundtrack? DVD cover? Sure! You can attach any sort of file. With Haali's splitter installed (the de facto Matroska splitter for DirectShow) you can view files attached like this in the explorer properties window for the relevant file and extract them from there.
- Embedded Fonts
- Only available in Matroska files. When muxing in SSA/ASS subtitles, sometimes you want to use whacky fonts the target computer is not guaranteed to have. If you add fonts in as an attachment to a Matroska file, VSFilter (the de facto subtitle renderer for DirectShow) will be able to make use of these fonts when playing back the subtitles.
Chapters[edit | edit source]
Pretty self explanatory. Different formats use different chapter styles: Here's an example of Matroska's:
<Chapters> <EditionEntry> <EditionUID>1</EditionUID> <EditionFlagHidden>1</EditionFlagHidden> <EditionFlagDefault>0</EditionFlagDefault> <ChapterAtom> <ChapterUID>1</ChapterUID> <ChapterFlagHidden>0</ChapterFlagHidden> <ChapterFlagEnabled>1</ChapterFlagEnabled> <ChapterDisplay> <ChapterString>Part A</ChapterString> <ChapterLanguage>eng</ChapterLanguage> </ChapterDisplay> <ChapterTimeStart>00:00:00.000000000</ChapterTimeStart> </ChapterAtom> <ChapterAtom> <ChapterUID>2</ChapterUID> <ChapterFlagHidden>0</ChapterFlagHidden> <ChapterFlagEnabled>1</ChapterFlagEnabled> <ChapterDisplay> <ChapterString>Part B</ChapterString> <ChapterLanguage>eng</ChapterLanguage> </ChapterDisplay> <ChapterTimeStart>00:09:48.000000000</ChapterTimeStart> </ChapterAtom> </EditionEntry>
Complex hey? Here's an example of OGG format chapters:
CHAPTER01=00:00:00.000 CHAPTER01NAME=Chapter 1
Much nicer. Of course, you can do a lot more with Matroska chapters, far too much more to go into detail here, apart from a brief explanation of ordered chapters.
- Ordered Chapters
- These are pretty much chapters that also refer to other matroska files for portions of the playback. For example, say you are encoding a TV series. You can cut the opening and ending out of every episode and encode them into two independant files. Then you can use ordered chapters in the main episode files to have them automatically and transperantly loaded back in again. Nifty.
Anamorphic Flags[edit | edit source]
The ability to store in certain containers (MKV and MP4) a value that will reflect the Aspect Ratio of the file on playback, in other words, to have anamorphic playback. Say you have a 16:9 movie that's encoded in 4:3 aspect ratio. Well, when you mux into MKV you can specify the playback ratio as 16/9 and your media player will automatically resize to the correct ratio on playback.