obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
57.22k stars 7.72k forks source link

Launch param "--startvirtualcam" not working with OBS 30.0.0 on Mac 14.1.1 #9896

Open shoesack opened 7 months ago

shoesack commented 7 months ago

Operating System Info

macOS 14

Other OS

No response

OBS Studio Version

30.0.0

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/Y0tQK47XEdYEn7OE

OBS Studio Crash Log URL

No response

Expected Behavior

Starting OBS application via script, using argument --startvirtualcam should start the application and virtualcam at once

Current Behavior

App is opened but error message regarding missing virtual camera is popping up:

The virtual camera is not installed.

Please allow OBS to install system software in System Settings → Privacy & Security → Security.

You may need to restart OBS if this message still appears afterward.

Under privacy & security no new option dialogue to allow virtual camera

Steps to Reproduce

  1. Type open -a "OBS" --args --startvirtualcam in mac terminal
  2. Wait for application to run
  3. Error message appears
  4. Check Privacy & Security -> No option to allow virtual camera ...

Anything else we should know?

Virtual camera is installed and works es expected if manually started via "Start Virtual Camera" Button.

RytoEX commented 7 months ago

As I mentioned in the OBS Studio 30 Beta/RC forum thread:

The issue with --startvirtualcam on macOS seems to be due to the asynchronous nature of the Camera Extension code. It will not work as-is, and we may need to temporarily disable it until we can resolve it or work around it.

@PatTheMav @gxalpha

PatTheMav commented 7 months ago

As I mentioned in the OBS Studio 30 Beta/RC forum thread:

The issue with --startvirtualcam on macOS seems to be due to the asynchronous nature of the Camera Extension code. It will not work as-is, and we may need to temporarily disable it until we can resolve it or work around it.

@PatTheMav @gxalpha

That is correct - the camera extension is initialised and checked for asynchronously and OBS will treat is as "unavailable" until that check passes at some future point after the launch. And OBS architecture is currently not able to also handle that event asynchronously as well to queue the output start at some point in the future.

As such we cannot make it available with a command line switch without restructuring the entire codepath, so we'll remove the functionality entirely in a future patch release.

shoesack commented 7 months ago

As such we cannot make it available with a command line switch without restructuring the entire codepath, so we'll remove the functionality entirely in a future patch release.

Sad news in general.

By now i worked around this issue just setting a keybinding for start/stop virtual cam and adding a delayed keystroke to my startup script which does the trick so far (even not the nicest solution ^^ ).

therentabrain commented 7 months ago

By now i worked around this issue just setting a keybinding for start/stop virtual cam and adding a delayed keystroke to my startup script which does the trick so far (even not the nicest solution ^^ ).

For whatever this may be worth, anyone needing a workaround for now for this issue: Advanced Scene Switcher can start/stop the virtual camera on a variety of cues. I don't know how to tell it to do something on startup as such, but you can tell it something that's always true, like your profile is the current profile, or the presence of the obs thread in Processes. :)

It can also delay a set amount of time first if that makes it happier.