[Pythonmac-SIG] Extracting frames from Quicktime movies?
bob at redivi.com
Thu Feb 19 11:26:57 EST 2004
On Feb 19, 2004, at 6:59 AM, Dinu Gherman wrote:
> Bob Ippolito:
>> You're going to need to read and understand the QuickTime C API.
>> Apple has lots of examples, but I think you need to download the
>> QuickTime SDK separately from Xcode to get them. bgen wrappers don't
>> do much for you above and beyond that, and none of this stuff has
>> specific documentation for Python.
> They say the SDK is bundled with 10.2 and higher.
The headers and stuff are certainly here, but I don't see any QuickTime
examples on my laptop's harddrive.
>> In any case, you need Qt.EnterMovies() to happen before you call into
>> the QuickTime API. You might end up needing to use a framework build
>> (or at least something similarly bundleriffic) at some point, but
>> that isn't your problem (yet).
> Ok, I'm coming closer while tweaking Jack's videoreader.py to do
> what I want (see attached script). What I don't get is why it
> assumes it can save a frame as JPEG as it does? I'm doing this now
> for the first frame (I hope), but the output seems not to be JPEG
> at all...
> I wish there would be some Python Quicktime samples like this and
> would be happy to provide a couple of samples if someone gives me
> a helping hand... In any case I don't really feel like reading the
> 3000+ pages of the Quicktime API Reference... ;-)
I didn't mean you had to read the QuickTime API reference, but you need
to read some written-in-C examples, and then translate them to Python.
The API's are almost the same, except some of the functions where you
do SomeFunction(datatype, ...) have been converted to members of
datatype, and most kinds of callbacks are not possible (yay bgen ;)
Also, the image compression stuff wasn't wrapped, last I tried to use
it (but Jack has put some work into QuickTime since 2.3.0).. so you
might have a hard time saving it in a reasonable format.
The only working Python example I know of is PyQTSequence (
http://undefined.org/python/#PyQTSequence ), mostly because I wrote
it.. it includes a slightly modified _Qt.so that has some additional
functionality like a portion of the image compression API.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040219/d8efbfef/smime.bin
More information about the Pythonmac-SIG