Virtual Camera Turned On By Default?

UrbaneBoffin

New Member
I love that there is a Virtual Camera built into OBS now. This is a feature I use a lot for online teaching. One of the features I liked about the VirtualCam plugin was that I could set it so as soon as OBS was started, the VirtualCam was running. Can that be done with the new built-in version?
 

TonyMayo

New Member
The virtualcam can automatically be started through the command line option --startvirtualcam

Right click your OBS shortcut > Properties > Append "--startvirtualcam" to the end of the text in the Target box
Thanks. That helped. Two additions that may be helpful to others.
1. Here are the other inline options https://obsproject.com/wiki/Launch-Parameters
2. If you are using a Stream Deck, the options go outside the quotation marks. This is exactly what to type into "App/File" box of the "System: Open" action.
"C:\Program Files\obs-studio\bin\64bit\obs64.exe"--startvirtualcam
 

mirjafar

New Member
Thanks. That helped. Two additions that may be helpful to others.
1. Here are the other inline options https://obsproject.com/wiki/Launch-Parameters
2. If you are using a Stream Deck, the options go outside the quotation marks. This is exactly what to type into "App/File" box of the "System: Open" action.
"C:\Program Files\obs-studio\bin\64bit\obs64.exe"--startvirtualcam
Thanks. That helped. Two additions that may be helpful to others.
1. Here are the other inline options https://obsproject.com/wiki/Launch-Parameters
2. If you are using a Stream Deck, the options go outside the quotation marks. This is exactly what to type into "App/File" box of the "System: Open" action.
"C:\Program Files\obs-studio\bin\64bit\obs64.exe"--startvirtualcam

Hi, On a MAC where should we Append --startvirtualcam?
 

Jonathanl

New Member
When using a Mac, in coordination with OBS and a Stream Deck, what is the short cut key code for: Start Virtual Camera to insert into my stream deck hotkey button? Kindly explin the steps, clearly and simply as I am not a tech savvy person. Thank you.
 

spkane

New Member
On a Mac something like this SHOULD work.

/Applications/OBS.app/Contents/MacOS/obs --startvirtualcam

In my testing however I found that it would fail once you added the command line argument, eben though this works from a terminal just fine. This is likely a problem with the System - Open plugin provided by Stream Deck. A plugin like this one (assuming that it works on the Mac) might solve the problem.

https://github.com/BarRaider/streamdeck-advancedlauncher
 

hks

New Member
Hi All, I was following the instructions above, and it kept on failing on a windows 10 PC. It took me weeks to figure this out. To clarify for any future newcomers, the --startvirtualcam needs to be placed OUTSIDE of the quotations, AND you need to put a SPACE between the last quotation mark (") and the --startvirtualcam parameter.

e.g.:

"C:\Program Files\obs-studio\bin\64bit\obs64.exe" --startvirtualcam

^^ see the space inserted BEFORE the --startvirtualcam

---

I also added:

"C:\Program Files\obs-studio\bin\64bit\obs64.exe" --startvirtualcam --scene "Camera1"

where "Camera1" is the default scene that I want to boot into every morning.

---

I hope that helps for any future newbies like me :P
 

bradtem

Member
I use --startvirtualcam. I would like it if OBS, when I use this option, would not pop up a dialog box when I close it to confirm I really want to close with the virtual cam running. This is the same warning if you have streaming or recording running, which make more sense in that case. In fact, I would be fine if there were no warning at all about the virtual camera running, but at the very least the warning is not a good idea if one deliberately starts it from the command line.
 

Gennaro90

New Member
The virtualcam can automatically be started through the command line option --startvirtualcam

Right click your OBS shortcut > Properties > Append "--startvirtualcam" to the end of the text in the Target box
Hello dodgepong can you take a look to this related question please?

 

NoCategories

New Member
The shortcut tweak works, but I noticed that sometimes when I update OBS the shortcut gets replaced, and then I lose my auto-start setup. I found another way to do it.

1. Make a script file, I called mine start-virtual-camera.lua and save it somewhere

2. Contents of the script file should be:
obs = obslua function script_load(settings) obs.obs_frontend_start_virtualcam() end

3. save the file

4. in OBS go to Tools > Scripts, select the + button and browse to the start-virtual-camera.lua file. Then close the Scripts dialogue window.

5. Now, whenever you start OBS from a shortcut that doesn't have --startvirtualcam, the script will run at startup and your Virtual Camera will start automatically.

It seems to work for me, anyway, running OBS v30 in Windows 11. Can anybody confirm whether this works for them, too?
 

matthewclaussen

New Member
The shortcut tweak works, but I noticed that sometimes when I update OBS the shortcut gets replaced, and then I lose my auto-start setup. I found another way to do it.

1. Make a script file, I called mine start-virtual-camera.lua and save it somewhere

2. Contents of the script file should be:
obs = obslua function script_load(settings) obs.obs_frontend_start_virtualcam() end

3. save the file

4. in OBS go to Tools > Scripts, select the + button and browse to the start-virtual-camera.lua file. Then close the Scripts dialogue window.

5. Now, whenever you start OBS from a shortcut that doesn't have --startvirtualcam, the script will run at startup and your Virtual Camera will start automatically.

It seems to work for me, anyway, running OBS v30 in Windows 11. Can anybody confirm whether this works for them, too?
I tried that and it works for me. I love that this should persist through upgrades!
 

bigfatpauly

New Member
The latest versions of OBS (30.2.0 for me currently) on macOS can't seem to start the virtual camera automatically with any of the solutions listed above. Neither --startvirtualcam or the lua script above work, because macOS doesn't load the virtual camera driver synchronously or immediately. So you always get an error stating the virtual camera isn't installed, but it will be fine a couple seconds later if you just use the Start Virtual Camera button.

So I wrote a workaround script and figured I'd share it so that no one else fights with auto starting the virtual cam like I did.

Follow the same script creation and selection steps listed earlier, but change the script contents out for this:
obs = obslua function script_load(settings) obs.timer_add(enableCam,4000) end function enableCam() if obs.obs_frontend_virtualcam_active() == false then obs.obs_frontend_start_virtualcam() obs.remove_current_callback() end end

This script will start a 4 second timer as soon as OBS loads. Once the timer is up, it will start the virtual camera if it isn't already enabled and then unload the timer. It's a hacky workaround, but if all you use is the virtual camera it is really nice to have it start automatically.
 

ninbura

New Member
The latest versions of OBS (30.2.0 for me currently) on macOS can't seem to start the virtual camera automatically with any of the solutions listed above. Neither --startvirtualcam or the lua script above work, because macOS doesn't load the virtual camera driver synchronously or immediately. So you always get an error stating the virtual camera isn't installed, but it will be fine a couple seconds later if you just use the Start Virtual Camera button.
I just ran into this while trying to start OBS with command line arguments via Automator on macOS. A more integrated/elegant solution is using the Advanced Scene Switcher plugin IMO.

You can simply create a Macro where after x amount of time has passed start Virtual Camera:
Screenshot 2024-08-04 at 5.04.53 AM.png

If you uncheck "Automatically reset timer after duration was reached", the timer/macro will only run once.
 
Top