« | Home | »

QuickTime Skimmer View

Download LNSQTSkimmerView

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:

lnsqtskimmer.jpg (Click Image To Play Demo Movie)

I’ve been able to implement these features:

  1. skimming
  2. selection
  3. playback
  4. dragging
  5. thumbnail scaling
  6. 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.

Missing Bits

There are a couple of things in iMovie 08’s skimming view that I’ve not yet implemented:

  1. embossed frames around thumbnails.
  2. audio scrubbing as you skim over a movie
  3. displaying multiple movie clips on one skimmer view

Acknowledgments

This code uses the NSBezierPath+PXRoundedRectangleAdditions Objective-C category from Andy Matuschak’s Pixen project.

LICENSE

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