AVI I/O

Dmitry Borisov jbors at mail.ru
Thu Aug 5 13:55:23 EDT 2004


> 
> ziaran wrote:
> Hello,
> 
> I want to use Python for Image proccessing.
> I need the following capabilities:
> 
> 1. To be able to read and WRITE an AVI file frame by frame.
> 2. To be able to access each fram as a simple matrix.
> 
> I tried to search for that in google but could not find something 
> intuitive and simple.
> 
> The matrices part is important since iamge processing is done through 
>  matrices manipulation.
>  
> MATLAB is an example of a tool with scripting capabilities in which you 
> can do that in a simple way.
>  
> Is Python adequate for that?
> 

You can use pymedia to do that( http://pymedia.sourceforge.net )
ATM writing of avi files is not supported( mpeg only ), however you can do a simple fix for that if you're interested.

The way it works is it parses AVI file, gives you frames( audio, video, text ) and then you can decode video into YUV frames and convert it into the regular BMP image as string which I suppose you meant by "matrix".

Dmitry/




More information about the Python-list mailing list