Movie Maker 2 and Photo Story
PapaJohn's Newsletter #55 - May 28, 2005

What Frames Do You See?

As I did my homework for this issue, I felt like a clinical lab tester looking through a microscope at little things moving around, hoping to get a clue or two about the reasons for the common cold. In our case the audio and video glitches in our rendered movies. 
In earlier tests, I had checked file sizes and the number of frames. If they were the same, I figured a new clip was the same as the source file. That helped me find the dropping 27th frame in a rendered DV-AVI file. But I hadn't picked up on some things I saw this week, dropping one frame in a clip but cloning another frame, balancing the file size and maintaining the same number of total frames in a new clip. For this newsletter I looked deeper, into the actual pictures in each frame to look at what visually changed from one frame to the next.
I started with the thought that MM1 was rock-solid, with none of the issues seen in MM2. I also thought rendering to a WMV instead of DV-AVI file was a work-around for some items.
Now I'm not sure. I found a dozen of what I call 'Quirks' in both MM1 and MM2. Some are with DV-AVI, and others are when rendering to WMV files.
With limited testing... a single source file on an old laptop... I don't want to publish my results as rock-solid conclusions; how about you reading them as interesting points and don't hold my feet to the fire if you do some checking and get some different results.
If the details are more than what you want to read, skim the newsletter and read the dozen Quirks.

A Selected Test Clip and Why I didn't Use it
The NTSC standard is 29.97 frames per second. PAL is 25 frames a second. Movie Maker version 1 lets you see each frame during the editing sessions. Movie Maker 2 shows you every other frame.
If the normals aren't confusing enough, there are the abnormals such as the dropped 27th frame of a 2nd generation type I NTSC DV-AVI file made by Movie Maker 2... or a quickly blinking artifact in a saved movie. Is it a stray frame? How can you see it again?
I'd studied the generational losses of both DV-AVI and WMV files before, but there are lots of reasons to check even closer... all the posts about audio and video issues are reason enough. 
Sometimes checking computerized digital video isn't as easy as a good old fashioned strip of film with a magnifying glass... I used to be able to confidently see and count frames in those days... today I'm needing to count what I sometimes can't see. How do I determine what is there? Are the tools I'm using to do the checking the problem, or are the issues really in the clips?
When I wrote the book about VirtualDub, I used AVISynth and VirtualDub to put frame numbers on a 200 frame clip from Chicago (almost 7 seconds), saving the file as an 'uncompressed' AVI. Seemed like a good test clip for this week as it was already numbered. 
Note that the first frame of a video file is not the official first frame... it's frame zero. Frame one is the second frame, frame 2 the 3rd. The odd numbers are on even frames, and even numbers on odd... got that?Frame184
By number 184 (frame 185) the horse and carriage had moved this far.
I used MM1 to make an NTSC DV-AVI from the uncompressed file... and checked each frame to be sure I wasn't missing any numbers before starting. I used TMPGEnc to make a set of frames from the AVI file... and went through the 200 pictures, one at a time. I saw some anomalies:
There were 2 frames with number 1 and both pictures were identical.
#2 was also an identical picture to #1, so 3 of the frames had the same picture (two #1 plus #2).
#20 and 21 were identical, as were 25 and 26, 33 and 34, 38 and 39, 56 and 57, 61 and 62, 69 and 70, 76 and 77, 92 and 93, 102 and 103, 115 and 116, 122 and 123, 127 and 128, 133 and 134, 137 and 138, 143 and 144, 145 and 146, 148 and 149, 153 and 154, 159 and 160, 164 and 165, 172 and 173, 177 and 178, 183 and 184, 188 and 189, 194 and 195.
I didn't know about these until I sat down to start working on this newsletter. I had been happy before not seeing a missing number, but I wanted to start this week's study with a better base base. From the positive side, this clip accents the topic... what frames are we seeing and when? and why? I had obviously placed frame numbers on a clip that already had some glitches in it that I hadn't noticed.
We'll get a fresh clip and I'll show you how to number the frames.
some notes... before going further 

With more and more phones sending videos, and where there are videos there's the need to get them into Movie Maker. I started a website page about doing the conversions from .3gp to ..avi. It's Importing Source Files > Video > Phones.
... as I don't have a phone that takes video, I'd appreciate some samples... feel free to email one for my testing, and don't tell me the phone you used. I'll try to figure it out.
.... on to the main topic

A Fresh Starting File...
Last Saturday I videoed my daughter-in-law and 2 grands at their annual dance recital. They were the freshest clips I had and I had captured them independent of Movie Maker. They are type II DV-AVI files using WinDV, with no dropped frames reported during the captures.
I made a set of frame images from a clip and looked through them to be sure there was movement from each frame to the next, and there was. I also rendered a type I DV-AVI file from the file, using MM2, and checked each frame of a still image set.... it looked good, as only the expected 27th frame was dropped. The rest were the same as the frames made directly from the captured file. For this check I looked at both sets of frame images side by side to verify the pictures in each pair of frames were identical. This was just to be sure of a good starting clip.
AVS Script

Number the Frames
Knowing the captured file had all of the frames, it's time to put numbers on each frame to more easily check which ones are there at any step. A script file and AviSynth adds the numbers.
The .avs script is at the right. The first step is to choose the source file, one of the recital clips as captured by WinDV. The next step in the script is to add frame numbers. The last step is to use only the first 100 frames, which should be enough for our reviews.Adding Frame Numbers 100 frames means starting at zero and going through frame 99.
The image at the left shows what you see in VirtualDub when you open the ..avs script file instead of the AVI file. AviSynth is taking the source file, overlaying numbers on each frame, trimming the original file after frame 99, and feeding the results to VirtualDub.
In VirtualDub, use Video > Compression > to select the Panasonic DV codec to keep the new file as a DV-AVI type II.
The final step in VirtualDub is a File > Save as AVI to get the 100 frame clip with each of the frames numbered...
For quality checks, after seeing what my Chicago clip ended up looking like, let's look a couple ways :
The file passed the checks perfectly. We have a good file to start seeing what happens when it's used in MM1 and MM2.
This clip has 100 frames, a nice even number. I made another with just one more frame, to have a clip with 101 frames, a nice odd number... with MM2 being an every other frame environment, there may be differences between what we see with clips that have an odd or even number of frames.

The Testing and Checking...
First to import the clips into Movie Maker, and see what frames are visible when previewing them in a collection. We'll check with both MM1 and MM2. 2 apps and 2 clips means 4 checks at each step.
Previewing Clips in the Collection
MM1 is a 30 fps (frames per second) working environment. We should see each frame, and we do.MM1 Preview - Clip in Collection
Pressing the Forward button under the monitor takes you to the last frame of the clip, and the Back button returns you to frame #0. The Next and Previous Frame buttons step you through the clip one frame at a time.
MM2 is a 15 fps working environment so we should see every other frame. Maybe those with even numbers; maybe the odd.
For the 100 frame clip, we see those with numbers 0, 1, 3, 5, 7 and the rest of the odd numbers to 99. Frame 0 is seen even though it's an even number. For this file of 100 frames, we know we can see the first and last frames, and every other one between. I'm calling the ability to see the first two frames a Quirk because I expected to see every other one.
For the clip with 101 frames, we see the same odd numbers as we go forward through them. But we get a bonus... after seeing the picture with #99, we can also go to #100. But going backwards from 100 doesn't show the same pictures we saw on the way up....once it's sitting on an even number, it goes every other frame backwards using even numbers instead of odd.... the 50 frames seen on the way back are the other 50 that we skipped over on the way up. We have the second Quirk.
Pressing the Back button returns to the frame #0. The Forward button goes to the end of the clip with 100 frames, but doesn't go to the end of the 101 frame clip... the slider moves as if it's going there, but the image sits where it is. The second quirk and first clues that MM2 might handle clips with an even number of frames differently than those with an odd number.
Quirk #1Seeing every other frame in MM2 is normal when working on clips and projects in Movie Maker 2... but the clip preview shows the first two frames, and the last two if the clip has an odd number of frames.
Quirk #2 - If a clip has an odd number of frames, stepping through it backwards from its end in MM2 shows the in-between frames that were not seen when stepping through it forwards.  
Quirk #3For a clip with an odd number of frames in MM2, the Forward button doesn't fully function, as it does for a clip with an even number. The slider moves but the image doesn't change.
Splitting a Clip in the Collection
The only other thing we can do with a single clip in a collection is split it. I'll go to where the monitor shows the frame with number 49 on it and press the split button.
MM1 puts the clip with #49 and up in the second of the two split sub-clips. The frame you're looking at when you press the split button will be the first frame of the new sub-clip.
What if you want to lop off just the last frame of a clip. You go to the last frame and press the split button. It won't do it. If you go to the next to the last frame and try, it'll split off the last 2 frames into a new sub-clip. So splitting can be done anyplace in the clip, but you can't split it to lop off just one last frame... it's the same at the beginning of a clip, you can't split it unless you want the first 2 frames in a new sub-clip.
Quirk #4MM1 is a single frame working environment, but you can't split a clip in a collection into two parts, one of which is a single frame.
MM2 did the same for a mid-clip split. I was easy on it by picking an odd number to be looking at, so I could split it there the first time... if you go to the end of the clip with an odd number of frames and then try to go back to the frame with #49 on it, you may not be able to. I found that once it shifts to showing the even numbers, you can go back and forth and not be able to jog it back to seeing the odd numbers... not unless you move off the clip in the collection and then re-select it.
When trying to lop a single frame off the beginning or end of a clip with MM2, it acted differently at both ends. Up front it let me clip off the single frame with #0 on it. Being an every-other frame environment after that, it let me lop off a frame, but it was a double-frame, not a single one as was #0.
At the back end of the clips in MM2, I couldn't lop off one frame, even though it was a double one. I had to go back two steps and lop of a pair of 2-packs... that's 4 frames minimum off the back end. 
Quirk #5 MM2 acts differently about splitting clips. It lets you split a single frame from the beginning of a clip, provided it's frame zero (something MM1 wouldn't do). But at the back end you have to lop off at least 2 double-frames.

Clips on the Timeline
Now move the clips to the timeline to preview them there.
Timelines - MM1 and MM2
The image at the right shows the MM1 timeline on the top and MM2 below it. Each has the clip with 100 frames on it, using the maximum zoom. See that MM1's every frame working environment displays the clip about twice the visual length as MM2. Each notch of the MM1 timeline scale when zoomed in that far is a single frame.
In MM1 with the 100 frame clip on the timeline, the highest number you can see is #98. In MM2, the highest number seen is #97. Nudging one more frame up shows the blackness beyond the clip, although we know there are frames with 98 and 99 on them.
Quirk #6The timeline view of MM1 doesn't let you see the last frame in a clip with an even number of frames. In MM2 you can't see the last two frames.
We don't see the last 1 or 2 frames of a clip with 100... how about the clip with 101 frames?  MM1 lets you see each frame, right up to the last one with #100.
MM2 is more consistent than it is when the clip is in the collection. In the timeline, you see just the odd numbers when jogging along in either direction... but the highest number seen is 97... we're not seeing 98, 99 or 100... the last 3 frames. It jumps to the blackness beyond the clip when you move one frame up from 97.
Quirk #7If the number of frames in a clip is odd, there are 3 more frames beyond the last one  seen in MM2.
Splitting a Clip on the Timeline
First splitting the 100 frame clip as we did in the collection, at the frame with #49 on it. In MM1 we can go one frame at a time up to and beyond the split point, but the last frame of the original end of the clip still can't be seen. The same behavior is seen in MM2, with the last 2 frames not seen.
When splitting the 101 frame clip at#49. MM1 acts the same way it did before. MM2 has the same behavior... letting you see frames on either side of the split point but still not the last 3 frames of the original clip ending.
How about lopping off the beginning and ending frames?
MM1 wouldn't let me split it after the first frame. I needed at least 2. And at the end of the clip, I couldn't split it unless there were 2 frames of the even numbered clip and 3 of the odd numbered. 3 versus 2
Another thing about MM1 was, after splitting the minimum number of frames at the start of the clip, the timeline view looked as if it had 3 frames in the sub-clip but acted as if there were two. I rendered it to a movie, brought it back in, and it was the 2 frames, not 3... the picture at the left shows the pre-rendered clip followed by the clip rendered from it... count the notches in the timeline and see 3 versus 2, when the clips are both 2 frames.
MM2 let me split a clip after the first pair of frames.
Quirk #8If you lop off the minimal number of frames at the beginning of a clip in MM1, it looks like there are 3 frames, but it's really 2.
Going to the back end of the clips to lop off just one frame or pair of them. MM1 needed 2 as a minimum, and after the splitting the small piece looked like one frame, but for the 100 frame clip, it was really 2, similar to what we saw at the beginning. For the 101 frame clip, what looked like 1 was really one; MM1 dropped the last one during the rendering... guess it doesn't like the last odd numbered frame.
Quirk #9If you split a clip with an odd number of frames at its end in MM1 with the minimum number of frames, the rendering to a new DV-AVI will drop the final odd numbered frame.
With MM2 I could lop off the last 3 frames of the clip with the even number of frames, and the last 4 with the odd number. Rendering the little clips didn't result in the last frame being dropped as it was in MM1.
First generation rendering of the entire clips.
I expected MM1 to act perfectly and be the cross check on MM2. But in this step, things got interesting. The total frame counts of the rendered movies were the same as the source files, but it made two frames with number 1 on them and the pictures were identical. To keep the frame count the same, the last frame of each was dropped... the frames with #99 in the first and #100 in the second were gone.
Rendering to WMV files had the same results... doubled #1 and dropped the last frame.
Quirk #10When rendering from the first generation DV-AVI files to either DV-AVI or WMV files, MM1 made two identical frames with #1 on it and dropped the last frame.
I expected MM2 to drop the frame with #26 on it (the 27th frame). It acted as expected and did it, but didn't drop the last frame. Although it did what I expected, I have to continue calling the dropping frame a quirk.
Rendering to WMV files was different, but showed something new. The 27th frame isn't dropped.... but frame #0 is doubled and the last frame is dropped. Because it does something different with WMV files than with DV-AVI, I'll give it two quirks.
Quirk #11When rendering a new DV-AVI file using MM2, from a DV-AVI source file, the 27th frame of the first clip is dropped.
Quirk #12When rendering a WMV file from a DV-AVI, MM2 doubles the #0 frame (the first frame) and drops the last one.
These changes in the recital clips are starting to explain how the Chicago horse clip in the opening paragraphs got to where it was.
Second generation rendering of the entire clips.
I did a second generation.... DV-AVI to DV-AVI and WMV to WMV, to see if the patterns of duplicating and dropping frames continued. They did.
For the 2nd generation DV-AVI, MM1 added another #1 and dropped the last frame... so it was up to three frames with #1. The WMV file stayed the same, showing no frame changes with the next generation.
MM2 also continued its patterns... the 2nd generation DV-AVI file dropped what was now the 27th frame, so frames with #26 and 27 were no longer there. The rest of the frames remained.
The 2nd generation WMV file rendered by MM2 showed two frames with #0, #2 was dropped, and there were two with #3. The last frames were #95 and #96, down from the originals of #99 and #100. The recital clip is beginning to turn into the horse clip I didn't want to start with.

Conclusions and Closing
Even with its Quirks, I'm still happy with the results I get with Movie Maker... so maybe accepting it for what it is, and looking at video editing more from the macro level than the micro is best when you're making movies. It's like enjoying life without thinking of all the little critters on your skin or in the air that might be harmful... let the clinical lab technicians study them.... and developed the cures and work-arounds.
I didn't study what was happening to the audio associated with the visual. My previous study of that had shown that segments of the audio waves get similarly dropped.

Footnote: When splitting the 101 frame clip at#49 in MM1, I saw another example of what I call the 'short term memory effect'. Immediately after splitting the clip, before selecting another clip on the timeline, I could jog over to and see the last frame. But select another clip and then go back... you can't see it anymore. I've see this in too many other applications to call it a Movie Maker quirk, but I wanted to note it. Sometimes things work once, but not again...

Have a great holiday weekend...