QuickTime Skimmer View
After receiving my copy of iLife ’08 I began playing with iMovie ’08. Despite the controversy surrounding iMovie 08 vs iMovie HD, I find the skimming UI Apple has introduced quite good.
I have an internal project that could use this style of movie selection and previewing so I decided to create my own implementation using Cocoa and QTKit. Here’s what I came up with:
I’ve been able to implement these features:
- thumbnail scaling
- timeline scaling
IMPORTANT: this code only seems to perform well with movies encoded using the Apple Intermediate codec. LNSQTSkimmerView relies on QTMovie‘s frameImageAtTime: method to display thumbnail frames. This method can become very slow for movies encoded in other formats (i.e. H.264).
iMovie ’08 uses the Apple Intermediate codec and also pre-generates thumbnails for its skimming view. Pre-generating thumbnails may allow my code to operate well with any QuickTime movie.
There are a couple of things in iMovie 08’s skimming view that I’ve not yet implemented:
- embossed frames around thumbnails.
- audio scrubbing as you skim over a movie
- displaying multiple movie clips on one skimmer view
This code uses the NSBezierPath+PXRoundedRectangleAdditions Objective-C category from Andy Matuschak’s Pixen project.
MIT License for LNSQTSkimmerView Copyright (c) 2007 Mark Alldritt All Rights Reserved
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
About this entry
You’re currently reading “QuickTime Skimmer View,” an entry on Mark Alldritt's Journal
- Sep 26 2007 / 10:41 am