Chapter 8. Video Media
It probably seems like half of this book has already been about video—I’ve assumed you had video media for the chapters on playback, editing, and components (Chapter 2 and Chapter 4), even though the material there would be perfectly well suited for use on audio-only media like MP3 files. Well, this chapter is only about video, showing a handful of useful tricks for working with video.
Because video is simply a progression of images, alternated quickly
enough to suggest movement, you probably won’t be
too surprised to know that the material covered in the
QuickDraw graphics chapter
(Chapter 5) pays off in this chapter. QuickDraw
and QD-like APIs are the means by which you create and/or manipulate
video media. If you skipped that chapter and have problems herein
with QDGraphics
(a.k.a.
GWorld
s), Matrix
es,
GraphicsImporter
s, or compression, you might need
to check back there. But I’ll try to keep things
fairly self-explanatory.
Combining Video Tracks
It’s not hard to understand how two audio tracks can coexist in a movie—the sounds are mixed and played together. But the idea of combining video tracks is less intuitive.
By default, if you have two video tracks of the same size in a movie,
one will totally overlap the other. But you can change the default
behavior by specifying
2D transformations with
Matrix
objects, and the Z-axis ordering by
setting “layering” behavior.
One way to play with Matrix
-based spatial
arrangement is to set up a
picture-in-picture
Get QuickTime for Java: A Developer's Notebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.