title: What is a 10.6-compatible means of recording video frames to a movie without using the QuickTime API?
body: <p>I'm updating an application to be 64-bit-compatible, but I'm having a little difficulty with our movie recording code.  We have a FireWire camera that feeds YUV frames into our application, which we process and encode out to disk within an MPEG4 movie.  Currently, we are using the C-based QuickTime API to do this (using Image Compression Manager, etc.), but the old QuickTime API does not have support for 64 bit.</p>
  
  <p>My first attempt was to use QTKit's QTMovie and encode individual frames using <code>-addImage:forDuration:withAttributes:</code>, but that requires the creation of an NSImage for each frame (which is computationally expensive) and it <a href="http://www.mailinglistarchive.com/quicktime-api@lists.apple.com/msg00370.html">does not do temporal compression</a>, so it doesn't generate the most compact files.</p>
  
  <p>I'd like to use something like QTKit Capture's QTCaptureMovieFileOutput, but I can't figure out how to feed raw frames into that which aren't associated with a QTCaptureInput.  We can't use our camera directly with QTKit Capture because of our need to manually control the gain, exposure, etc. for it.</p>
  
  <p>On Lion, we now have the AVAssetWriter class in AVFoundation which lets you do this, but I still have to target Snow Leopard for the time being, so I'm trying to find a solution that works there as well.</p>
  
  <p>Therefore, is there a way to do non-QuickTime frame-by-frame recording of video that is more efficient than QTMovie's <code>-addImage:forDuration:withAttributes:</code> and produces file sizes comparable to what the older QuickTime API can?</p>