[Pythonmac-SIG] Extracting frames from Quicktime movies?

Dinu Gherman gherman at darwin.in-berlin.de
Fri Feb 20 03:31:58 EST 2004


Bob Ippolito:

> The headers and stuff are certainly here, but I don't see any 
> QuickTime examples on my laptop's harddrive.

True... I can only see this:

   http://developer.apple.com/samplecode/Sample_Code/QuickTime.htm

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

Well, after a short chat with Jack I have a running script that
does what I want, although I'm not sure it will do that for *all*
Quicktime movies. It's using PIL now to save a frame in whatever
format PIL can save (JPEG is hardwired).

It only has to shift ARGB bytes into RGBA. Jack said, it might be
possible to access the channels in the more usual order, but he
hasn't seen yet my code (see attachment) and I was in a hurry
yesterday.

I have no clue why it is ARGB or how to directly extract RGBA. If
anybody else has, please let me know so I can get rid off the byte
order change...

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

Surely, we could have some more interesting Python/Quicktime
samples and I have all sorts of ideas for Quicktime tools/plug-
ins after writing the little script yesterday, like automatic
scene change detection, but the QT API universe is keeping me
off... ;-) BTW, QT plugins in Python would be cool!

Regards,

Dinu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: getMovieInfo.py
Type: application/octet-stream
Size: 2995 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040220/6f7489d7/getMovieInfo.obj
-------------- next part --------------


--
Dinu C. Gherman - http://python.net/~gherman
......................................................................
"The best way to predict the future is to invent it." (Alan Kay)


More information about the Pythonmac-SIG mailing list