How to synchronize video playback with auditory stimuli in PsychoPy?

Hi everyone,

I am currently designing an auditory ERP experiment using PsychoPy Builder and have encountered a challenge I hope you can help me with.

I have successfully created a practice loop and a main experiment loop where auditory stimuli are played, and the auditory part is working fine. The experiment is designed for passive listening, meaning participants only need to listen to the stimuli without responding.

Here is what I want to achieve:

  1. While auditory stimuli are playing, I want to show a movie on the screen, allowing participants to watch it during the auditory stimuli presentation.
  2. When instructional screens appear, the movie should pause to avoid interference with the instructions.
  3. When the next set of auditory stimuli begins, the movie should resume, maintaining synchronization between the audio and video throughout the experiment.

Could you please advise how I can implement this in PsychoPy? Specifically, how can I control the movie playback (pause and resume) based on different sections of the experiment? Any code examples or guidance would be greatly appreciated!

Thank you for your help!

Providing that the instructional screen appears at the same time for each participant, a possible solution that may work is having your task split up into 3 routines, and your audio/visual files split into two separate ones each.
Routine 1: Contains the section of the movie and audio that plays before the instructional image.
Routine 2: Contains a still image of the image when it would be paused. Then the instructional text over top.
Routine 3: The continuation of the movie and audio from the pause point and onwards.
Hopefully this is an adequate solution to your problem.