| Reference | Downloads | Github

Lagging problem with video stimulus using MovieStim3


I am having a similar problem stated here.

I’m trying to make an experiment in Psychopy which involves showing participants 21 different movie clips (with sound, each 10-20 seconds long), followed by a rating question after every movie clip within a loop.

I play the videos with MovieStim3 and pygame as backend, using the latest version of PsychoPy3 (v3.1).

All three video backends fail in different ways. With moviepy, the video plays smoothly, but much slower compared to its original speed. Its sound plays at normal speed and stops, while the video plays much slower (past when the audio has stopped - i.e. audio and video are out of sync). The experiment then progresses to the next routine as intended.

In avbin & opencv, Psychopy crashes when it reaches to the routine with the videos.

The problem remains in Mac & Windows 10 with high processing power (>16GB RAM, dedicated graphics card, etc.).

I have tested the code with videos in different formats: mp4, flv, mov; and it seems that mp4 & mov are a little less laggy but still impossible to use for my experiment. Each video is ~50 MB.

Unlike the previous case I referred, scaling is not the issue here: the videos are shot in full HD (5760x1080), and I’m running the experiment in the resolution of my external monitor, which is also 5760x1080. I have to use this resolution because I’m using three-monitor setting for my experiment.

I have been looking for a solution in this forum and others but without success, and I don’t think I can figure it out on my own. The cases that seemed to be somehow related to my problem are the ones with memory error or ‘too many open files’; but none of their solutions actually helped my problem.

Here is the screenshot from the settings of the video component:

I really don’t know how to get the system to play the videos smoothly with sound. What am I missing? I would really appreciate any help, and please let me know if I should include further information. Thanks a lot in advance!


I think there might be two problems there. One is the size which (I think) it refers to the size of the monitor rather than of the video itself. Therefore the size should match max the screen resolution. The other issue might be the last field, i.e. the units. Unless you have changed it already, this should be in pixels not “from exp settings” which is the default unit.

If I were you I would start by setting the size to 300, 300 and in pixels and see how it goes. If it works upscale the video size.