mpeg problem with pygame

Discussion in 'Python' started by AnsNum, Aug 27, 2003.

  1. AnsNum

    AnsNum Guest

    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
     
    AnsNum, Aug 27, 2003
    #1
    1. Advertising

  2. AnsNum

    Terry Reedy Guest

    "AnsNum" <> wrote in message
    news:bii76h$a1n$...
    > 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
     
    Terry Reedy, Aug 27, 2003
    #2
    1. Advertising

  3. "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>
     
    Fredrik Lundh, Aug 27, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jacobo
    Replies:
    4
    Views:
    1,217
    Marc Randolph
    May 19, 2004
  2. VB Programmer

    How play mpeg in ASPX page?

    VB Programmer, Nov 18, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,302
    VB Programmer
    Nov 18, 2004
  3. Kilian A. Foth
    Replies:
    7
    Views:
    500
    Kilian A. Foth
    Sep 29, 2005
  4. rantingrick

    [pygame-bug] Pygame.cdrom bug

    rantingrick, Jan 30, 2011, in forum: Python
    Replies:
    1
    Views:
    320
    Benjamin Kaplan
    Jan 30, 2011
  5. xern
    Replies:
    2
    Views:
    92
Loading...

Share This Page