I have a video file called intro.mpg that plays a 2 minute introduction. Its properties are as follows:
Length: 02:23
Frame Width: 800
Frame Height: 600
Data Rate: 18500 kbps
Total Bitrate: 18884 kbps
Frame Rate: 50 fps
Bit Rate: 384 kbps
Channels 2 (stereo)
Audio Sample Rate: 44 kHz
Is pygame required for a specific type of video file with certain properties, or is this my code:
import sys
import pygame
pygame.init()
pygame.mixer.init()
mov_name = "resources\\video\\intro.mpg"
screen = pygame.display.set_mode((800, 600))
video = pygame.movie.Movie(mov_name)
screen = pygame.display.set_mode(video.get_size())
video.play()
while video.get_busy():
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
'Because thatβs all I get:

user2620089
source
share