[visionegg] Re: gl_qt problem

  • From: John Herrington <john.herrington@xxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Mon, 26 Mar 2007 19:20:11 -0400

Hi Andrew,

Success! Your attached program work. Many thanks for all who have helped me with this.

Best wishes

John

Andrew Straw wrote:
Dear John,

Whoops, it looks like I changed the quicktime.py demo slightly for use with the "bleeding edge". I attach the full thing with this email, but the new code looks like this:

bounds = movie.GetMovieBox()
height = bounds.bottom-bounds.top
width = bounds.right-bounds.left

Sorry about the confusion on this...

-Andrew

John Herrington wrote:
Adam Naples just directed me to a ctypes download that solved that problem (http://downloads.sourceforge.net/ctypes/ctypes-1.0.1.win32-py2.4.exe). Thanks Adam!

Now, when quicktime.py runs, I get the visionegg intro window, but when I click OK on this, I get the following error. Any ideas on this one?

Thanks very much for continuing to help me along with this!

John

The error:

2007-03-26 13:57:33,506 (3548) INFO: Script S:\usr\jh\research\presentation_software\visionegg-1.0-demos\quicktime.py started Vision Egg 1.1.dev with process id 3548. 2007-03-26 13:57:44,038 (3548) INFO: Requesting fullscreen 640 x 480 32 bpp (8 8 8 0 RGBA). 2007-03-26 13:57:45,273 (3548) INFO: OpenGL 1.5.7, Quadro4 900 XGL/AGP/SSE2, NVIDIA Corporation 2007-03-26 13:57:45,288 (3548) INFO: Video system reports 32 bpp (8 8 8 0 RGBA). 2007-03-26 13:57:45,476 (3548) CRITICAL: Traceback (most recent call last): File "S:\usr\jh\research\presentation_software\visionegg-1.0-demos\quicktime.py", line 26, in ?
   width = bounds[2]-bounds[0]
AttributeError: Rect instance has no attribute '__getitem__'

John Herrington wrote:
Thanks Andrew, good catch... I uninstalled VisionEgg, reinstalled the bleeding edge version, ran quicktime.py, and got a different error message indicating something about a module called ctypes. I couldn't find any python files with this name anywhere. I also confirmed that I had pyOpenGL installed. Any thoughts about how to fix this error?

Thanks!

John

The error:

2007-03-26 13:30:03,150 (3288) INFO: Script S:\usr\jh\research\presentation_software\visionegg-1.0-demos\quicktime.py started Vision Egg 1.1.dev with process id 3288.
Traceback (most recent call last):
File "S:\usr\jh\research\presentation_software\visionegg-1.0-demos\quicktime.py", line 14, in ? from VisionEgg.QuickTime import new_movie_from_filename, MovieTexture File "C:\Python24\Lib\site-packages\VisionEgg\QuickTime.py", line 17, in ?
   import VisionEgg.qtmovie as qtmovie
File "C:\Python24\Lib\site-packages\VisionEgg\qtmovie.py", line 2, in ?
   import qtlowlevel
File "C:\Python24\Lib\site-packages\VisionEgg\qtlowlevel.py", line 2, in ?
   import ctypes
ImportError: No module named ctypes


Andrew Straw wrote:
Are you sure it's exactly the same error? The error you post below indicates line 18 of QuickTime.py is "import VisionEgg.gl_qt". However, that's not the line 18 in the "bleeding edge" release. If you post your new traceback, we can help you further...

-Andrew

John Herrington wrote:
Just tried deleting C:\Python24\lib\site-packages\VisionEgg and reinstalling the bleeding edge version, and still got the same error...

thanks - John

Andrew Straw wrote:
Hi John,

I know this works on more machines than my own, so I suspect there might be something wrong with your installation. Can you delete the contents of C:\Python24\lib\site-packages\VisionEgg\ and then re-install with the new bleeding edge version and try again?

Andrew

John Herrington wrote:
Hi Andrew,

Thank you very much for getting back to me. I downloaded the bleeding edge version (the output reads Vision Egg 1.1.dev), and I'm still getting the same error... let me know if there's other stuff I should try.

Cheers - John

Andrew Straw wrote:
Dear John,

On Windows, the quicktime stuff works in the "bleeding edge" release. I will make an "official" release once I ensure that quicktime is working in both Windows and Mac. (I'm afraid the process of getting it working in Windows broke it on Mac, but now that I actually have a decent Mac machine, I'm much less averse to doing development for it.)

So, give the bleeding edge release a try and let us know if there are any issues.
-Andrew

John Herrington wrote:
I am a newbie to visionegg and python who has just installed them (and their dependencies) on my Windows XP machine. I'm able to run most of the demos (in the visionegg-1.0-demos package), except for some related to presenting video. It looks like errors related to pygame.movie have been documented on the listserv, but I'm having a problem running quicktime.py as well. When I run it, I get the following error:

2007-03-20 11:30:27,305 (1916) INFO: Script C:\Python24\VisionEgg\visionegg-1.0-demos\quicktime.py started Vision Egg 1.0 with process id 1916.
Traceback (most recent call last):
File "C:\Python24\VisionEgg\visionegg-1.0-demos\quicktime.py", line 14, in ? from VisionEgg.QuickTime import new_movie_from_filename, MovieTexture File "C:\Python24\Lib\site-packages\VisionEgg\QuickTime.py", line 18, in ?
   import VisionEgg.gl_qt # C implementation of GL/QT interface
File "C:\Python24\lib\site-packages\VisionEgg\gl_qt.py", line 4, in ?
   import _gl_qt
ImportError: No module named _gl_qt

Although the message seems to point pretty clearly to a single line in the gl_qt.py file that tries to load a module named _gl_qt (and fails), I was unable to fix it... has anyone encountered this problem, and if so, what is the solution?

Thanks!

John Herrington

======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html


======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html


======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html


======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html


======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

------------------------------------------------------------------------

#!/usr/bin/env python
"""Display a quicktime movie in the Vision Egg.

See also mpeg.py, which plays MPEG movies.
"""

import os, sys
import VisionEgg
VisionEgg.start_default_logging(); VisionEgg.watch_exceptions()

from VisionEgg.Core import *
from VisionEgg.Text import *
from VisionEgg.Textures import *
from VisionEgg.QuickTime import new_movie_from_filename, MovieTexture
from pygame.locals import *

screen = get_default_screen()
screen.set(bgcolor=(0,0,0))

if len(sys.argv) > 1:
    filename = sys.argv[1]
else:
    filename = 
os.path.join(VisionEgg.config.VISIONEGG_SYSTEM_DIR,"data","water.mov")
movie = new_movie_from_filename(filename)
bounds = movie.GetMovieBox()
height = bounds.bottom-bounds.top
width = bounds.right-bounds.left

scale_x = screen.size[0]/float(width)
scale_y = screen.size[1]/float(height)
scale = min(scale_x,scale_y) # maintain aspect ratio

movie_texture = MovieTexture(movie=movie)

stimulus = TextureStimulus(
    texture=movie_texture,
    position = (screen.size[0]/2.0,screen.size[1]/2.0),
    anchor = 'center',
    mipmaps_enabled = False, # can't do mipmaps with QuickTime movies
    shrink_texture_ok = True,
    size = (width*scale, height*scale),
    )

text = Text( text = "Vision Egg QuickTime movie demo - Press any key to quit",
             position = (screen.size[0]/2,screen.size[1]),
             anchor = 'top',
             color = (1.0, 1.0, 1.0),
             )

viewport = Viewport(screen=screen,
                    stimuli=[stimulus, text])

movie.StartMovie()
frame_timer = FrameTimer()
quit_now = 0
while not quit_now:
    for event in pygame.event.get():
        if event.type in (QUIT,KEYDOWN,MOUSEBUTTONDOWN):
            quit_now = 1
    movie.MoviesTask(0)
    screen.clear()
    viewport.draw()

    swap_buffers() # display the frame we've drawn in back buffer
    frame_timer.tick()
    if movie.IsMovieDone():
        movie.GoToBeginningOfMovie()
frame_timer.print_histogram()
======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: