MovieStim3 and VlcMovieStim not working

Hi all,

I am currently designing and audiovisual experiment where I need to present synchronous audio and visual stimuli. Due to the limitations of the .mp4 container I will be presenting the video as an mp4 and the audio as a separate .wav file.

However, I recently started experimenting with play the video only using MovieStim3 and VlcMovieStim and am met with different problems:

  1. VlcMovieStim
    I used the builder to design this. I set vlc as backend and am met with this error:
@vlc.CallbackDecorators.VideoLockCb
NameError: name 'vlc' is not defined

I have read several other forums that the location of the vlc libraries were installed wrongly in Python? But I also read from somewhere that the problem has been fixed. What is the issue behind this and how do I fix it? I have already installed moviepy and python-vlc.

  1. MovieStim3
    There seems to be a very serious frame drop issue:
8.8732     WARNING     0.60297070001252: Video catchup needed, advancing self._nextFrameT from 0.0 to 0.02
8.8733     WARNING     0.6029957999708131: Video catchup needed, advancing self._nextFrameT from 0.02 to 0.04
8.8733     WARNING     0.6030063999933191: Video catchup needed, advancing self._nextFrameT from 0.04 to 0.06
8.8733     WARNING     0.6030157000059262: Video catchup needed, advancing self._nextFrameT from 0.06 to 0.08
8.8733     WARNING     0.6030267999740317: Video catchup needed, advancing self._nextFrameT from 0.08 to 0.1
8.8733     WARNING     0.6030380000011064: Video catchup needed, advancing self._nextFrameT from 0.1 to 0.12000000000000001
8.8733     WARNING     0.6030481000198051: Video catchup needed, advancing self._nextFrameT from 0.12000000000000001 to 0.14
8.8733     WARNING     0.6030579999787733: Video catchup needed, advancing self._nextFrameT from 0.14 to 0.16
8.8733     WARNING     0.6030697000096552: Video catchup needed, advancing self._nextFrameT from 0.16 to 0.18
8.8733     WARNING     0.6030799999716692: Video catchup needed, advancing self._nextFrameT from 0.18 to 0.19999999999999998
8.8733     WARNING     Max reportNDroppedFrames reached, will not log any more dropped frames

Does this have to do with the video files being too much for it to read? Currently the files are 1920x1080 at 50fps and ~50000kb/s (file size 22MB). If so would compressing the file resolve this issue? If so, what is the recommended details for psychopy to play?

I tried myself to play it via moviepy on a separate script outside of pyschopy and using a simple ‘clip = VideoFileClip(‘0001.mp4’);ipython_display(clip)’. This took around 4seconds to build. But was able to play very smoothly after building was completed.

I would really appreciate feedback!