Step 3 - embed 5 different movies in the 5
skins
The key to making PIP videos in Movie Maker, with exact positioning
and sizing, is the custom XML transition file. You tweak it in Notepad
or any other text editor, put it in the c:\Program Files\Movie
Maker\1033\AddOnTFX\ folder... and change it as needed just before
each use.
Yes it's a transition in Movie Maker, not an
effect. 2 video clips overlapping each other... all the way (you
can't overlap them 100%, but you can get within one working frame of a total
overlap). The first clip is the larger background one and the second one
the smaller embedded clip.
In the XML file you first define the background, and then
the embedded smaller clip that will overlap
it.
The figure below shows the info in the XML file before I
started:
• the
first 4 'Param' lines tell it to position the background clip at
the 0, 0 point (the upper left), and the pixel size to make
it
• the
next 4 'Param' lines tell it the position and size of the smaller embedded
video, the second of the two clips on the
timeline.
The videos I selected didn't have any significance. The sample
wasn't about any particular embedded video. It was to show 5 videos
playing together in 5 different player skins, to illustrate
PIP.
I started by taking the desktop image with the 5 pasted player
skins (the final BMP still picture file), putting it on the timeline,
dragging its trim handle to make its duration longer than the longest
video I wanted to embed in it, and saving it as DV-AVI video
filet.
Then I added one embedded video at a
time, saving each pass as a DV-AVI file to preserve
quality. DV-AVI files are always 720x480 pixels so the first 4 lines
of my custom PIP XML file is always the same. The
background starts in the upper left corner at the zero, zero
points and has pixel dimensions of 720 wide and
480 high. My change to the XML file for these 4 lines is simply
changing the 180 and 120 numbers to 720 and
480.
The 4 lines ended up
as:
<Param name="SrcOffsetX" value="0"
/>
<Param name="SrcOffsetY" value="0"
/>
<Param name="SrcWidth" value="720"
/>
<Param name="SrcHeight" value="480"
/>
What varies for each pass are the
settings used in the last four lines, those that define the
smaller embedded video. The first two lines of the four define the position of the clip being
embedded - how far to the right, and how far down from the top is
the upper left corner (see the red dots on the picture to
the below-right).
Here's the trickiest part of the tutorial, how
I should have determined the position and size of each of
the embedded videos. I say 'should have' because I did it more by
trial and error, eye-balling/estimating as my numbers didn't work right.
There was some stretching/squeezing going on that threw my numbers off... I was
close but not close enough. It turned out I was using the wrong size still
picture in Paint to do my measuring.
Only now as I'm writing this newsletter am I
seeing the right picture to use for the right numbers. I'll know
better the next time. Here's what I should have done:
- Make the background video from the still
picture of 720x480 pixels, rendering to a DV-AVI file.
- Import the background DV-AVI file and render it
to a WMV standard 4:3 profile video at 640x480.
- Take an
MM2 snapshot from the 640x480 pixel WMV file, getting a 640x480 pixel
JPG file.
- Use IrfanView to resize the snapshot to
720x480.
- Open the resized snapshot in Paint to
get the positions of the corners, and the dimensions of the embedded
videos.
I put red dots on the corner points of
the below-right figure. Linger over each corner of the figure in Paint and
it'll tell you the exact X, Y position of the tip of the cursor in pixels
(look at the bar on the bottom-right as you move the cursor around for the
X, Y positions). Move to the opposite corner to get the numbers to
calculate the width and height. Note the numbers and use
them in the XML file.
The purist might also be fussy about the
ratio of the width and height... for this example I wasn't, as I
was just trying to make the overall view look good from a
distance.
In English you would read the first set of
the lines in the XML file as: "The Grand Canyon video clip is
positioned on the background such that it's upper left corner is 363 pixels from
the left edge and 235 pixels down from the top... and the embedded
Grand Canyon video is sized as 330 pixels wide and 175 pixels high".
Read the location/size of the other 4 embedded
videos similarly.
bigger lower right one: Grand
Canyon
<Param name="OffsetX" value="363" />
<Param name="OffsetY" value="235"
/>
<Param name="Width" value="330"
/>
<Param name="Height" value="175"
/>
larger upper left one -
Fiddlers
<Param name="OffsetX" value="18"
/>
<Param name="OffsetY" value="60"
/>
<Param name="Width" value="315"
/>
<Param name="Height" value="180"
/>
smaller lower left frame - Whale
Watching
<Param name="OffsetX" value="88"
/>
<Param name="OffsetY" value="295"
/>
<Param name="Width" value="110"
/>
<Param name="Height" value="85"
/>
round upper right - Photo Story map of
Wales/England
<Param name="OffsetX" value="590"
/>
<Param name="OffsetY" value="53"
/>
<Param name="Width" value="100"
/>
<Param name="Height" value="65"
/>
heart shape - clips from the Living Projects -
Wedding
<Param name="OffsetX" value="402"
/>
<Param name="OffsetY" value="136"
/>
<Param name="Width" value="90"
/>
<Param name="Height" value="45"
/>
And don't forget to reapply the transition to the
timeline/storyboard after each pass. The project file remembers the last set of
numbers from the XML file. To get the new numbers to the project, delete
the transition and then apply it again. If you forget to reboot MM2 or
reapply the transition, the saved movie will show the embedded video in the
wrong place, which will remind
you.