| Reference | Downloads | Github

MovieStim1/2/3 errors/pause/crash


I’m using PsychoPy 1.84.2, on Windows 7 64

I’m trying to present instructions, then a movie (relatively large, 903s, mkv file) while simultaneously presenting a sound whenever a key is pressed, and am getting different problems with MovieStim1/2/3. I’m afraid I cannot put a link to the movie itself due to copyright.

Using MovieStim:
When presenting only the movie it works fine.
When adding a sound, (even without playing it, just the line below), PsychoPy crashes (no error message)
sound_1 = sound.Sound(u’A’, secs=0.2)

Using MovieStim2:
The movie pauses a little after the beginning (the rest seems ok). Maybe due to logging of skipped frames? but setting warning to critical does not help.
Initially adding a sound before the definition of the movie caused a crash (same as MovieStim), but adding it after worked. Now it started crashing even when the sound is defined after. However, if I add an instruction component before the movie it works.
So the experiment works with MovieStim2, but the timing is important, and the pausing of the movie would be problematic.

Using MovieStim3:
Usually (at some point it worked when only presenting a movie, but then stopped) it gives the following memory error (related to sound, without audio it works fine):
pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File “C:\Users\ab08\Documents\PsychoPy\”, line 83, in
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\contrib\”, line 120, in call
return obj(*args, **kwargs)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\”, line 124, in init
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\”, line 181, in loadMovie,
File “”, line 2, in to_soundarray
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\”, line 54, in requires_duration
return f(clip, *a, **k)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\audio\”, line 114, in to_soundarray
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\numpy\core\”, line 230, in vstack
return _nx.concatenate([atleast_2d(_m) for _m in tup], 0)

Additional tests I tried to run:

  • The same seems to happen when using the Builder.
  • Following one of the threads I tried using a previous version with:
    import psychopy
    But got an error that it is an unknown version (for all versions I tried)

Any ideas on how to fix this?

Thank you!

Perhaps I was too hasty in posting the question - a simple solution worked, converting the movie from mkv to mp4.
As reference for others who may experience the same problem in the future - the crashes/errors still occur as in the message above, but when using MovieStim2 in the specific configuration that worked, now it doesn’t pause after 1-2s.

1 Like

I apologise for the back and forth, it seems it was a fluke, it still pauses. So any ideas would be greatly appreciated!


Solved! In case anyone encounters a similar problem:

Based on this topic:

I installed pygame and set that to be the first option, before pyo. Now I can present a movie using MovieStim2 without freezing and without crashes.