Video playback from excel sheet


I’m new to using Psychopy so please excuse any rookie mistakes or omissions. I recently built an experiment that involved the display of a random video stimuli, which was designed to retrieve the video from a video folder. However, it turns out the BBC Learning on Screen site does not allow you to download the video clips you’ve created and while I have figured out how to embed a url, the code I was using to randomly display only one of the videos only works by drawing it from an excel sheet.

So my query is as follows: Is it possible to get psychopy to read a url from an excel sheet and play it as an embedded video? If not, what is the easiest way to randomise from a number of separate items and only display one of them?

Many thanks,

At present it’s not - there’s a big difference bewteen accessing local files and downloading files from a server, so the Video component can’t draw videos from a remote site.

Your second question is possible though! When you create a loop, you can do things to it in a Code component by referring to it by name, including ending the loop prematurely and getting the number of trials run. If we assume your loop is called myLoop, you could add this to the Start Routine tab:

myLoop.finished = True

Meaning it will terminate at the end of this routine (so will only play the first of the randomly ordered stimuli)