mpeg problem with pygame

A

AnsNum

hello,
when I start this program, the movie doesn't play smoothly, anybody has an
idea ?
(I use windowsXP)

import pygame
from pygame.display import flip
from pygame.locals import *

pygame.init()
screen = pygame.display.set_mode((640,480))
pygame.mixer.quit()
movie = pygame.movie.Movie("d://pygame//video3.mpeg")
movie.set_display(screen, (0,0))
movie.play()
movie.set_volume(1)
flip()
while 1:
if not movie.get_busy():
break
 
T

Terry Reedy

AnsNum said:
hello,
when I start this program, the movie doesn't play smoothly, anybody has an
idea ?
(I use windowsXP)

If you do not get a satisfactory answer here, try the pygame mailing
list. In general, questions about third-party packages are best asked
on package-specific forums.

Idea: perhaps your system is underpowered for running both XP and a
movie.

Terry J. Reedy
 
F

Fredrik Lundh

AnsNum said:
when I start this program, the movie doesn't play smoothly, anybody has an
idea ?
(I use windowsXP)

import pygame
from pygame.display import flip
from pygame.locals import *

pygame.init()
screen = pygame.display.set_mode((640,480))
pygame.mixer.quit()
movie = pygame.movie.Movie("d://pygame//video3.mpeg")
movie.set_display(screen, (0,0))
movie.play()
movie.set_volume(1)
flip()
while 1:
if not movie.get_busy():
break

just guessing, but that busy loop might suck up more spare cycles
than you have. try inserting a short sleep:

while 1:
if not movie.get_busy():
break
time.sleep(0.1)

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top