| Reference | Downloads | Github

Inserting Movie in the experiment

Hi all, I am trying to put two movieclips in PsychoPy for an experiment. Each clip stand for around 5 mins in mpeg4 format. However, I received a message below. I tried to use other movie clips in different format but I still got the same message. Am I missing sth to install?

IOError: Error in file Video1.mp4, At time t=319.73-320.18 seconds, indices wanted: 100000-119937, but len(buffer)=119052
index 119052 is out of bounds for axis 0 with size 119052

I think this means the sound and video are slightly different lengths. Possibly you could ‘recode’ the movies using a tool like Handbrake to get things aligned (just try on one movie first to see if it works).
In the longer term, @jwe080 found a fix for a similar looking problem (linked below) that is now a part of PsychoPy, so this will hopefully go away anyway in the next release.

After using the “recoding” software, the videos can be displayed in PsychoPy normally. Thank you very much for your great help, Jon! :slight_smile: