Any idea what video properties can hinder MovieStim?

OS: Windows 11

Dear all,

I need help from you all, especially who has experience playing video at PsychoPy with MovieStim . I’ll explain it shortly below .

What are you trying to achieve?:

It seems to be a simple behavioral experiment: People give answers and ratings and we play multiple short videos (around a hundred of 8 seconds videos, which size is not large, around 76.0 MB in total), which are randomised.

What’s the problem?

I am having a problem with playing a group of videos in Psychopy in this experiment. We use visual.MovieStim function. The code of the experiment is done, and is able to run in some conditions, i.e.: This offline Psychopy experiment could work perfectly with a group of videos (let’s call this video “male videos” because the actor is a male).

However, when we change the videos to be acted by a female, i.e. “female videos”, the experiment sadly doesn’t work smoothly anymore. The “female videos” can play until some trials, then the experiment will crash somewhere in the middle, without leaving any clear error message.

This crash also happens randomly (not on a specific video, and not on a specific stage: often before/after video plays, sometimes at Likert scale, etc.).

What did we try already?

I set it up to be in line with the media format here: Media formats suitable for online studies — PsychoPy v2023.1.2 )

The video properties seem to be fine:

  1. the videos’ format, they are already uniformly MP4. This should be no problem (when I changed to .avi, they work even worse, i.e. not running at all)

  2. the videos’ codec, they are already uniformly H264 (when I changed to H265, they work even worse, i.e. not running at all)

  3. Frame per second, size, look also all uniform and compatible with PschoPy. The size of the videos are very low already (11 MB), FPS are also similar with that of the videos that are running.

Also using VLC.movieStim function did not help. Also I had many programmers checked the codes (and lack-of error message), they all think the code is likely not problematic.

Thus, I am clueless about what should I check next/what should I change with the video properties, in order to make the experiment run until the end.

I would really appreaciate if someone could give me any idea of what else can I try out, especially with the video editing.

Thank you in advance!

Best wishes,


It should leave some kind of message even if it’s not a very informative one, if the experiment is ending early. What is it saying?

Another thing you can try, if possible, is just running the experiment locally on a different computer. That will at least help isolate whether the problem is the videos or something interaction with that specific computer.

Hi, thanks for your response. Yes we tried in various PCs and OS, it was not working.
However, I found a solution now: i re-encode and re-compress the video with “Handbrake” software, so that the video folder size is smaller (56 instead of 76.0 MB). We also make a separate psychopy program for displaying four large video files in the beginning of the experiment. This trick makes it work for now, although we failed to pinpoint what the problem actually is.