| Reference | Downloads | Github

Display an mp4 using movie stimuli


I’m using

Windows 8.1
psychopy version 1.85.22
I’m trying to get a video of a loading screen to play during my experiment. I downloaded the video from the internet and it is in mp4 format. I then used the movie stimuli type and put the file extension in. When I try to run the experiment, I get this error message:

    module = __import__(module_python_path, scope, scope, [member], level=0)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\visual\", line 38, in <module>
    from import VideoFileClip
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\video\io\", line 3, in <module>
    from import VideoClip
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\video\", line 21, in <module>
    from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\video\io\", line 11, in <module>
    from moviepy.config import get_setting
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\", line 35, in <module>
    FFMPEG_BINARY = get_exe()
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\imageio\plugins\", line 86, in get_exe
    raise NeedDownloadError('Need ffmpeg exe. '
imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling:

I’m not sure what I’m doing wrong here. Any help would be appreciated.


Try to run a script with the following code once:

import imageio

This should solve your issue.


I’ve been having the same problem, but when i try to run the script an error accours:


That code needs to be separated into two separate lines, as in the original post.

1 Like

Even doing like that, it’s not working.


We need to see the whole error message. But note that you now seem to have those two lines of code as the very last lines in the script, after core.quit(). This means that they will never get called.

It looks like you are editing this .py script by hand. That is not a great idea. You should be using a code component within the Builder graphical interface, which will ensure that your custom code gets inserted in the correct places in the script, and allows the script to be regenerated as required, without losing your custom changes.

1 Like