Video recording using a webcam

Hi all,

I’m using a PC to run a very simple pointing task. On each trial a participant presses and holds a button; after a brief period they’re presented an auditory beep stimulus. This cues the participant to de-press the button and to point to a stimulus in the workspace.

I’d like to use the pressing of the button to start video recording with an external webcam. Once the participant completes the trial the experimenter will hit the space bar. This button press will cue the webcam to stop recording.

I’ve search this forum to see if others have identified a solution to video record using an external camera.
For example, I came across this post: Adding a web-cam — PsychoPy v2023.1.1

But I haven’t encountered a sample experiment or solution to the problem. So, I’m wondering if anyone has any pointers or suggested resources. Any help is much appreciated.