Movies (video) are actually very simple to manipulate. They are a series of pictures (frames). You need to be concerned with the frame rate (the number of frames per second), but it's mostly just things you've seen before. We're going to use the term movies to refer generically to animations (motion generated entirely by graphical drawings) and video (motion generated by some kind of photographic process).
What makes movies work is a feature of our visual system called persistence of vision. We do not see every change that happens in the world. For example, you don't typically see your eyes blink, even though they do it quite often (typically 20 times a minute). Our eyes retain an image for a short period of time.
If we see one related picture after another fast enough, our eye retains the image and our brain sees continuous motion. If the pictures aren't related, our brain reports a montage, a collection of disparate (though perhaps thematically connected) images. We refer to this 16 frames per second (fps) as the lower bound for the sensation of motion.
Early silent pictures were 16 fps. Motion pictures standardized on 24 fps to make sound smoother. (Ever wonder why silent pictures often look fast and jerky? Think about what happens when you scale up a picture or soundthat's exactly what happens if you play a 16 fps movie at 24 fps.) Digital video (e.g., video cameras) capture at 30 fps. How high is useful? There are some U.S. Air Force experiments suggesting that pilots can recognize a blurb of light in the shape of an aircraft (and figure out what kind it is) in 1/200 of a second! Video game players say that they can discern a difference between 30 fps video and 60 fps video.
Movies are challenging to work with because of the amount and speed of data involved. Real-time processing of video (e.g., doing some modification to each frame as it comes in or goes out) is hard because whatever processing you do has to fit into 1/30 of a second! Let's do the math for how many bytes are needed to record video:
Digital movies are almost always stored in a compressed format. A DVD only stores 6.47 gigabytes, so even on a DVD the movie is compressed. Movie format standards like MPEG, QuickTime, and AVI are all compressed movie formats. They don't record every framethey record key frames and then record differences between one frame and the next. The JMV format is slightly differentit's a file of JPEG images, so every frame is there, but every frame is compressed.
An MPEG movie is really just an MPEG image sequence merged with an MPEG (like MP3) audio file. We're going to follow that lead and not deal with sound here. The tools described in the next section can create movies with sound, but the real trick of processing movies is handling all those images. That's what we're going to focus on here.