MCF spec - Introduction (original) (raw)
MCF specification, introduction
Formerly known as TMF, but got renamed to MCF because Pinnacle happens to have a format named TMF (which is not related to this one in any way).
This is and will always be 100 % free open format. To preserve integrity of this specification, you shall not distribute MCF-files which disobey this specification and especially you should not distribute software writing invalid files.
Looks like that there has been some misunderstanding about this, so I'm trying to finally clear it up: THIS IS NOT A VIDEO-CODEC - it doesn't compress video. You can put your XviD, DivX, MPEG2 or anything into this just like you do with AVIs.
If you wish to contribute or share your suggestions, you can contact developers by mcf-devel list at SourceForge. If you are writing any MCF sofware, make sure you are on the mcf-announce list, as new library releases and other major changes are announced there. http://sourceforge.net/mail/?group_id=47402
Main advantages over AVI
NOTE: some of those would be pretty easy to add into AVI and some are almost impossible, maybe rendering the file unusable for players not supporting that feature.
- The file is read sequentially, allows streaming/faster reading from slow medias, like CDs or Internet
- Error detection (it can tell you the exact position, so that you can re-download that specific part)
- Can play non-damaged parts nicely even if the file is badly damaged (no more frozen frames)
- Extended Info (like ID3 in MP3) and attaching files
- Extended Info is in fixed position, so it can be easily read by search-engines etc.
- Interlace without codec supporting it (well, you'll still want to use progressive scan, of course)
- Non-1:1-pixels (used in DVDs, SVCDs and VCDs), can improve quality
- Contains information on where to get codecs for playing the content (codecs' websites)
- Subtitles and graphical titles/logos, without external files
- Variable framerates
- Truely working variable bitrates
- Gamma-correction (better quality and same look on different platforms, like Mac/PC)
- Supports DVD-like menus and other goodies (we don't support forced copyright screens though)
- Space-efficiency (more space for movie, less for structures)
- Can be broadcasted (over one-way links)
- Solid standard; not a pile of hacks
Anyway, AVI is The Standard video-format on PC and will be for a long time. MCF must be supported in MANY players (on many operating systems) until it can be widely used. It might make its break-thru in 2002, or maybe in 2005. I'd estimate that there are enough players in 2003.
Space Efficiency
Structures add some excess space usage over pure data. The question everyone is asking is how much space MCF "wastes" compared to AVI or other formats. As MCF is improving, we are also recalculating this stuff from time to time, usually reducing our total overhead.
A typical 1CD DivX/MP3 movie is 90 minutes long and has 129567 video frames (yes, exactly that many), of which 994 are keyframes. If we interleave audio per 1 video frame, we get 259134 Blocks in total. For each of these Blocks MCF requires a Block Header (10 octets). We want optimal seekability, so we make each Cluster start with a video keyframe. This means that we have 994 Clusters. Each needs a Cluster Header (24 octets). Also, we want Seek Entries (an index for seeking), one for each Cluster (12 octets each). The sum of that is: 259134 Blocks * 10 octets + 994 Clusters * (24 + 12) octets = 2.6 Mo for the whole movie.
Avery Lee comments:
[There are] 8 bytes per sample block, optional padding byte, 16 bytes for legacy index entry, 8 bytes for OpenDML hierarchical index entry. For a file below 2 Gio with interleaving per frame, that's 64-66 bytes per frame with audio. [...] OpenDML files will have a larger overhead per frame (80-82), but typically as a smaller percentage.
The example AVI used here is 739 Mo in size. Using the info supplied by Avery we can approximate the space used for structures. The AVI is OpenDML, so the overhead is slightly above 10 Mo. If it would have been legacy AVI, it would only have 8.5 Mo of overhead. Based on this the file apparently contains 729 Mo of actual data.
Format | Total file size | Amount of structures |
---|---|---|
MCF | 729 Mo + 2.6 Mo = 732 Mo | 0.4 % of file size |
Legacy AVI | 729 Mo + 65 o * 129567 frames = 737 Mo | 1.1 % of file size |
OpenDML AVI | 729 Mo + 81 o * 129567 frames = 739 Mo | 1.4 % of file size |
It seems that we are pretty space-efficient :). Remember that we have no limits in file size, like legacy AVI does, and we also have other nice features (all data is protected in many ways, so that even badly damaged files can be played and recovered).
Comparison between MCF, Ogg and AVI
Someone came to PowerDivX forums, bashing MCF and our developers, and claiming that OpenDML AVI could solve all our problems; thanks to that, Ingo (one of our team) decided to write a comparison between the main trio. As I'm writing this, the document is still in beta-stage and contains lots of typos etc, but it can give you a good view at any format's pros and cons. It doesn't contain the latest info about MCF though.
The document is constantly updated, so it is in the CVS. Here is a direct link: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/mcf/doc/container_comparison.html?content-type=text/html
File extensions
All MCF-files will have extension .mcf, but there can also be sub-extensions, explaining the content:
- .mcf - MCF-file, no content type specified (maybe due to limitations of 8.3 filenames)
- .av.mcf - MCF-file, containing audio and video (this is the normal case)
- .video.mcf - MCF-file, only containing video
- .audio.mcf - MCF-file, only containing audio
It is highly recommended to specify content type in the file extension, so that people can use different players for different types of MCF, and are not forced to watch video with WinAMP nor to play music with Media Player.
Site Map
- Introduction (you are here)
- Technical part (main part)
- In-depth information for not so technical people (coming later) (help wanted, feel free to write it)
- MCF-supporting software (coming later)
- Players (coming later)
- Editors (coming later)
- Converters, validators and other utils (coming later)
- Downloaders/streaming (coming later)
- Libraries for handling MCF-files
- Samples of normal, weird and broken MCF-files (coming later)
- Images (icons and banners)
- MCF-CD draft (burn more data on a CD-R)
- Latest changes
People more or less involved
Alban Bedel, BlackSun, ChristianHJW, Dago, Doom9, EverWicked, Ingo, Avery Lee, robUx4, Tronic.
Others whose names I couldn't recall.
Big thanks to everyone!
Mail Tronic if you should be listed or if your name is mistyped or something.
You can reach some of us at #MCF on irc.openprojects.net