Obs-mac-virtualcam: Adapt this code to obsproject/rfcs#15

Created on 14 May 2020  路  16Comments  路  Source: johnboiles/obs-mac-virtualcam

Since the ultimate goal of this project is to get merged into the main OBS codebase, we should adapt this plugin to be in-line with the official OBS Virtual Camera RFC.

First step is for someone to go through the RFC and make a note of all the things we'll need to add/change here for this plugin to conform with the RFC. Then we can break the individual tasks out into separate issues we can tackle.

RFC enhancement

Most helpful comment

All 16 comments

What needs to change:

  • Start/Stop-Button needs to move to below "Start Streaming" --> I'm not sure if we can du this with just a plugin
  • New Settings menu:

    • Autostart checkbox

    • Horizontal-Flip checkbox (I personally think that this is a bad idea since people will start flipping the video to match the preview of the video chat app which itself is flipped from what the user will see, so if it enabled the chat partner would see the flipped output while the user thinks it's fine)

  • Output settings:

    • Improve "Output active" message to show all active outputs --> Probably not needed with a plugin but should be added when merged

  • Test card

    • "aesthetically pleasing such that, if the output is accidentally sent to viewers (for example, if the user fails to start the virtual output before joining a Zoom call), it is not unnecessarily [...] technical"

    • "requires minimal localization, or provides a way to localize any displayed text on the image" #154

  • Add "outputting to a virtual camera" to the Auto-Config tool --> Again, I'm not sure if that'll work from a plugin (Although Auto-Config probably also just is a plugin)
  • New command line flag --startvirtualcam --> Won't work from plugin
  • Should be accessible by third party applications that support webcams/capture cards --> Needing to solve the "Zoom-Issue"
  • Multiple instances: First instance should win the race, other instances should get an error message --> AFAIK, at the moment the second instance just crashes, but the last time I checked was during the times with the apple sample code

@gxalpha you missed The virtual camera will need to be registered with the system upon OBS installation. I guess we need to change obs installer too

Good catch @lsamayoa

@johnboiles @gxalpha The Windows version of the virtualcam was just pushed to a branch on the main repo, which means that several things that were missing before should now be available to develop for (most notably the Start Virtual Camera button). You can find the branch here: https://github.com/obsproject/obs-studio/tree/virtualcam. The most notable commit for the purposes of this plugin would be the UI changes, found here: https://github.com/obsproject/obs-studio/commit/1f9b8fc6eaa76598fb4d89afd0cbb59363e200d8

It's worth noting that right now, we're leaning toward not having a Flip Horizontal button, and I'm starting to lean toward not having an auto-start checkbox either (since active outputs disable output settings). I think the command-line flag should be sufficient for most people, though that has yet to be added (I believe this is relatively simply to add though, now that the button exists).

So are we going to go back to .pkg-installers?

@jp9000's latest thoughts on the .pkg matter are here: https://github.com/obsproject/rfcs/pull/15#discussion_r434881632

In that discussion I argued pretty strongly for a .pkg because it "just works" but I am open to being in the wrong about it. Signing woes for .pkg files are not a bad justification for resisting moving to .pkg.

As I understand it, the alternative would be to add a pop-up on Mac when you first click "Start Virtual Camera" that basically says "Hey, before you use the virtual camera we need to install some additional components. We only have to do this once. Is that okay?" and then gain some sort of elevation to install the plugin files. I'm still not clear on what the uninstall plan is for the plugin though.

One downside of waiting for the user to click the "Start Virtual Camera" before installing the plugin files is that the camera entry won't appear in other programs until it's installed. This means that if the user opens a program like Zoom, they won't see the OBS camera in the list prior to pressing that button.

Maybe the button should be labeled "Install Virtual Camera" if it's not installed? That seems awkward too. What might be a better option? A pop-up the first time you run OBS after installing/updating it, with an option in the Tools menu to install or uninstall the plugin files?

That sounds like a good idea!

The thing about uninstalling is that we'd again need elevated rights, I'm not too sure about that yet

The Windows VIrtualCam has been merged: https://github.com/obsproject/obs-studio/pull/3087

Other than figuring out how the DAL plugin gets installed, what work is there left to do to adapt this to use the UI code that is now in the OBS master branch?

We need to figure out how to do the variable test card, I gave it a try a few days ago but didn't succeed (tho this is probably down to me :D )
Anyways, it'll won't work on first open of the app, the virtualcam would have to be started at least one after changing the image due to macOS's sandboxing limitations (at least that is the current state and I don't see how else to store the picture)

Variable test card?

@jp9000 see this and the comment above that.
Or has that been reversed?

I would argue that the placeholder card being replaceable would be nice, but if it's complicated to do then it's probably not a big deal. It's easy on Windows but if it's not easy on Mac then I say just keep the default one.

Thing is that in theory it should work, I might look back into it tomorrow

Closing this as we're all merged now 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

harrisrobin picture harrisrobin  路  9Comments

alexandr- picture alexandr-  路  14Comments

jdgwf picture jdgwf  路  13Comments

czhowl picture czhowl  路  11Comments

johnboiles picture johnboiles  路  10Comments