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

[pygame] MPEG problems



Hello!

I think that this issue has been discussed before, but I haven't been
able to find a good solution... the thing is that I want to play a movie
with pygame, but I didn't succeed. Using windows XP I get a blank screen
and no sound, and with Linux/Debian I can see the movie but no sound at
all (it gives a "cannot find /dev/sequencer" error, but I think that's
for midi playback), the soundcard works perfectly with another apps
(using ALSA).

I tried pymedia (as someone suggested) to play the movie but I got a lot
of errors, and definitely interface is not as intuitive as pygame is.

python: 2.4
pygame: 1.6.2

The code:

import pygame, sys, time
size=320,240
pygame.init()
display = pygame.display.set_mode(size)
mov = pygame.movie.Movie("test.mpg")
mov.set_display(display)
mov.play()
while mov.get_busy():
    time.sleep(0.1)
sys.exit(0)