Windows AVIFile problems
theller at ctypes.org
Fri Jan 25 13:59:56 CET 2008
c d saunter schrieb:
> Hi All,
> I'm trying to access individual video frames of an AVI file from within
> Python 2.4 or 2.5 under Windows XP.
> I have found this example code here for that does exactly what I want,
> using the windows avifile.dll but I am unable to find the AVIFile.h
> An alternative is to call into avifile.dll dynamically using ctypes,
> however under both Python 2.4 and 2.5 the following error happens:
>>>> from ctypes import *
> Traceback (most recent call last):
> File "<pyshell#2>", line 1, in <module>
> File "C:\Python25\lib\ctypes\__init__.py", line 415, in __getattr__
> dll = self._dlltype(name)
> File "C:\Python25\lib\ctypes\__init__.py", line 340, in __init__
> self._handle = _dlopen(self._name, mode)
> WindowsError: [Error 193] %1 is not a valid Win32 application
The dll is not corrupt. It is the 16-bit dll, possibly present for legacy
You must use the 32-bit dll, it seems it called avifil32.dll.
Also I guess to get the AVIFILE.H header file, you need to install some
MS SDK or the platform sdk.
More information about the Python-list