You can create a video track “from scratch” by adding video samples, one by one, to the video media. This is perhaps the ultimate in low-level access to QuickTime video, because it makes you responsible for every pixel in every frame. One way to demonstrate this is by making a movie from a still image and using slightly different parts of it in each frame to suggest a camera moving across the image.
This concept is called the “Ken Burns Effect” in Apple’s iMovie, after the documentary filmmaker who used the technique extensively in documentaries like The Civil War, for which no film or video sources were available.
To build a movie from samples taken from an image, use the following approach:
Import an image.
Pick source and destination rectangles.
Calculate a series of rectangles between the source and destination. These represent which part of the source image will be used for each frame.
Create an empty movie, new video track, and new video media.
Matrix to convert each source rectangle to
the size of the movie.
Compress each frame and add it to the
You might already know how to do some of this; the new part is how to
compress frames into a movie. Chapter 5 made
use of the
QTImage.compress( ) method to compress
EncodedImages, but video is a little
different in that you use a
CSequence, short for
compression sequence. The difference is that in many video compression formats, ...