PapaJohn's Newsletter #32 - Dec 18,2004

Movie Maker 2 and Photo Story


 Picture-in-Picture (PIP)

Response to newsletter #5 about doing PIP was positive, strong and lingering... I'm still getting emails about it. Picture-in-picture makes powerful video statements, and achieving them in Movie Maker is worth jumping through some hoops and over some hurdles. A second detailed tutorial will help reinforce the previous info.
The exercise in this newsletter is more complex than the one in newsletter #5. Although it's only a minute and 17 seconds long, there are some complexities that wil stretch your learning experiences.
First look at the video the tutorial is about... here's the link:
We learn and grow by stretching our skills. Most subscribers are advanced users looking to do that, so they shouldn't have problems following it. If the beginners and novices have any difficulties following along, please don't hesitate to post to the forum or send an email.

In the tutorial I'll make the video in 5 steps: (1) hang a personal picture on the back of the fireplace in the new Yule log visualization of WMP10, and capture the visualization as a video clip, (2) paste 5 different skins of WMP10 on a picture of my laptop's desktop, and make a Photo Story that pans/zooms out of the fireplace to the full desktop, (3) play a different movie in each player skin - this is where the PIP effect is used, (4) add another Photo Story to pan/zoom from the desktop back into the fireplace, (5) close with the same Yule log visualization clip as the one used in step 1...
...and (6) wrap the parts together with MM2, complete with snowflakes, text overlays, and holiday music. Then distribute it as a video greeting card.
... before getting into it, a few notes about things going on...

The Maximum PC quarterly Winter Edition is now on newsstands in the US. The issue is about getting the most from Windows XP, and the 7 page tutorial about Movie Maker has center stage. I just received my copies and they did a great job. The first thing I did was check my tutorial files on the included CD... no problems.
 The wedding video project I've been working on since the end of August (including the 'Dancin Queen' one that the MaximumPC tutorial is based on) is kind of finished... they are online in the bottom branch of the website, the one named 'Living Projects'... and I delivered 10 copies of a one hour VCR tape to the bride's parents. The overall video came out great, but then I'm kind of biased.
To get them to VCR tapes I first tried saving each of the small videos to a tape in my digital camcorder using Movie Maker. That worked kind of OK but there were small gaps between many of them on the tape... gaps which are fine on a computer as they are black... but on a TV they were blue and didn't fit in. So I strung the videos together (in MM2) and made the one hour video as a single file, with me fully controlling the transitions. The other small issue with the videos copied to tape using Movie Maker were some small audio hiccups in the early ones. So I opted to copy the full one hour DV-AVI file to the camcorder with WinDV... it did a good job but there's still a few small audio hiccups in the early videos. They are barely noticable and I won't tell.
 Maybe you noticed the new Neptune gallery 'PapaJohn Expert Zone'... it's being setup for my use and I'm just starting to select videos for it. 
I'm preparing a new website page to be a tutorial about using the service. Since day 1 of Movie Maker 2, Neptune has been the only online hosting service the pick list offers when you opt to save a movie directly to a web host... It's a great service and I look forward to our new relationship.
The first video I'm putting in the new gallery is... a PIP sample. Not the one in this newsletter, the one I ended up using as the opening clip on the wedding VCR tapes. It has 8 embedded videos playing together.
The new website page will include such things as downloadable custom profiles for the best playback, based on Neptune's experience.
 I just got the last piece of my laptop working again - the TV tuner - it turned out there were a few files missing from the system32 folder, files no on Toshiba's recovery disc. It was a long 3 month process getting the computer repaired via CompUSA. They have to be the world's worst for tech support. It's time to write-up my experiences and send it to whoever might care... if no-one cares, then just to get it off my chest. My laptop's working fine now, despite CompUSA.
....on to the tutorial

Picture-in-Picture Tutorial
Planning - always do some before you take the first step... even if it's just some mental notes about what it is you want to accomplish, and how you'll distribute the saved movie.
I usually start with the easiest way for me to distribute it and others to view it... put it on a website and provide a link. What I wanted was some sort of new video sample that would demo PIP in Movie Maker and use the new features of Photo Story 3... What specifically?
PS3 is great for panning and zooming... so I'll use it to zoom out of or into something, then have PIP effects in a video clip. I'll stitch together the PS3 stories and the MM2 video so they flow seamlessly. You get the idea. Being the holiday season, I'll use a holiday theme. For some interesting complexities to help us learn something I'll use the 640x480 environment of Photo Story 3 together with the 720x480 DV-AVI environment of Movie Maker... that'll make us think a bit about appropriate piexel dimensions to get seamless transitions between the stories and video clips.
As I was mulling the newsletter over, out comes the Winter 2004 Fun Pack. I had to download it and find something in it for the holiday theme of the newsletter sample. If you don't have the fun pack, here's the download link: 
There wasn't anything in it closely enough aligned with MM2 or PS3 to warrant my adding a new link on my website... but looking at the Yule log visualization for WMP10 was the spark I needed to develop the sample. From there it was just a matter of figuring out how to do it... and there's always a way.

Step 1 - personalize the Yule log visualization and capture it as a video clip
I love the visualizations of the Windows Media Player and iTunes. They are easy to capture as video clips using either the Windows Media Encoder (a custom saved session file with tweaked settings helps a lot) or a camcorder (using a tripod and zooming into my laptop LCD screen). The visualizations are great, always different, and there's no copyright issues when using them. 
When using such clips, I prefer personalizing them... the Yule log turned out to be a great candidate to tweak (hack).
Fireplace Background Image
After installing the new Fun Pack, looking it over, and focusing on the Yule log visualization, I found the Yule log files in the c:\Program Files\Windows Media Player\Visualizations\Media\Fire folder. I studied the 21 jpg files in the folder and it was obvious the various images all worked together to make the visualization.
I picked the frt.jpg file to paste a personal picture onto (don't forget to save the original file first so you can put it back). It's one of the background images for the stones on the inside of the fireplace. I opened it in Paint and pasted a picture of my Do Amazing Things book cover on it (open the book cover in IrfanView, copy it to the clipboard, and paste it over the stones in Paint). I went back and forth at least a dozen times, re-sizing and moving the picture, and checking it in WMP to see how the flames moved around and the lighting effects played on it. The light on the book cover went up and down as the flames on the log flared and subsided.
To capture some footage, I used my digital camcorder and imported it as a DV-AVI file using Movie Maker... while it was setup I took video footage of all the other new visualizations too, adding them to my library for possible future use.
The captured clip was good enough for the opening and closing of the holiday greeting video.

Step 2 - paste WMP skins on a picture of the desktop, and make a Photo Story to pan/zoom out of one of them to the computer desktop
Step 2A - Paste WMP Skins on the Computer Desktop
First I did a full screen capture (IrfanView > Options > Capture) of my empty computer desktop and saved it as a BMP file. I picked BMP so I wouldn't get JPG compression losses as I added each skin to the background, one at a time. I saved each pass as a BMP just like saving multiple passes of a video as DV-AVI to avoid losses of visual quality due to recompression. 
Some people collect things like skins for the Windows Media Player (WMP10). I don't, but even without collecting them there are 34 skins (wmz files) on my laptop to pick from. They're in the c:\Program Files\Windows Media Player\Skins folder. 
Double-click on a skin file and it'll open on your desktop. No need to open the Windows Media Player first. You can only have one player or skin open at a time, so double-clicking on another one results in it replacing the previous. It was easy to run down them all, double-clicking one after the other, to select some for the newsletter.
As I picked a skin, I positioned it on the computer's desktop about where I wanted it. Any extra from the croppings would blend in better in the finished collage (the heart circle shaped ones are the best examples of the rectangular copping needing backgrounds that fit in with their positions on the desktop. 
I used IrfanView to take each snapshot, cropped as needed (in IrfanView), copied the cropped image to the clipboard (Control-C in IrfanView), and pasted the new skin onto the full background image in Paint (Control-V in Paint). The picture with all the skins grew one skin at a time until it was full enough... it started and ended like this.
Adding Skins 
I run my laptop at 1600x1200 pixels, so I ended up with the skins collage as a BMP file of that size, a 4:3 standard aspect ratio.
Step 2B - Make the Intro Photo Story
I wanted to zoom out of the fireplace to the desktop, coming out one of the skins, and later going back into the desktop in a different skin. I picked the lower left skin to emerge from. The story needed to start in total blackness, and pan/zoom as needed to come out of the lower left frame to the full computer desktop.
Here's where I had to do some testing. I knew I wanted to save any multiple passes in Movie Maker as DV-AVI files to preserve quality... but what size pictures did I need in PS3 and MM2 so the transitions would be seamless?
I thought there were only two sizes to test... I made the 1600x1200 pixel image into both 640x480 and 720x480 so I could test both... it later turned out to be a bit more complex, but that's for the PIP step in MM2. The Photo Stories worked out easily.
The answer was to use the 720x480 still image in both PS3 and MM2, even though I was saving the stories as 640x480 video-like files. It was the right answer not because I calculated it, but because testing showed it worked.
Here's the view inside Photo Story 3, using just one picture that was the 1600x1200 image resized in IrfanView to 720x480 (that's why the top and bottom black borders in PS3)... for higher quality stories I should have resized the 1600x1200 image to 1800x1200 (next time).
PS3 - Zoom Out
The starting position for the motion was easy... the black of the frame I chose to come out of. The ending position was easy too - the full window, including the black borders. If you remember seeing snowflakes falling in the black borders of the final video, it's because these black borders are included in the stories and movies.
I saved the story to the 640x480 size... there wasn't a 720x480 option when I developed this sample. Since then I've added a custom profile for saving to 720x480, which might be a better choice.

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. 
XML File
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:
  1. Make the background video from the still picture of 720x480 pixels, rendering to a DV-AVI file.
  2. Import the background DV-AVI file and render it to a WMV standard 4:3 profile video at 640x480.
  3. Take an MM2 snapshot from the 640x480 pixel WMV file, getting a 640x480 pixel JPG file.
  4. Use IrfanView to resize the snapshot to 720x480.
  5. 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" />PIP Measurements
            <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.
It's easy to make a mistake, so save each pass to a new file. It'll save you having to go back more than one step.

Step 4 - make another Photo Story to pan/zoom from the full desktop back into the fireplace
I won't detail this one as it's just the same but somewhat opposite of the story done for step 2. Be sure to use the maximum size of the desktop as the starting point of the motion setting, and the blackness of one of the skins as the ending point.

Step 5 - close with the captured Yule log visualization clip
I won't detail this one either... it's the same video clip made for step 1. If you were using this video as the lead-in to one of your videos, it would be the thing to go into, rather than the Yule log...  

Step 6 - wrap the clips up into a movie with snowflakes, text overlays, and music... ready to distribute as a holiday video greeting
By this time most of the work is and the parts are separate and reusable... it's time to put the parts together and render the final video, a straight-forward task for Movie Maker.
5 clips: (1) the Yule log visualization clip with the pasted on book cover, (2) the story that starts in blackness and ends up viewing the full desktop, (3) the PIP clip with all 5 embedded videos playing together, (4) the ending story, starting with the full desktop and ending in the blackness of one of the players, and (5) the closing Yule log visualization.
MM2 Storyboard
I added the snowflakes effect from the Winter 2003 Fun Pack to the 3 middle clips, background holiday music from the same fun pack, and some text overlays.
I also sped-up double the 4th clip, as it was taking too long to zoom into the darkness. And the flames in the last clip weren't flickering fast enough for me, so I added the speed-up, double effect to it twice (to speed up the flickering by a factor of 4). Just one more effect, fading the last clip to black.
MM2 Project
That's it... render and distribute the video.

However you celebrate, I wish you the best of everything as the year wraps up and the new one begins... Happy Holidays!!!
The next issue is scheduled for Christmas day... at this point I expect to have one but I don't know the topic.

Have a great week...