|
|
|
|
|
Creating Custom Titles and Credits Author: Rehan Ahmad Summary: Windows Movie Maker contains an undocumented feature that allows users to add customizations for built in titles and credits. These custom titles and credits are created via the similar xml interface as described for effects and transitions. The new customization feature allows the users to overcome many technical limitations in Movie Maker for example exact placement of text and overlaying a transparent image as a logo. Table of Contents
IntroductionIn this article I would like to share a secret about Windows Movie Maker. In simple words the secret is that Windows Movie Maker supports an undocumented way to customise Titles and Credits in a similar way as custom effects and transitions are made via writing xml code. When I discovered this a few months ago I wanted to produce a tool (so called TitleMaker) that can generate the xml for custom titles and credits as different parameters are modified. So I kept the secret hidden while I worked on the tool. However due to my other engagements this project did not make much progress. Now recently some other inquisitive people have independently discovered this secret and so it became impossible to hide it any longer. It is about time that this knowledge be shared with general public who may be able make better use of it. I can imagine this information will be most welcome by many users who have been complaining about Movie Maker's restrictions about titles and credits. BackgroundMovie maker is a really great tool for quick editing of home movies. Its ease of use and simplicity means whoever uses it once becomes almost addicted to its way of working. Its major feature is drag and drop simplicity. Bring in a movie clip, drag it to the timeline, drag a few effects over it, drop some transitions between the clips and finally press "Save Movie". Here comes your masterpiece. Apart from initial hiccups (especially its difficulty with 3rd party codecs) the process goes nice and smooth. This very drag and drop simplicity is also its major restriction. Yes a restriction... particularly when it comes to do things that are not already provided for in the standard installation. For example it provides an Effect for slow motion called "Slow Down"; which reduces the playback frame rate for the clip over which it is applied to half. Similarly there is an effect for "Speed Up" which increases the playback frame rate to double. However what if you want to only increase it to a specific amount. To do this and many other tweaks of built in effects and transitions Microsoft have devised a very quirky method via modification of xml files. This is all well and good as they provided detailed information about most of the parameters and their values. However no such method was published to modify the parameters about the built-in Titles and Credits and this limitation has been a very annoying feature which users of Movie Maker continued to whine about. About a year ago I reported that there exists a way to do it after coming across the xml files inside the resources of the movie maker executable. I was hoping that MS will come clean and provide the necessary details for this undocumented feature. I had shown my discovery to PapaJohn who then inquired from his contacts at MS that why they had not provided the details of such an important thing. But MS have kept quiet about it. Custom Titles & CreditsSo lets see what I am talking about. If you have access to a copy of Microsoft Visual Studio or some other resource editor (such as Resource Hacker) you can peep inside some of the resources of Movie Maker executable: moviemk.exe. Besides many other things it contains five xml files: two of these are for the built in effects and transitions while the other three are for titles and credits. Here is how it looks ...
People who have been experimenting with custom effects and transitions would immediately recognize the familiar structure of the xml file. Similar to custom effects and transitions, movie maker will read any xml file placed in the AddOnTFX folder which contains parameters for custom titles and credits. There seems to be many Classes (COM Objects) corresponding to different type of Title or Credit. Each of them would take several different parameters. Some of these parameters are shared suggesting a hierarchical structure. You can extract the xml files yourself from movie maker executable (or download my edited version of these files from Reference section below) for studying how these parameters are used. The rest of the article deals with my understanding of several of these parameters. I will mainly talk about Titles but the same discussion applies to Credits as well. An overview of the Title xml scriptLet study the xml script in more detail. The following figure shows the script for the simplest of the titles called "Basic Title".
<Title nameID="62917" iconid="13" EffectID="{A6E2C753-30EB-4e3e-B207-82039ED066F4}">
<Param name="InternalName" value="TitleStandard"/>
<Param name="DescriptionID" value="62963"/>
<Paragraph>
<Param name="EntranceDuration" value="0.0"/>
</Paragraph>
</Title>
Before we proceed any further, it would be best if we can equip ourselves with some xml vocabulary. In the xml speak an expression enclosed in less-than and greater than signs like <exp> is known as an Element. For each element there should exist and EndElement like: </exp>. The whole section of xml code within these two tags is termed as a Node. The extra expressions that appear within an element are called its attributes. If the node expression is just a one liner, the start and end element expressions are combined e.g.: <exp ... />. In the xml code above we can see that the title element contains three attributes: nameID, iconid and EffectID. Furthermore the title node within <title ...> ... </title> contains a few other nodes such as <Param ... /> which are called its child nodes. The title node is generally made up of one or more param or paragraph child nodes. Attributes of Title Elementname="string"
|
|
Parameters and | |
|
XML Files |
This section contains details of the parameters that can be used to define custom titles/credits.
|
Name |
Value type |
Default |
Description |
|
BackgroundColor1 |
Color: name or hex value as #AARRGGBB |
Black |
The background color. If BackgroundColor2 is present, this one specifies the color of the top left corner of the gradient. For titles in TitleOverlay track the background gets shown when the picture rectangle does'nt cover the full frame. |
|
BackgroundColor2 |
Color: name or hex value as #AARRGGBB |
Same as BackgroundColor1 |
The background color of the bottom right corner of the gradient. |
|
BannerColor1 |
Color: name or hex value as #AARRGGBB |
Red |
The color used for left side of the banner. |
|
BannerColor2 |
Color: name or hex value as #AARRGGBB |
Red |
The color used for right side of the banner |
|
BannerShadowColor |
Color: name or hex value as #AARRGGBB |
|
The color used for shadow. Use alpha value less than FF for semi-transparent shadows. |
|
BannerType |
One of { BottomFlood, Explosion, FullLeftFlood, FullRightFlood, HorizontalFlood, LeftFlood, LowerFlood, NoBanner, Normal, RightFlood, TopFlood, UpperFlood, VerticalFlood } |
NoBanner |
The banner types with Flood in their name fill the BoundingRect with the a gradient from BannerColor1 to BannerColor2. |
|
BoundingRect |
Rect in four floats: “left top width height” |
"0.0
0.0 1.0 1.0" |
The coordinates of the rectangle are in relative coordinates: with reference from top left and as a fraction of current width and height. |
|
CreditLineOverlap |
Float |
0.0 |
|
|
Description |
String |
|
A description that appears in the second column of the Movie Maker list of titles and credits |
|
EntranceDuration |
Float |
0.0 |
Duration of the entrance phase. |
|
EntranceEffect |
One of {EffectNone, EffectFade, EffectBlur, EffectOverZoom, EffectRotate, EffectTypeWriter, EffectFadeEllipse, EffectFadeWipe, EffectBounceWipe, EffectPerspective, EffectSpotLight, EffectFlashing, EffectInverse, EffectMulti, EffectMultiFirstLetter, EffectMirror, EffectOutlineExplode} |
EffectNone |
Type of effect to be played at the start phase of the animation. |
|
EntrancePosition |
Relative Position in two floats: “x y” |
"0.0 0.0" |
The position is relative to the BoundingRect |
|
EntranceVideoRect |
Rect in four floats: "left top width height" |
"0.0
0.0 1.0 1.0" |
The video is initially shown in this rectangle. |
|
EntranceZoom |
A single or two floats: "x" or "x y" |
1.0 / "1.0 1.0" |
The zoom value of the title text at the start phase of the title animation. Can specify different zoom values for x and y dimensions. If a single zoom valueis specified, it is used for both directions. Negative zoom vlaues cause invertion of the frame in the corresponsing direction. |
|
ExitDuration |
Float |
0.0 |
The amount of time in seconds it takes to complete the Exit phase of the animation |
|
ExitEffect |
Same as EntranceEffect |
EffectNone |
What type of effect is played during the exit phase of the title animation |
|
ExitPosition |
Relative Position in two floats: “x y” |
0.0 0.0 |
The position is relative to the BoundingRect |
|
ExitVideoRect |
Rect in four floats: "left top width height" |
"0.0
0.0 1.0 1.0" |
The bounding rectangle where the video is displayed during the Exit phase of the title animation |
|
ExitZoom |
Two floats "x y" |
1.0 1.0 |
Zoom value for the exit phase. Can specify different zoom values for x and y. |
|
FillBitmapEntrance |
Relative Position in two floats: “x y” |
“0.0 0.0” |
The start position of the bitmap that is used to fill the inside text area |
|
FillBitmapExit |
Relative Position in two floats: “x y” |
“0.0 0.0” |
The end position of the bitmap that is used to fill the inside text area |
|
FillBitmapFilename |
Full path to a file bitmap/png file. |
|
The bitmap that is used to fill the inside text area during the main phase of the title animation. Default path is the “C:\Program Files\Movie Maker\shared” folder. |
|
FillBitmapMain |
Relative Position in two floats: “x y” |
“0.0 0.0” |
The position of the fill bitmap that is used to fill the inside text area during the main phase of the title animation |
|
FillBitmapRect |
|
“0.0 0.0 1.0 1.0” |
The rectangle for the bitmap used to specifes the fill pattern |
|
Font |
TrueType font name |
|
if specified within the xml file, it cannot be over ridden in the user interface. |
|
FontSize |
Float |
|
if specified within the xml file, it cannot be over ridden in the user interface. |
|
FontSizeMultiplier |
Float |
1.0 |
Specifies how much to adjust the font as specified by user. |
|
ForceCenter |
Boolean {True, False} |
False |
Overrides any other implcit or explicit alignment. |
|
ForceFrontColor1 |
Color: name or hex |
|
|
|
ForceProgress |
Float |
|
|
|
FrontColor1 |
Color: name or hex value as #AARRGGBB |
white |
The color of the foreground text. Should be left to be selected via user interface. If FrontColor2 is present this one specifies the left color of the gradient. |
|
FrontColor2 |
Color: name or hex value as #AARRGGBB |
same as FrontColor1 |
Should be left to be selected via user interface |
|
HorizontalAlignment |
One of {Right, Center, Left} |
Center |
|
|
InternalName |
One of {TitleStandard, TitleMultiTitles, CreditsStandard} |
|
Use TitleStandard or TtileMultiTitles for titles and CreditsStandard for credits. |
|
IsBold |
Boolean {True, False} |
|
Usually specified via user interface |
|
IsHeaderFullTime |
Boolean { True, False } |
False |
Whether the header line in credits is to be displayed for the whole duration. |
|
IsItalic |
Boolean {True, False} |
|
Usually specified via user interface |
|
IsOneLine |
Boolean {True, False} |
True |
If the text entered by the user goes over a single line the title is compressed |
|
IsUnderline |
Boolean {True, False} |
|
Usually specified via user interface |
|
LogoBitmapFilename |
String |
|
Name for an image file (PNG/BMP/GIF/JPG) file to be used as the overlay image. The path is relative to the "C:\Program Files\Movie Maker\Shared" folder. |
|
LogoRect |
Rect in four floats: "left top width height" |
"0.0 0.0 1.0 1.0" |
Specifies the placement of the overlay logo bitmap. |
|
MainEffect |
One of {EffectNone, EffectBlur, EffectOverZoom, EffectRotate, EffectTypeWriter, EffectFadeEllipse, EffectFadeWipe, EffectBounceWipe, EffectPerspective, EffectSpotLight, EffectFlashing, EffectInverse, EffectMulti, EffectMultiFirstLetter, EffectMirror, EffectOutlineExplode} |
EffectNone |
Some of these values may not work. |
|
MainPosition |
Relative Position in two floats: “x y” |
0.0 0.0 |
Position of the text. It is relative to the bounding rectangle specified for the text. |
|
MainVideoRect |
Rect in four floats: "left top width height" |
"0.0 0.0 1.0 1.0" |
Specifies the placement of video for the main phase of the animation |
|
MainZoom |
Two floats "x y" |
1.0 1.0 |
Zoom value for the main phase of the title animation |
|
MaxCharacterCount |
Integer |
Restricts how many characters should be displayed. Useful if long text entered by the user may spoil the effect intended. |
|
|
OptimalDuration |
Float |
1.0 |
Scales the minimum duration by this factor |
|
ProgressDelay |
Float |
0.0 |
Allows adjustmenting delay between animation progress for different paragraphs |
|
ProgressDuration |
Float |
|
Allows adjustment of progress duration for the animation of one paragraph relative to the others. |
|
RenderOrder |
One of {RenderFirst, RenderLast} |
|
Controls the order of rendering. Specify for potentially overlapping lines/images. |
|
ResizingTechnique |
One of {NoResize, KeepVerticalConstant, KeepHorizontalConstant} |
NoResize |
If the font size is specified via user interface, this parameter determines how the text will be resized. |
|
ReverseAlignment |
Boolean {True, False} |
False |
Determines if (for example) the second paragraph needs to be aligned in opposite direction to the first. |
|
ShadowColor |
Color: name or hex value #AARRGGBB |
|
Shdow color of the text. Use values less than FF for AA for translucent shadows. |
|
ShadowOutline |