mpeg problem with pygame

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AnsNum

    mpeg problem with pygame

    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,4 80))
    pygame.mixer.qu it()
    movie = pygame.movie.Mo vie("d://pygame//video3.mpeg")
    movie.set_displ ay(screen, (0,0))
    movie.play()
    movie.set_volum e(1)
    flip()
    while 1:
    if not movie.get_busy( ):
    break

    --
    Henri


  • Terry Reedy

    #2
    Re: mpeg problem with pygame


    "AnsNum" <ansnum@laposte .net> wrote in message
    news:bii76h$a1n [email protected] .fr...[color=blue]
    > hello,
    > when I start this program, the movie doesn't play smoothly, anybody[/color]
    has an[color=blue]
    > idea ?
    > (I use windowsXP)[/color]

    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


    Comment

    • Fredrik Lundh

      #3
      Re: mpeg problem with pygame

      "AnsNum" wrote:
      [color=blue]
      > 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,4 80))
      > pygame.mixer.qu it()
      > movie = pygame.movie.Mo vie("d://pygame//video3.mpeg")
      > movie.set_displ ay(screen, (0,0))
      > movie.play()
      > movie.set_volum e(1)
      > flip()
      > while 1:
      > if not movie.get_busy( ):
      > break[/color]

      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>




      Comment

      Working...