I'm trying to play a video as a cutscene for my game that i developed using pygame. I want to play the video through my pygame window. I have tried cv2 but apparently that only displays video and no audio so I moved onto ffpyplayer but now it just plays the audio and doesn't show any video frames at all. I can see that the code is reading the frames but not displaying them. This is the code I'm using to play my mp4 videos:
def playVid(filename):
from ffpyplayer.player import MediaPlayer
import time
player = MediaPlayer(filename)
val = ''
while val != 'eof':
frame, val = player.get_frame()
if val != 'eof' and frame is not None:
img, t = frame
# display img