[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] problem with movie under win2k



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