I want to show a video using pygame by "pasting" its frames one by one within the while loop (one frame each iteration in succession). Something like this:
import pims
import pygame
pygame.init()
gameDisplay = pygame.display.set_mode((500,800))
clock = pygame.time.Clock()
v = pims.Video('somevideo.avi')
run = True
while run:
# ... (here goes more code)
gameDisplay.blit(v[k], (0,0)) # This function should show the kth video frame
k = k + 1
# ... (here goes more code)
I have tried different variations of this code, but I can't get it to work.
Thank you very much