Is there a way to turn on/off VirtualCam via code while running?

scampa123

New Member
If OBS is already running, is there a way I can "tell" it start/stop the virtual camera via code? I'd like to integrate it into a batch for starting my stream.

I know I can start OBS at the commandline with the virtualcam running, but OBS is typically runnign on my environment always...

Thx!
 

redfrog

New Member
Hi, on github I found the following functions related to the virtual camera in obs-frontend-api.h : obs_frontend_start_virtualcam, obs_frontend_stop_virtualcam, obs_frontend_virtualcam_active.
They look similar to the functions related to streaming, recording and replaybuffer.
However I tried to use them in lua script without success. The call generates an error ! ! ! !
Are they really made available to lua scripts ?
Is there somebody who used these functions successfully ?
 
Last edited:

redfrog

New Member
@scampa123 : the functions related to the virtual camera, obs_frontend_start_virtualcam, obs_frontend_stop_virtualcam, obs_frontend_virtualcam_active will be available in OBS 27.
Information from GitHub.
 
Top