Don’t know if this is still relevant to the original poster, but having done a bit of messing around with MovieStim, I thought I should share some useful things I have learned about the interplay between seek, pause, play, and draw.
I’m using Psychopy 1.84.1 on a mac running OSX 10.9.5, playing .mov quicktime movie files.
To loop movies, I use a global frame counter that starts from 0. Every time the screen is flipped while the movie is playing, I add 1, and then compare the frame counter to the duration of the movie in FRAMES, which you can get with movie.duration*60 (assuming 60fps). Ultimately, what trips the loop is this code:
if frameCount >= (dispMovie.duration*60)-3:
print('repeating at frame ' + str(frameCount))
frameCount = 0
Why -3? Because I want the second-to-last frame, and there’s some imprecision in calculating the number of frames this way. -2 should be sufficient, but -3 protects against rounding errors. If your last three frames matter, maybe add some blanks at the end.
The important thing to know about this is that the “seek” doesn’t take effect until the next time dispMovie.play() is called. That is, if I wanted it to show the first frame again but not advance, I would have to call “play” before calling “draw”, or it would continue to get the frame that it stopped on. As soon as “play” is called, it seems to sort itself out and draw the correct frame when “draw” is called.