i'm making a game and on windows i can't play a movie file. But in Ubuntu, i can play it. So how do you play a video in pygame 1.9.5 on windows.
i tried changing the pygame version, tried adding modules. But none of them works.
movie_screen = pygame.Surface(movie.get_size())
movie.set_display(movie_screen)
movie.play()
cnt = 0
playing = True
while playing:
screen.fill( (0,0,0) )
cnt+=1
if cnt>=1875:
cnt=0
movie.rewind()
movie.play()
for event in pygame.event.get():
if controlstart == True:
if event.type == pygame.KEYDOWN:
if event.key==pygame.K_KP_ENTER or
event.key==pygame.K_RETURN:
pygame.mixer.music.stop()
pygame.mixer.Channel(2).play(enter_sfx)
y += 1
fade(1280, 720)
xb = 0
yb = 0
if y == 3236:
controlstart = False
if y == 436:
movie.stop()
playing = False
pygame.quit()
quit()
if event.key == pygame.K_UP:
pygame.mixer.Channel(3).play(move_sfx)
y += 1
if y == 3236:
y = 235
y1 = 3000
if y == 236:
y = 435
y1 = 3000
if y == 436:
y1 =335
y = 3235
if event.key == pygame.K_DOWN:
pygame.mixer.Channel(4).play(move_sfx)
y += 1
if y == 236:
y = 3235
y1 = 335
if y == 3236:
y1 = 3000
y = 435
if y == 436:
y1 = 3000
y = 235
if event.type == pygame.QUIT:
movie.stop()
playing = False
pygame.quit()
quit()
screen.blit(movie_screen,(0, 0))
i expect it to work, but it didn't and can't play a video