Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Windows AVIFile problems

Reply
Thread Tools

Windows AVIFile problems

 
 
c d saunter
Guest
Posts: n/a
 
      01-25-2008
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
header...

http://mail.python.org/pipermail/ima...ry/001748.html

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 *
>>> windll.AVIFile


Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
windll.AVIFile
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

or

WinDLL('c:/windows/system/AVIFILE.DLL') # same for .../system32/AVI...
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
windll.AVIFile
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

This suggests that the dll is corrupt? However if I download
and run the exe's from this example of a VB program calling
the DLL, they work:
http://www.shrinkwrapvb.com/avihelp/avihelp.htm

I'm open to suggestions about the specific problems above
or other ways of getting at the frames. I've tried pymedia
but it also has issues.

Regards
Chris Saunter
 
Reply With Quote
 
 
 
 
Thomas Heller
Guest
Posts: n/a
 
      01-25-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
> header...
>
> http://mail.python.org/pipermail/ima...ry/001748.html
>
> 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 *
>>>> windll.AVIFile

>
> Traceback (most recent call last):
> File "<pyshell#2>", line 1, in <module>
> windll.AVIFile
> 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
16-bit support.

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.

Thomas

 
Reply With Quote
 
 
 
 
Tim Golden
Guest
Posts: n/a
 
      01-25-2008
c d saunter wrote:
> I'm trying to access individual video frames of an AVI file from within
> Python 2.4 or 2.5 under Windows XP.


I thought that the recently-at-1.0 pyglet did that, only I can't
now see it in their docs anywhere. Might be worth asking over
there anyway [1] since it certainly comes close, is a much easier
way of dealing with video images, and seems to have an active
community.

TJG

[1] http://www.pyglet.org/
 
Reply With Quote
 
c d saunter
Guest
Posts: n/a
 
      01-25-2008
Thomas Heller ((E-Mail Removed)) wrote:
: c d saunter schrieb:
: > Hi All,
: >

: The dll is not corrupt. It is the 16-bit dll, possibly present for legacy
: 16-bit support.

Thomas,
Thanks, that explains a lot.

Regards,
Chris Saunter
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
!Windows Live Mail replace Outlook Express on Windows XP and Windows Mail on Vista... Max Burke NZ Computing 8 05-18-2007 12:10 AM
Problems installing Windows 64bit trial version on a Windows 98se =?Utf-8?B?TG9vc2V5d29u?= Windows 64bit 7 11-28-2005 04:40 PM
Windows ME & Windows XP problems LMC Computer Support 1 10-04-2004 06:13 PM
Re: sound problems and modem problems Harold Potter Computer Support 5 12-04-2003 04:12 PM



Advertisments