Hello everyone,
I’m setting up an experiment in PsychoPy where participants need to video-record themselves pronouncing words displayed on the screen. The idea is that participants press a button on the screen to start video recording and release it to stop recording.
Currently, I’ve added a Button Component along with a Mouse Click response to the routine. For the Webcam Component, I set the Start condition to $condition – mouse click. However, instead of starting the recording upon the button press, the webcam starts recording immediately when the instruction text is presented — not when the button is clicked.
Does anyone know how to configure the webcam to start recording only when the button (or any other response method) is pressed? It doesn’t necessarily have to be the button component — any solution that requires participants to trigger the recording manually would work.
Thanks in advance for your help!
Please could you explain what you mean by this?
I set the Start condition to $condition – mouse click .
1 Like
@wakecarter, thanks so much for getting back to me on this! What I meant is that in the camera properties, I set the start time to a condition mouse
. I’ve attached a screenshot for reference.
As you can see, I also have key_resp
in the routine, but even if I set the camera’s start condition to key_resp
, camera recording still starts immediately when the routine begins—right when the text_5
component is presented.
I’d really appreciate any suggestions on how to ensure the camera only initiates upon a response, whether it’s a key press or a mouse click.
Thanks in advance for your help!
Sorry the screenshot was not very clear – please see this one attached
By itself, mouse isn’t a suitable condition. It’s a component that exists.
You might be able to use mouse_3.getPressed() or with a keyboard key_resp.keys.
N.B. Due to a bug, you may need to give the camera component a duration, rather than leaving it blank.
1 Like
@wakecarter @wakecarter – ah, I see! Thanks so much for the help—I’m going to give it a try.
Just to add, I also attempted to solve this using a piece of code (screenshot attached), but unfortunately, it doesn’t get me past the welcome text in the first routine. I can see that the camera gets activated as soon as the experiment starts because it lights up, but it doesn’t seem to wait for the intended trigger. So it does look like it’s a bug…
I would try with my suggestion, not that code.
Hello @wakecarter,
Apologies for reviving the same thread, but I’m facing a slightly different issue this time and would really appreciate your insight.
I’m currently running this experiment online via Pavlovia. When reviewing participants’ webcam recordings (collected across various computers), I noticed that all the videos were saved in .webm
format with excellent visual quality—but unfortunately, the audio is missing in all of them.
Interestingly, I also collected separate microphone recordings during the experiment, and those came through perfectly. So I’m quite confident that the microphones themselves were working fine.
Do you have any idea what might be causing the webcam video responses to record without sound? I’d be so grateful for any suggestions or things I could check.
Thank you so much in advance for your help!