I’ve been working on an experiment where an individual makes a choice and then a short movie plays. However, like many on here, I’ve run into the problem where if you try to reuse a movie stimulus you’re unable to get a seamless replaying unless you reload the movie. That is, movies play fine the first time, but the second+ time often stutter at the beginning. I’ve created some code to reload a movie but don’t understand why it works.
First, we create a list of Movie Stims:
Movie_List = [MovieStim_A, MovieStim_B, etc.]
Then, I randomly pull from the list to play a movie and pause it at the end.
Movie = random.choice(Movie_List) while Movie.status != constants.FINISHED: win.flip() if Movie.getCurrentFrameTime() >= (Movie.duration - .05): Movie.pause()
Finally, I reload the movie
My question is, why do you need to reload with this method? For instance, say Movie creates a copy of MovieStim_A on Trial 1, then on trial 2 it gets overwritten to create a copy of MovieStim_B, and then on Trial 3 again is overwritten to create a copy of MovieStim_A. In theory, Movie is creating a copy of MovieStim_A on the third trial that has never been played, so I would expect it to transition ok, but it doesn’t.
Instead, if Movie creates a copy of MovieStim_A, reloads, and then on the next trial creates and plays a copy of MovieStim_B, now the transition is seamless. Why? Theoretically, upon reloading Movie would have reloaded its copy of MovieStim_A even though on the next trial it plays MovieStim_B. It doesn’t make sense to me and I would appreciate it if anyone can help me understand the inner workings of MovieStim.