Python module for making Quicktime or mpeg movies from images

has has.temp3 at
Tue Oct 16 03:57:31 CEST 2007

On 16 Oct, 00:55, jeremito <jerem... at> wrote:
> > -QuickTimePlayer is standard on OS X and its scripting interface
> > (which you can access from Python via appscript, and is fully usable
> > even in unpaid mode) includes an 'open image sequence' command.
> I have used this, but I want to automate this so I wanted something I
> could call from my Python script.

That's the idea. e.g. Something like:

from appscript import *
from mactypes import *

mov = app ('Quicktime').open_image_sequence(Alias('/path/to/
image-1.jpg'), frames_per_second=5)
mov.export(to=File('/path/to/'), as_=k.QuickTime_movie,

The only downside of this approach is that if you're making, say, a
highly polished shrinkwrapped product, having it launch external
applications to do some of the work might not create quite the
impression you want with users.

> > - The Cocoa API's QTKit class (accessible via PyObjC) includes a -
> > addImage:forDuration:withAttributes: method that you could use to
> > build up a movie yourself.
> This sounds like a good option.  I have downloaded and installed
> PyObjC and am currently looking for the QTKit class but have been
> unsuccessful so far.  A cursory glance at the documentation hasn't
> produced any help, yet.  I'll keep looking unless you can point to it
> directly.

import QTKit

will import the PyObjC wrapper for the QTKit framework. See PyObjC's
documentation for general usage information Apple's Cocoa
documentation for further information on QTKit itself, e.g.:



More information about the Python-list mailing list