Unable to play videos

Hello!
I’ve created a short-term WM task which runs as follows:
stimulus letter → fixation cross → video (spacebar RT response) → fixation cross → probe letter (either same or different from the stimulus letter)

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2022.1.4
Standard Standalone? (y/n) If not then what?: Standalone
What are you trying to achieve?: I need the videos to display. Right now, after the first fixation cross, the screen turns blank grey instead of displaying the videos. The WM task works fine without the video.

What did you try to make it work?: Try different Backend options for the Movie stimuli

What specifically went wrong when you tried that?: It didn’t load at all whereas with the default moviepy the screen turns blank grey after the fixation cross and gets stuck until I end it from the Runner
Include pasted full error message if possible. “That didn’t work” is not enough information.

Generating PsychoPy script...

############ Running: D:\PsychoPy Ethical DM\videos-only_lastrun.py ############
3165.6461     EXP     Imported D:/PsychoPy Ethical DM/ExpTrial_Ped.xlsx as conditions, 16 conditions, 5 params
3165.6493     INFO     Loaded monitor calibration from ['2022_06_03 11:56']
3165.6759     EXP     Imported D:/PsychoPy Ethical DM/ExpTrial_Ped.xlsx as conditions, 16 conditions, 5 params
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
0.8135     WARNING     Monitor specification not found. Creating a temporary one...
################# Experiment ended with exit code 1 [pid:5436] #################
3279.7527     EXP     Imported D:/PsychoPy Ethical DM/ExpTrial_Ped.xlsx as conditions, 16 conditions, 5 params
3279.7572     INFO     Loaded monitor calibration from ['2022_06_03 11:56']

PsychoPy WM task.zip (27.0 KB)

All help greatly appreciated and apologies in advance if this was asked before!

Hi @ymurzello,

Thanks for providing your experiment files here, it’s really helpful!

I’ve just taken a look at your experiment, without your videos too I can’t test it fully, but here are a couple of thoughts:

  1. Have you tried setting the size of the video stimulus to something you know will be presented on screen (such as (0.5, 0.5) for example)? If so, what happens then?
  2. I’ve just tested out your experiment, but replaced the video filenames with videos I have on my computer (also in mp4 format) and I’m able to run the task and see my videos. I’m assuming they are, but just in case, are your videos in the same folder as your .psyexp file?

Thanks,

Kim

Hi Kim,

Thanks a lot for your reply. Unfortunately, there’s a size limit so I was not able to include the videos in my experiment zip file.

  1. I did have the videos in the same folder as my .psyexp file.
  2. Since the video part of the experiment was built in an older version (2020.1.2) which I could run on my computer, I decided to use an older standalone version 2020.2.0 and I was able to see the videos. I’ve not set the size of the videos but they do run with a smaller resolution

    Perhaps the newer version requires certain settings to make videos run? I could try installing it on a different computer since I prefer its interface compared to the old one.

Kind regards,
Murzello

Hi @ymurzello,

Thanks so much. When you say ‘they do run with a smaller resolution’ - do you mean that they run in the 2020.2.0 version of PsychoPy or the 2022 version?

What happens when you run in 2022.1.4 using the moviepy backend, and set the size of the movie stimulus (in the layout tab of the component) to (0.5, 0.5)?

By default the size field is blank, which means that you’re probably seeing the central part of these videos, which will just look like a grey screen.

Slightly off topic but just as you mention the old style interface - you can change to this if you go to File > Preferences > Application > Theme > Then choose Classic light/dark from there :slight_smile:

Thanks,

Kim

Hi @Kimberley_Dundas

It runs in the 2020.2.0 version, not in the 2022 latest version. I haven’t been able to try what you suggested in the 2022 version as I currently have the 2020 version installed on my system.

What I like in the new version is the ability to copy components from one routine to another which doesn’t seem to work in the old version. When I copy a component in the old version, it doesn’t ‘paste’ into the routine I want it to.

Thanking you,
Murzello

Thanks @ymurzello,

I see, thanks for clarifying! I assume it’s the 2022 version you’re looking to run the experiment in? If so, do let me know how you get on when you get chance to test out the size change there.

That is certainly a useful feature! Just to clarify, updating the theme won’t change how PsychoPy behaves (so you’ll still be able to copy and paste components between routines), just the way that the Builder interface looks.

Thanks,

Kim

Hi @Kimberley_Dundas,

I installed the latest version and tried to run the experiment files on a new computer. I changed the file paths and set the size of the movie stimulus to (0.5, 0.5) as you suggested. The experiment loaded up till the letter and then crashed just before it could play the video. However, I am now unable to launch PsychoPy on that computer. When I try to run the software, I can see the loading screen but the program immediately closes before showing me the Builder, Coder and Runner. I also cannot see any programs running in my Task Manager.

Unfortunately, I did not save the error message that I got the first time when the experiment crashed, but I vaguely remember seeing “.kwargs” and “MovieStim3”.

Kind regards,
Murzello

Thanks @ymurzello,

Could you please try the following:

  1. Re-downloading PsychoPy on your computer
  2. Open your .psyexp file but don’t launch it
  3. Copy and paste all of the Routines apart from your trials Routinefrom your old experiment into a new experiment. Please make your trials Routine from scratch - I’ve seen that it contains the ‘video’ component which has now been replaced with the movie component since the 2022 release
  4. Please make sure that you set the size of your video stimulus to (0.5, 0.5), then save this into a brand new folder that’s not linked to the old one
  5. Copy over all of your resources (conditions file, stimuli etc.) from your old experiment folder into your new one - apart from the _lastrun.py file

In case you’re not aware, you can copy and paste routines by clicking on Experiment > Copy routine/Paste routine.

I think this should help. MovieStim3 isn’t used in the current version of PsychoPy, I think that the code that’s already been compiled in your _lastrun.py file still contains references to this stimulus Class and that’s why it’s behaving oddly.

Thanks,

Kim

Hi,

I’m trying to re-install PsychoPy and I now get this error
image

I am also unable to delete the PsychoPy folder as the DLL folder within it cannot be deleted
image

Update: I installed the program in a different location to avoid the ‘DLL already exists’ error and the installation completed successfully. However, I am still unable to get the program to launch. When I click to open, the loading screen appears and the Builder, Coder and Runner briefly appear and immediately close.

Kind regards,
Murzello

Thanks for this and also the update @ymurzello,

This sounds like there are still some PsychoPy processes running in Python that potentially haven’t stopped since you ran the experiment the first time - I know it sounds cliché but have you tried restarting your computer before opening PsychoPy again?

Thanks,

Kim

Hi @Kimberley_Dundas

I have restarted and shut down → turned on my computer but still get the same issue. However, I noticed that I can manually open the Coder and Runner and then use one of them to open the Builder from Windows > Builder (the Builder doesn’t launch by clicking on ‘PsychoPy-2022.1.4 Builder’).

I tried the steps you suggested in your previous reply and the videos load. Thanks a lot! However, I do see the following error in my Runner:

> 2661.2181     INFO     Loaded monitor calibration from ['2022_06_15 10:20']
> pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
> Hello from the pygame community. https://www.pygame.org/contribute.html
> 0.8194     WARNING     We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use ['sounddevice', 'PTB', 'pyo', 'pygame'] (in that order).
> 7.3483     WARNING     0.5065590999997767: Video catchup needed, advancing self._nextFrameT from 0.0 to 0.03333333333333333
> 7.3483     WARNING     0.5065828000001602: Video catchup needed, advancing self._nextFrameT from 0.03333333333333333 to 0.06666666666666667
> 7.3483     WARNING     0.5065967999998975: Video catchup needed, advancing self._nextFrameT from 0.06666666666666667 to 0.1
> 7.3483     WARNING     0.5066071000001102: Video catchup needed, advancing self._nextFrameT from 0.1 to 0.13333333333333333
> 7.3483     WARNING     0.5066170000000056: Video catchup needed, advancing self._nextFrameT from 0.13333333333333333 to 0.16666666666666666
> 7.3484     WARNING     0.5066277999999329: Video catchup needed, advancing self._nextFrameT from 0.16666666666666666 to 0.19999999999999998
> 7.3484     WARNING     0.5066376999998283: Video catchup needed, advancing self._nextFrameT from 0.19999999999999998 to 0.2333333333333333
> 7.3484     WARNING     0.5066474999998718: Video catchup needed, advancing self._nextFrameT from 0.2333333333333333 to 0.26666666666666666
> 7.3484     WARNING     0.5066569000000527: Video catchup needed, advancing self._nextFrameT from 0.26666666666666666 to 0.3
> 7.3484     WARNING     0.5066665999997895: Video catchup needed, advancing self._nextFrameT from 0.3 to 0.3333333333333333
> 7.3484     WARNING     Max reportNDroppedFrames reached, will not log any more dropped frames
> 15.5920     WARNING     0.4802938000002541: Video catchup needed, advancing self._nextFrameT from 0.0 to 0.03333333333333333
> 15.5920     WARNING     0.48031340000034106: Video catchup needed, advancing self._nextFrameT from 0.03333333333333333 to 0.06666666666666667
> 15.5920     WARNING     0.48032240000020465: Video catchup needed, advancing self._nextFrameT from 0.06666666666666667 to 0.1
> 15.5920     WARNING     0.4803302000000258: Video catchup needed, advancing self._nextFrameT from 0.1 to 0.13333333333333333
> 15.5920     WARNING     0.480337899999995: Video catchup needed, advancing self._nextFrameT from 0.13333333333333333 to 0.16666666666666666
> 15.5921     WARNING     0.48034670000015467: Video catchup needed, advancing self._nextFrameT from 0.16666666666666666 to 0.19999999999999998
> 15.5921     WARNING     0.4803543000002719: Video catchup needed, advancing self._nextFrameT from 0.19999999999999998 to 0.2333333333333333
> 15.5921     WARNING     0.4803617000002305: Video catchup needed, advancing self._nextFrameT from 0.2333333333333333 to 0.26666666666666666
> 15.5921     WARNING     0.4803690000003371: Video catchup needed, advancing self._nextFrameT from 0.26666666666666666 to 0.3
> 15.5921     WARNING     0.4803761000002851: Video catchup needed, advancing self._nextFrameT from 0.3 to 0.3333333333333333
> 15.5921     WARNING     Max reportNDroppedFrames reached, will not log any more dropped frames
> 0.6089     WARNING     Monitor specification not found. Creating a temporary one...
> ioHub Server Process Completed With Code:  0
> ################# Experiment ended with exit code 0 [pid:3248] #################

Since I’ll be running this experiment online, could you please confirm that this ‘Video catchup needed’ will not be an issue when my participants view the videos?

Best wishes,
Murzello

Hi @ymurzello,

That is certainly strange!

Glad to hear the videos load now! Regarding the warning messages, if you’re running the experiment online it will be difficult to control for the frame rate of your participants screens (and also the amount of processes they are running at the same time on their devices). These things won’t stop your experiment from running, but I would recommend piloting your experiment yourself online in a variety of situations (i.e. on a mobile device, having different things also running in the background etc.) to check that everything works as you’d like it to before starting to collect your data.

By default, the data file that is output when running experiments online will include the frame rate of your participant’s screens, so you will have this information in your data. Also, I recommend taking a look at this study for a comprehensive overview of timing in PsychoPy and other software, both locally and online.

Thanks,

Kim

1 Like