If it says exit code 0 it ran successfully. I suspect -11 is some kind of memory error, which can happen when you’re rapidly playing and pausing a video. The audio issue is probably related
If it’s never pausing, try this for your ‘each frame’ code:
playKey = response.getKeys(keyList=['c'], waitRelease=False)
if playKey and not video.isPlaying:
video.play()
elif video.isPlaying and not playKey:
video.pause()
The “isPlaying” property should say whether or not the video is currently playing, which means it will only call ‘play’ if it’s not playing and ‘pause’ if it is.