473,325 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Windows AVIFile problems

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
Jan 25 '08 #1
3 2547
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

Jan 25 '08 #2
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/
Jan 25 '08 #3
Thomas Heller (th*****@ctypes.org) 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
Jan 25 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Daniel | last post by:
Hi, From what I read from the PHP manual, chmod on a Windows platform should have no effect, and that seems totally normal (unless someone on sourceforge has a windows port of that!). I...
37
by: Carlos Ribeiro | last post by:
Oh well. A mailing list is not the most appropriate place for rants (a blog is better), but it's still better than keeping it for myself. I'm frustrated. My search for a good IDE to support my...
0
by: Stefan Hinz | last post by:
Degan, jumping in to try and solve some problems that look pretty obvious to me ... > #options for default service (mysqld2) > (mysqld2) It should be , not (mysqld2).
1
by: Adi Sapir | last post by:
Hi, We're currently planning to migrate from SQL Auth to Windows Auth. Personally, I do not have too much experience with Windows authentication but have heard that there are some problems when...
4
by: Claudio Grondi | last post by:
I need to unpack on a Windows 2000 machine some Wikipedia media .tar archives which are compressed with TAR 1.14 (support for long file names and maybe some other features) . It seems, that...
1
by: Achim Domma (Procoders) | last post by:
Hi, I still try to implement a .Net wrapper to handel AVI Files. I'm unsing managed C++ with VStudio 2003. The structure of my classes looks like this: class AudioStream { ... } class...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
0
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
1
by: =?Utf-8?B?ZHVjaG92bGV0?= | last post by:
I tried installing Norton SystemWorks Premier 2007 onto my new laptop which is running Windows XP SP3 Home Edition. The installation SEEMED to go ok but then when I tried doing the initial...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.