Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > mpeg problem with pygame

Reply
Thread Tools

mpeg problem with pygame

 
 
AnsNum
Guest
Posts: n/a
 
      08-27-2003
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


 
Reply With Quote
 
 
 
 
Terry Reedy
Guest
Posts: n/a
 
      08-27-2003

"AnsNum" <(E-Mail Removed)> wrote in message
news:bii76h$a1n$(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
 
Fredrik Lundh
Guest
Posts: n/a
 
      08-27-2003
"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>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[pygame-bug] Pygame.cdrom bug rantingrick Python 1 01-30-2011 04:40 AM
How to convert popular video formats (including MPEG, m1p, m2p, DAT, MPEG, MOV, AVI, WMV) to DVD with Video to DVD Burner bobo DVD Video 2 06-24-2009 10:01 AM
How to convert popular video formats (including MPEG, m1p, m2p, DAT, MPEG, MOV, AVI, WMV) to DVD with Video to DVD Burner zijuan Computer Support 0 07-26-2006 02:05 AM
How to convert popular video formats (including MPEG, m1p, m2p, DAT, MPEG, MOV, AVI, WMV) to DVD with Video to DVD Burner bobo DVD Video 0 07-25-2006 06:46 AM
What does pygame.Movie mean by `an MPEG file'? Kilian A. Foth Python 7 09-29-2005 06:54 AM



Advertisments