[Pythonmac-SIG] Extracting frames from Quicktime movies?

Bob Ippolito bob at redivi.com
Fri Feb 20 03:59:07 EST 2004


On Feb 20, 2004, at 3:31 AM, Dinu Gherman wrote:

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

ARGB *is* the normal order on a big endian machine.  PIL *has no 
support whatsoever* for anything but RGBA.  You need to use something 
like pygame surfaces or Numeric (as I did) to convert.  Ideally, one 
would write a better version of PIL, but that would take a while ;)

-bob




More information about the Pythonmac-SIG mailing list