Arian Kulp's Blog
opinion, insight, and occasional code

Windows Movie Maker [MSWMM]

Tuesday, May 27, 2008 11:10 AM

So what's the deal with the file format used by Windows Movie Maker?  I had this vague memory that it's an XML file format and I opened up a file last night to take a look at it.  It's a binary file containing a chunk of XML toward the end.  I also use Camtasia, and this is a completely XML-based format.  Not using straight XML is a liability here since 3rd parties can't interact with Movie Maker as well.

After digging into it for just a bit, there's the Unicode XML blob at the end, but there's a lot more.  For each clip/photo, there's an embedded thumbnail (JPEG format -- look for the JFIF string).  There's also lots of padding.  As a true binary format, there are efficiencies to padding things out to certain sizes.  There are also snippets of text for machine name, user name, DOS filenames (8+3 naming).  These could be random bits if the app is just saving a chunk of contiguous memory, or they may be meaningful.  It seems like the only relevant bits should be the XML and the thumbnails.  Since binary data can be contained in CDATA chunks, there's really no excuse for the file to be binary-based.  To really simplify things, the thumbnails should be able to be skipped.  Movie Maker could certainly regenerate them next time.

I'm going to continue digging into it a little, but I'm afraid that I won't make much more headway.  I did find an SDK, File Expander by Forensic Innovations, Inc. that can open and extract file parts, though I don't know if it can be used to create new files, and the SDK isn't free.  There's also the checksum for the XML that is contained in the file.  Even if you tried to manually edit things, it would fail to load as a corrupted file.

Companies take note: binary is bad!  Avoid it any time you possibly can.  Images, photos, video, sound are going to be binary, but so much needn't be.  If size is a concern, then ZIP compress it afterwards (a la Office 2007), but don't scramble the data itself.  All that you do is stifle innovation of your software from others.  You may want to "own" every aspect of your software, but you only limit yourself if you do (see my previous post on this).  Enable an ecosystem of third-party extensibility and you will see your application become more popular than you ever expected.  You will see it do things you never imagined.  Remember that given the choice, most smart users will choose the more open, flexible tool than the closed Swiss Army application.  Even if the open tool doesn't support everything in the Swiss Army app, someone can build it on later.  It's win-win.




Feedback

No comments posted yet.




Post a comment






 

Please add 6 and 1 and type the answer here: