By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,315 Members | 2,150 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,315 IT Pros & Developers. It's quick & easy.

mpeg problem with pygame

P: n/a
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

--
Henri
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"AnsNum" <an****@laposte.net> wrote in message
news:bi**********@news-reader2.wanadoo.fr...
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
Jul 18 '05 #2

P: n/a
"AnsNum" wrote:
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>


Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.