Tuesday, December 19, 2017

Improving your Video Meetings on Skype with Green Screens

Jeremy Williams, Sr. Director, Modern Workplace
Platforms / Technology

We've recently updated this article to address an issue that the latest version of MacOS has introduced with Syphon inject. The resolution is shown in Step 3, you also no longer need to include Syphon in your OBS configuration. 

Video Calls - We’ve all been on them, and most would tend to agree that they are more effective than conference calls. You can see your audience, read their reactions, and connect with them as a person vs. a voice on the other end of a phone. This typically is a far more productive use of a group’s time – it’s a more efficient medium than a conference call, as you can communicate with both verbal and non-verbal cues. However, there is a new dimension introduced here, which is a live feed of each caller and their immediate surroundings. 

This got me thinking – there must be a (relatively) easy way to use old technology we see (well, we actually don’t see it, but I digress) in the nightly news and Hollywood all the time – using a simple green screen to manipulate the background on a Microsoft Teams (or any other web-cam powered call) in real-time. Spoiler alert – For the life of me, I couldn’t find a write-up for this exact scenario from end-to-end out on the internet, the solution isn’t drop-dead simple, but this guide should make it pretty painless. For the visually inclined, here’s what we’re trying to achieve:

jeremy williams skype green screen

Things you’ll need (mandatory):

  • About 1-2-spare hours to get this all set up and working (this took me far longer as I was researching tools and such, but I just went through an exercise of setting up my ‘studio’ yesterday and it took me about 30 minutes from start to broadcast).
  • Mac (This also works on PC, though the virtual webcam part is different, this guide is written for the Mac platform). I strongly recommend a dual monitor setup.
  • PC Users: You can also do this using OBS, the difference is that you can download the OBS virtual web cam plug-in, which takes the place of CamTwist.
  • Teams – This happens to be my company’s video call software, though this approach will work with any modern video calling software such as Skype, WebEx, FaceTime, Zoom (actually, Zoom has built-in green screen options in preferences which may help short-circuit some steps).
  • OBS – This is the ‘production’ software, it’s the place where the chroma-key (green-screen) is removed from your footage.
  • CamTwist – This is also production software, but it ships with a key plug-in: a virtual web-cam, something we’ll need to get our output from OBS over to Teams in real-time for our audience to see.
  • Green or Blue Sheet/Poster board/Wall/etc. – This will serve as your backdrop, though I highly recommend an inexpensive green-screen kit – it makes this so much easier.

Things that may make this a bit easier:

  • Green screen and backdrop frame – These can be found inexpensively on Amazon and many other retailers
  • Studio Lighting – There’s actually a bunch of kits on Amazon with a green screen, backdrop support frame, and studio lights. I went this route and picked up the green screen and lights in an inexpensive package. I used this one, though there’s tons of options out there.
  • Muslin clamps – Helps to keep your green-screen as flat as possible

Extra-credit (things I didn’t use but could make things even easier and/or more flexible):

  • External webcam – Will give you more freedom in camera angles and placement
  • External microphone – If you using this setup for something more fancy than a video call (e.g. you’re using this method for podcasting, etc. – a high-quality mic will work wonders to improving audio)

Putting it all Together – The Theory:

If you want to dive right in, jump down to the next section – if you want to know how this works (which will save you time in troubleshooting later) read on.

In a typical video call on Teams, the two end-points of interest are connected directly: Your webcam records and outputs directly to the Teams video call. Simple enough. In our scenario, we want to intercept the webcam’s output, manipulate it in real-time, and then output it back to Teams. The easy part is the initial intercept of the webcam’s output – OBS can easily capture that output and has great tools for removing the green screen from the image and compositing whatever background or composition you want to use.

The real challenge is getting that output (in OBS) over to Teams in real-time: Teams (and just about every other common video call software) only accepts video from webcam devices. And our desired video stream is no longer coming from a webcam, it’s now a manipulated video stream sitting in OBS. We need to get our OBS video stream into something that resembles a webcam, so that we can share the manipulated video stream over to Teams. This is a two-step dance, first we need a virtual webcam (that’s where CamTwist comes into play) and then we need a conduit to get the video output from OBS to CamTwist.

This was the hardest part – previously we could use syphon to capture and share the video source, but recent updates to MacOS have blocked this as it posed a security risk. The work-around, while a bit hacky, is to simply use the Desktop region capture in CamTwist to share the portion of your desktop that has the OBS preview window shown.

From here, it’s just a matter of writing everything up and jumping on your call – here’s how to do that:

Putting it all together – The Recipe:

Initial Setup:

1. Setup your green screen and/or solid colored background. Here’s my quick tips for setting it up:

a. You don’t need the level of cinema-perfection yet (e.g. hold off on buying $1000 light bars for now)

b. Try to get as much separation as possible between you and the screen

c. Be safe – you’re playing with metal support structures and lots of lightbulbs/electricity… Be really careful with CFLs, those suckers can break easily and make quite the mess... Ask me how I know.

2. Get OBS up and running

a. If you haven’t already, install OBS

b. Create a new scene by clicking on the plus button under the ‘Scene’s area of OBS. 

c. Add your webcam to the video source by pressing the plus button, Select “Video Capture Device” and select ‘Create new’. Accept the defaults, and then OBS will drop a picture of you into the scene editor. Use the red handles around your image to fill the black box (which is your video area). 

jeremy williams skype green screen

d. Couple of things for us to fix up now, the cropping and then the green screen. First the crop. Right click on Video Capture Device, and select filters. Under the effect filters, click plus and add a crop/pad filter. Play with the various crop values to get it so just you and your green screen is in the frame.

jeremy williams skype green screen

e. Now it’s time to remove your green screen background in OBS. Add another filter to your video capture device, this time we’re adding the ‘Chroma Key’ filter. It’ll preload with defaults for green. Play around with the sliders to maximize the color representation and minimize any green spill around the edges of you in the shot. Take your time here, you’ll appreciate it later. I’ve included the settings I used, those yours will probably be different.

i. You’ll notice that I’ve done a pretty miserable job at lighting my green screen – thankfully, it’s good enough, but remember that you’re shooting for the most even lighting of the green screen using the minimum amount of light (since it’s going to reflect on you and that’s something you want to avoid unless you want a sweet green halo around you).

     jeremy williams skype green screen

f. Press “close” and you’ll now see that you’re a floating person with no background! Now all we have to do is composite the shot, that means we’ll want to add a background. To do this, add another source – namely an image. Select the image you want to use as your background. Add your image, make sure you have it below your video capture device in the source list (since sources act like layers) and adjust your image’s size to your liking and bam!

   jeremy williams skype green screen

g. One last thing, you'll want to press the little 'lock' icon next to all your sources, it'll remove bounding boxes that will otherwise become annoying later. 

3. Setup CamTwist

a. If you haven’t already, install CamTwist.

b. Add the Desktop source by double clicking it, then (in settings) select 'Resizeable selection' then drag the black bounding box around your OBS window.

i. Don't use Desktop+, it tends to thrash your CPU much more so than the Desktop option.

c. To make sure everything is working, open up the Preview window in CamTwist by going to View a Preview. This will show you what CamTwist is going to broadcast to its virtual webcam.

Example of what CamTwist is going to broadcast to its virtual webcam   

d. Once you have the Preview showing what you want, you’re good to go.

e. Don't forget, whatever is in that bounding box of CamTwist will display as your camera output... so avoid placing it where you may receive notifications or other window pop-ups. Yes, this means you really should have multiple monitors running to make this work, personally I put the OBS window in the lower right-hand corner of my screen.

4. Fire up your messaging application of choice, in my case it’s Microsoft Teams

a. Navigate to preferences and change your webcam from FaceTime to CamTwist.

i. Troubleshooting-tip: If you see a bunch of colored bars in CamTwist, quit Teams, quit CamTwist, then restart CamTwist, ensure the preview is good, then launch Teams.

Example of changing your webcam from FaceTime to CamTwist


b. Pro-tip: See that annoying red-outline: get rid of that in OBS by clicking the little lock icon on all of your sources

c. Launch your meeting, share your video, and you’re off to the races! (p.s. your preview will be mirrored, everyone else will see the screen correctly oriented - this is particularly highlighted in my example as I used a backdrop with our logo on it)

      Example image of a mirrored green screen

That was a marathon post – so I’m going to call it for this one. Just to recap, at this point you should have your studio workflow setup to the point where you can successfully use a green screen in an online meeting.

In my next post, I’ll get into some of the more advanced and interesting scenarios for this technology, but until then – have fun and (as always) if you’ve got questions or need help with any of this, let’s talk.

Jeremy Williams is Senior Director, Productivity & Collaboration, at Rightpoint. Follow Jeremy on Twitter and LinkedIn.