PapaJohn's MVP LogoMovie Maker 2 and Photo Story
Newsletter #75 - Oct 29, 2005

Re-Capture a DV-AVI Source File

I've mentioned before... if you need to recover from a missing or corrupt DV-AVI source file situation, you can re-capture it from the digital camcorder tape. But what steps are involved? In this issue, let's simulate losing a large file that's been used for an important project. We've invested dozens of hours of editing and some of the frame syncing needs to be 'spot on'.
More importantly, we'll see how easily and well we can re-capture the file, and re-sync it with the project file... using only the project file that's now full of red-X's, and a newly re-captured source file.
We have no notes in our database about the original source file, and we don't remember what the file name was or what folder it was in.
By doing it as an exercise, we can do it without the emotional loss and be prepared if we ever need to do it for real... hopefully never.

Freeze FrameIt'll also be a mini-tutorial about making a video that includes a freeze frame and a few freeze-frame-like overlays. These are the things that a WOW type of effect to the video, but make the 'spot-on' syncing so critical for the recovery efforts.
Click the picture at the left to view the video, the first draft of a movie trailer for Olivia, one of our grands. Note how the freeze-frame-like overlay images stick onto the screen as the video keeps going beyond them.
... before getting into it, here are a few notes...

Windows Gallery
There's a special Windows Gallery in San Franciso next month, New York City in December, and Chicago in the spring... I'll be there to present Doing Amazing Things with Movie Maker and Photo Story. If you're in San Franciso on Saturday, November 19, stop by. I'll let you know later where it'll be, and the other dates when they're firmed.

The weeks keep rolling past... a year ago issue #78 was so far away, and now it's right around the corner. The issue marks the beginning of the renewal cycle for many readers... the last issue for those who have been reading them since I changed to a subscription-based service.
I'll be sending individual email notices. For those who continue on, the sign-up process for another year is the same, the PayPal button(s) on the main page of my website... those who sent checks, cash, money orders, etc... feel free to do it again.

Paint.NETPaint is an app I use a lot, more and more lately in conjunction with IrfanView, when making overlay images such as those for the video in this newsletter.
Somewhere between Paint and Photoshop is a developing software app named Paint.NET. It's an ongoing school project at the University of Washington... far enough along at this point to start using.
It's a free download from
... with all the familiar features of Paint, and lots more... a magic wand, layers like PhotoShop, history states, etc.
The figure at the right shows some of the features... the Layers > Adjustments branch of the menu.
I'll devote newsletter #77 to it... at this point it looks promising, something we can effectively use to enhance our image preps for Movie Maker and Photo Story.
.... on to the main topic...

the Making of the Movie Trailer...
For a test clip that uses a large DV-AVI source file and some critical frame placements, I made the first draft of Olivia's movie trailer for 'Danger Girls'. She and her friend Kaitlyn were bouncing around on a trampoline as they sketched the trailer. Here are some notes about how I put it together:
    • the DV-AVI source file from the mini-DV camcorder was captured by Movie Maker 2 and auto-split into clips. It was 5.4 GB with a duration of about 25 minutes.
    • a 5 second freeze frame effect was made by taking a snapshot from the mid-point of a clip in the collection, splitting it at that point, and then using the 2nd part of the split clip on the timeline just after the still picture.
    • 4 freeze-frame-like overlays were made by:
      • taking snapshots from clips in the collection, and splitting the clips at the same points as the snapshots. I looked for frames where the jumping kids were in the air with the sky as the background, making it easier to isolate them from the background.
      • opening the snapshots (JPG files) in IrfanView and decreasing the color depth to 6 colors (menu > Image > Decrease color depth > select Custom and enter the number 6 > OK). That made the background much easier to get to the single color needed for transparency... saving them as BMP files from IrfanView.
      • opening the BMP files in Paint and coloring the background blue... most of it easily done with one touch of the paint bucket (the pixels that didn't change color at that point were painted with a brush). The goal here is to get the part of the picture that'll be transparent to be a single pure color (it's not important what the color is). Saving them as BMPs from Paint.
      • opening the files in IrfanView and adding the names in text...
      • saving them from IrfanView as PNG files... pointing anyplace on the background during the saving process tells IrfanView to treat that color as transparent.
      • using the PNG files as title overlay images...  the overlay images in the Shared folder of Movie Maker, and the xml file that points to the images in the Shared/AddOnTFX folder. This is the same approach as the puzzle overlay of newsletter #73, my now generic approach for overlays. 
Project- Initial
Here are the 4 overlay images after processing the frame snapshots through Paint and IrfanView. By using them as overlays with the background transparent, I was able to freeze the figures in the scene, while letting the video continue. 
The clip following the freeze-frame, and the positioning of the clips behind the overlays are highly dependent on the source file being spot-on relative to the frames used for the freeze and overlays. The rendered movie from this project is what you see when you click the link in the opening paragraph.

delete the Source File... Red X's Appear
Let's simulate the deletion (if the recovery doesn't work, we can get the original file back) by renaming the source file, changing its extension from .avi to .av_.
This has the same effect as deleting it... when Movie Maker can't find it, the collection and project are full of red-X's.
Source File Deleted
We're now going into the Recovery Phase

We'll start by
Re-Capturing the Source File...
Let's assume we know the tape it was captured from... even without notes, you should know that. But we don't know the exact starting point for the capture... nor do we know the folder or file name originally used.
We'll start the re-capture about where we think the first tape capture started, put it any folder on the hard drive, and try the 'Browse for Missing File' to link to the new source file. That doesn't work... all we get is.
Try Recaptured File
It's another of those messages that is close to being accurate, but misses the mark. The file is close enough to the original. It's not in the same folder, and doesn't have the same name. But most of the frames are the same and we can get it to work.
To find the original folder and file name, right click on any of the red-X's and check the properties. It'll include a reference to the needed location and file name.
LocationMake a new folder if needed with the same name Captured Video, and put the new file in it.  That isn't enough. You get the same message when pointing to the new file with the different name...
Create the folder if you need to. Put the new file in it and rename it to align with what the project file needs - Trampoline.avi. You won't have to browse for the missing file... when Movie Maker is opened, it'll see the file and replace all the red X's with clip images. If it doesn't, just touch a clip with the mouse to nudge it along.

Realigning the new file with the project file
The next, last and trickiest step is to 'adjust' the new source file so it aligns with the project file... we don't want to have to do any further tweaking of the project file, as it was perfect before we lost the source file. If you try to shift the clips in the project timeline, you would have to do each one, and many would be too difficult to do right.
Leave the project file alone... use it just to help determine how to adjust the new source file, not to make any changes.
Preview the project a bit and you'll that the frame/clip alignment isn't the same as the original, not even close. We started the re-capture at a different point on the tape... and Movie Maker assumes the new file starts at the same frame as the original. That's why it's out of sync.
What we need to do is determine how much it's out of sync by, and make the needed 'adjustment'. 
Find just one frame, any frame, that needs to align exactly with the original.... here's one, Kaitlyn was in the air, her legs and hair were only at this point for one frame, as she was moving pretty quickly. It's the point that I used to make the freeze-like-overlay image. Previewing the project with the newly captured file shows that the overlay doesn't start at that frame, which it should. It's one of the perfect points to use for the 'adjustment'.... and we only need one point to realign the whole file. Let's use it.
The Key Frame
Note the start time for the clip in the project is 0:01:15.81. The frame isn't there now, so let's look for it.
The clip name in the project file is 9/17/2005 8:00 PM (2), a subclip of the original with that name. Looking at the new set of clips from the re-captured file shows two clips named 9/17/2005 8:00 PM... preview them and see where that frame is... here it is, at the 0:00:28.95 point in the new clip.
Key Frame in Recaptured File
We know from the project file that we want that frame to be at 0:01:15:81 point of the timeline. How far away is it?
Browse the project timeline to find the frame... here it is at the 0:01:05:93 point... that's 9.88 seconds earlier than it was before. That means we started the re-capture 9.88 seconds after the original.
To make the new file align with the original, we need a 9.88 second 'adjustment'. We need to splice a 9.88 second leader to the beginning of the file in order to push that frame to the right by that much.
The Shifted Frame
We'll do it by adding a black image (or any still image) of 9.88 seconds to the beginning of the new file, and render it to a new DV-AVI file... using Movie Maker. In that new file the frame will start that much later, and if all is well, the re-alignment will be finished.
Import the new clip as a single one without auto clip splitting > drag it to the timeline of a new project > add a still picture to the beginning > grab it's trim handle and pull it to the right to make it 9.88 seconds. 9.87 seconds is what we get... let's call it close enough.
Render the new 'adjusted' file to a new DV-AVI file. With no editing or complexity, the rendering is quick.
Once rendered, put this new 'adjusted' in the same folder and give it the same file name. It's time to open the project, preview it, and see if the new file snaps the project back into sync. Every frame in it should be positioned as it was originally including the freeze frame, the overlay images, and the project in general.
It worked great... amazingly, I couldn't tell the difference between the originally rendered movie from the original file versus a new one made from the re-captured and adjusted file. The project is ready for further normal editing and use. 

Conclusions and Closing
I knew that a recaptured video file could be used if the original was lost, but I've never been faced with having to go through this kind of recovery.
It was a good exercise. Nice to know that it'll work if and when you ever need it. I hope you don't.

Have a great week...