On 16 Oct, 00:55, jeremito <[EMAIL PROTECTED]> 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 Player.app').open_image_sequence(Alias('/path/to/
image-1.jpg'), frames_per_second=5)
mov.export(to=File('/path/to/output.mov'), as_=k.QuickTime_movie,
timeout=0)
mov.close(saving=k.no)

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.:

http://developer.apple.com/quicktime/qtkit.html

HTH

has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to