I am currently planning a new experiment and therefore we aim to create videos that I want to display in Psychopy later. My question is, if it is possible to display a visual.ImageStim on top of a currently running video? So is it possible to create a second visual layer on top of a visual.MovieStim?
It should be possible to have a movie running and to present stimuli in front of the movie, you would just need to call for the stimuli to be drawn after the movie.
For example:
while frame < 10:
movie.draw()
image_stim.draw()
win.flip()
Yes, it is possible to add text over a running video.
In builder, you can display text over the movie by setting them to appear on screen in the same time frame and having the movie component at the top of the routine (you can either set up the movie first then text, or right click on movie and select move to top, that way the text appears on top of the movie).
Perfect, thank you very much for your explanation! I want the text to appear when participants press “space”, so I have to add it using a code component, right?
Instead of adding a code component, in the text properties you can set the start of the text to ‘condition’ (instead of time or frame N) and write the following (assuming the keyboard component is labelled as ‘key_resp’ and the keyboard should be above the text):
$key_resp.keys == 'space'
This way the text won’t appear until the space bar has been pressed.