The perfect work from home/meeting setup
Who doesn’t feel awkward having their house visible while being the midst of a meeting at work? Plus the noises which make you constantly mute and unmute yourself — worst of all, when you explain an entire concept just to realize you were muted all this time.
Well, while developing a virtual driver for a Windows based system that not only eliminates background from your video feed but also a great deal of noise from your background, I came across a solution that one could implement, for free and which uses FOSS based solutions. (FOSS is the key word here, because there are a whole bunch of simple, one-click alternatives to this — check out split, chroma.me, manycam)
We start off by downloading Open Broadcaster Software Studio (OBS Studio) and its virtual camera driver plugin. Follow the preview output steps in the virtual camera driver link in order to set up the plugin with OBS studio. This essentially sets up a camera that can be used across various applications, including Teams, Hangouts, Zoom to name a few.
Once we have that out of the way, go ahead and download Selfie-Anywhere. This repository uses body pix and tensorflow.js to recognize humans in a given frame, using this information, it replaces the background with a user-provided image.
Open your command prompt and type npx serve for this to get started locally.
Go back and launch OBS studio with the command obs64.exe — enable-media-stream. The enable media stream flag allows the inbuilt browser to access microphone & camera which we will use shortly. Now, hop over on to scenes tab, add a browser source, and type in localhost:port at which your application is running.
Next up, we download the RNNoise VST plugin for background noise subtraction.
Go back to OBS, in the same scene, add an audio source -> Filters -> VST2.x Plugins and specify the plugin DLL file.
Lastly, go to Edit → Advanced audio properties → In the audio source you added your plugin, selected monitor, and output. (Note: Plug in your headphones, otherwise this will lead to a sound feedback loop)
After everything is set up, this how things should look —
Now, you can open up any platform of your choice and in sources, select OBS-Camera
While the initial setup might take a good hour or so — subsequent use will just require you to start the two servers and you’ll be up and running!