Using a static period to preload movies doesn't seem to help timing

Hi, I’m using PsychoPy v. 1.85.6 on Mac OS X Sierra on a 2017 Retina MacBook Pro and am trying to understand why preloading my movies (mp4 files) is not helping my timing. I’m using the moviepy backend.

The basic experiment structure is: 1) Wait for a keyboard “5” (standing for an fMRI TTL pulse) 2) Go on to a loop where mp4 movies are presented followed by fixation. Different movies on each trial, specified by an .xlsx file, with loading set to occur during a 3-second static period at the beginning of each trial.

On the first trial, the movie is presented late (about 1.5 seconds; it should play at 3 seconds into the trial but plays at around 4.5 s. instead). For all the other trials, the movie plays about 0.3 seconds late. Not sure why the first trial has a much longer lag – possibly due to other setup PsychoPy is doing for the entire experiment, but it seems rather long. In any case, I had expected that having a long static ITI loading period would lead to no appreciable delay in presenting the movies, but that isn’t happening for some reason.

Strangely, when I change the movie component to play every repeat (ignoring the static period), the timing looks identical to when I use the static component to preload.

I also tried putting the static period into a routine that is just before the movie loop, but that would not run at all, for unknown reasons (again, I was specifying loading during the static ITI).

Ideally what I want to do is preload movies in some way to ensure that the movies start at the specified onset time for each trial.

I’ve attached a shortened version of the experiment and .xlsx file.

Thanks
Stephan

EMOFILMTRY copymarch14_2018 Experimental2.psyexp (13.3 KB)
EMOFILMTRIALSdeleteme.xlsx (8.7 KB)

Did you ever figure this out? I am having similar problems.

We need to see screenshots of your routines and flow panel, and a screenshot of the movie component.