MovieStim1/2/3 errors/pause/crash

Hi,

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\segment_mov_MovieStim3.py”, line 83, in
depth=0.0,
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\contrib\lazy_import.py”, 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\movie3.py”, line 124, in init
self.loadMovie(self.filename)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\movie3.py”, line 181, in loadMovie
jwe_tmp.audio.to_soundarray(),
File “”, line 2, in to_soundarray
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\decorators.py”, line 54, in requires_duration
return f(clip, *a, **k)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\audio\AudioClip.py”, line 114, in to_soundarray
chunksize=buffersize))
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\numpy\core\shape_base.py”, line 230, in vstack
return _nx.concatenate([atleast_2d(_m) for _m in tup], 0)
MemoryError

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
    psychopy.useVersion(‘1.80.06’)
    But got an error that it is an unknown version (for all versions I tried)

Any ideas on how to fix this?

Thank you!
Aya

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.

2 Likes

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

Thanks!

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.