[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] problem with movie under win2k
- To: pygame-users@xxxxxxxx
- Subject: [pygame] problem with movie under win2k
- From: Alex Rojo <rojo.a@xxxxxxxx>
- Date: Fri, 11 Feb 2005 12:06:52 +0100
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Fri, 11 Feb 2005 06:11:50 -0500
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)
Hi,
I'm tryign to play an mpeg movie with pygame.movie but i can't see any
image on screen.
This is my code:
......................
#Initialize Everything
pygame.init()
screen = pygame.display.set_mode((64, 48))
pygame.display.set_caption('Ikusi Movie Player')
# pygame.mouse.set_visible(0)
#Create The Backgound
background = pygame.Surface(screen.get_size())
background = background.convert()
background.fill((250, 250, 250))
#Display The Background
screen.blit(background, (0, 0))
pygame.display.flip()
clock = pygame.time.Clock()
pygame.mixer.quit()
# if sys.platform == "win32":
# os.environ['SDL_VIDEODRIVER'] = 'directx'
movie = pygame.movie.Movie('speedis.avi')
if movie.has_video():
print "tiene video"
w,h = movie.get_size()
if w<=0 or h<=0: w,h = 1,1
else:
#? need something to display if audio only.
#We can't have a 0,0 canvas, pygame/SDL doesn't like that.
w,h = 1,1
screen = pygame.display.set_mode((w,h)) #size no matter
movie.set_display(screen)
movie.play()
#Main Loop
while movie.get_busy():
clock.tick(10)
print "frame: " , movie.get_frame()
........................
It seems like everything is OK, it change the dysplaisize correctly, i
reads frames, movie.get_busy() returns true, etc but I see no image on
screen.
I'm running on win2k with python 2.4, pygame 1.6, SDL 1.2.8, smpeg 0.4.3.
Can anybody help me?
Thanks In Advance