Video Capture
For Mac, there is no to capture videos from games. The only good app for this task is Snapz Pro X, but it’s expensive and I don’t like the name. So to show some videos of the now working movement code, I had to write my own video capture system for this game.
I use QTKit, an easy-to-use interface to QuickTime, which is only available for Mac OS X to do so.By the way, this means that you’ll have to have QuickTime installed to watch these videos (no idea about the version, but created with 7.02). After reading some Apple sample code and dealing with strange QTTime structures, I got the first result very easy. The problem was that the video was upside down. Watch it! (733 KB)
I did not really like this situation, so I tried and toyed with some values, hoping it might have something to do with padding in rows. In fact, I knew well in advance that it wouldn’t help, but I wouldn’t have ever guessed that I would get such strange results. Basically, it’s random pixels moving around. Watch it! (3.2 MB)
I tried everything (for programmers: Setting setFlipped to either yes or no on the NSImage I was using didn’t change anything), but it wouldn’t work, so in the end I decided to write my own swapping code. On first try, it didn’t work, but I got a good-looking mirror effect. Watch it! (336 KB)
But after I fixed it, everything is looking nice and I declare this function basically finished. Of course, to be perfect, it needs much more than it has. For example, I can’t set the frame rate, file name, codec and quality without changing the source code. But I don’t really want to implement this at the moment. Adding new features is way more fun. So look at this video of how my app acts (in slow motion, since video capture takes a lot of processing power and I had a lot of apps in the background). Watch it! (4.3 MB)
QuickTime and the QuickTime Logo are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. The Get QuickTime Badge is a trademark of Apple Computer Inc., used with permission.
Written on September 17th, 2005 at 07:01 pm