|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Multimedia Basics - Animation Animation is a sequential series of still images that create an illusion of motion.
In the examples on this page we're working with animated GIF files with a transparent background. The rabbit example is a slide show where frames are held on the screen for specified periods of time that range from 10/1000 to 100/1000th of a second.
To create the most convincing illusion of motion frames should be played at movie speed of 30 frames per second. Unfortunately, that tends to create a very big file. The skeleton example below holds the frames for 100/1000th of a second producing a 66KB file.
Aside from the obvious problem of disk space, file size can have an impact on playback quality as well. When your computer plays a movie or animation sequence it will load as many frames as possible into memory and then fetch the next frame as it plays one. This technique is called cached sequencing. To create smooth playing animations you must consider the complexity and size of each frame as well as the color depth and number of frames per second. Only the very fastest of modern desktop computers can play back full screen, 24 bit color video at 30 frames per second. Movies Unlike an animation that we can create from drawings or images a movie is generally created by a photographic process and converted or ported to a computer so that each frame has data stored in every pixel. As we discussed in the animation lesson, a computer's resources can be sorely taxed by dense video; but movies also have the added element of sound making them even more resource demanding. You already know the basics of computer generated movies because they are no more than an array of still images synchronized with a sound file. The synchronization is accomplished using key frames and the playback computer's onboard clock. To reduce the size of a movie's footprint various compression techniques are employed. Video compression often uses the removal of redundant pixels as a vehicle for reducing data size.
If we convert the above GIF to an AVI it will be very small but it won't load into most editors and Windows Media Player will fail when trying to fast forward since there is only one key frame. We could of course partially solve that problem by adding the first frame as frame 30 and then setting frame 30 as another key frame but fast forward would move to the end and fast rewind to the beginning. You may be asking yourself why a tutorial would be showing you how to create a movie that crashes everything that tries to load it. The answer is to show you how easy it is to do and to point out how important key frames are to the software that plays or edits your movies. Without a key frame at every scene change and at reasonably spaced intervals, the player or editor has to load all the frames just to get a complete picture. Similar to the above illustrations, MPEG movies use 16 pixel x by 16 pixel data squares then removes "generally" redundant squares instead of redundant pixels. The below left image represents one 256 pixel square in the center of the below right image.
The technique of removing generally redundant squares produces very high compression. As you might imagine in a scene where only the faces of two people talking to each other only those squares around the speaker's mouth would need to be copied to the next frame. However, since only the changed squares are carried from one frame to the next you don't have a complete picture so a key frame that contains all the data is inserted periodically. Let's try to examine this another way. If we select frame 5 in a movie that has no key frames we must also load frame 1, 2, 3, and 4 then stack all the squares to create frame 5. The problem here is that without key frames you can't select the exact point from which to watch the movie. That is, you can't watch half a movie and then come back later and simply fast forward to the last frame you saw because there's no reference point to key on.
The top row of the images above represents frames 1 through 5 in an uncompressed AVI file. Notice how each frame is a complete picture. The next row represent the same frames from an MPEG file. As you can see, frames 1 and 5 are Key frames showing a complete picture, but frames 2, 3, and 4 contain only the bits of information (delta frames) that are different from the previous. A key frame should be added every few seconds (typically 5 to 10 seconds) and when a scene changes in order to track the position of the movie. In MPEG encoding key frames are called I-Frames or Intra-frames while half-frames which contain the formula to reconstruct missing frames from the differences are called B-frames (backward frames - behind the keys) and P-frames (predicted frames - preceding the key). Because key frames are full pictures they obviously hold much more information than partial frames so the more key frames, the bigger the movie. Keep in mind that when you split an MPEG file between key frames video for windows players will not be able to reconstruct the movie frames until they reach the next key frame. Movie size on disk and in memory depends upon the video playback window size, the frame rate (how many frames are played in each second), the audio sample rate and size and the codec used to encode the file. Below is a table representing a 30 second clip from a movie captured from VHS saved at various sizes with different codecs and settings.
IPB recording. An I-frame (Intra coded frame) contains all the data necessary to paint a
complete video frame. Video encoded as I-frame only poses no
restrictions on video editing insofar as cuts can be made at any frame of the file
but it is very large.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||