psychopy.org | Reference | Downloads | Github

Issues with repetition of movie stimuli

My experiment involves playing videos in a block, then repeating the block with a blank screen in between. Playing the stimuli works fine the first time, but on subsequent plays each video starts on it’s last frame before flicking back to the first frame and playing normally. How do I make it just play from the first frame, the way it does the first time around?

The code involves loading all the stimuli in and storing them in a list, from which I load and play them. The core of the code I’m struggling with looks like this:

for r in range(reps):
    win.flip()
    core.wait(2)
    
    for mov in stimuli:
        mov.seek(0)
        mov.status = visual.NOT_STARTED
        
        while mov.status != visual.FINISHED:
            mov.draw()
            win.flip()

A secondary problem is that the videos still play with volume, even though I’ve set volume to 0, and through reading the docs I can’t figure out why that is.

stim1 = visual.MovieStim3(win, 
                          filename="video.mp4", 
                          volume=0, 
                          )

Thanks for your help!