0

I've been trying to get a short video to load and play within a pygame window. However, the program stalls when it tries to load the video. I'm also unable to abort the debugger.

import pygame
import pygame.movie

pygame.init()

print('TEST')

video = pygame.movie.Movie('D:\\Presentation\\video.mpg')

print('TEST')

This outputs 'TEST' once, so the video has not loaded (It keeps running "pygame.movie.Movie('D:\Presentation\video.mpg')" indefinitely).

I let it run for an hour but no luck, it keeps loading without any kind of exception or visible progress and the video is 1,636 KB large, 4 seconds long and was converted from a .mp4 using ffmpeg.

The directory is certainly correct for I tested with images in the same directive. I also restarted my PC (Windows 8.1 64-bit Python 3.2.5.1).

EDIT: I need an answer that will be relevant to the pygame module

Frogboxe
  • 386
  • 4
  • 12

1 Answers1

0

I suggest you use Pyglet and follow the code I create here that plays a video.

Malik Brahimi
  • 16,341
  • 7
  • 39
  • 70