If you’re subscribed to Adafruit’s Twitch.tv and YouTube channel you might have seen some live coding broadcasts I’ve done with the Raspberry Pi, Circuit Playground, and other boards. In these broadcasts I’ve experimented with using a green screen or chroma key effect to overlay myself on my desktop, workbench, and more during the stream. In this blog post I’ll collect a few tips I’ve learned while setting up the green screen effect in case it helps anyone else that wants to do live streaming too.
Be warned I’m not a video production professional–I’ve just learned all of this by doing and trying it myself. If you have good tips too post them up in the comments!
The first tip is to get a quality green screen. I picked up this 6 foot wide by 9 foot tall screen from a seller on Amazon for about $40 and have been very happy with how well it works in my setup. You can in theory use anything that’s a bright, solid green (or even blue in case your subject being filmed has green colors you want to pick up) but I went with a fabric screen for ease of use so I can put it up and tear it down without a lot of trouble. Buying fabric yourself to make a screen could work too, but be careful because you might need to stitch multiple pieces together to make a wide screen. Rather than mess with sewing and hiding stitches I opted to buy a single solid screen.
For the size of the screen I suggest starting with at least a 6×9 foot screen. This is a great size for a typical webcam to film your upper body with the screen about 2-3 feet behind you. It’s important to leave a decent amount of room between yourself (the subject) and the green screen. This will prevent green light from reflecting onto your body from the screen, and give you room to evenly light the screen.
The second and perhaps most important tip is to have plenty of lighting. For my setup I have the following lights:
- Two small LED light panels pointed at my face. These illuminate my face from opposite sides to cancel out shadows and evenly light my face. I have them mounted on either side of my monitor and powered by small camcorder batteries.
- Two large LED light panels as fill lights to illuminate the green screen. It’s very important to get as much even lighting on the screen as possible so that the green screen processing is easier and higher quality. For my setup I value being able to tear it down and set it up quickly so LED panels work best, but any large diffuse light source like a softbox and CFL studio light would work great too. Position the lights so they cancel out as many shadows as possible on the screen.
For the software part of the setup I’m using OBS, Open Broadcaster Software, and specifically the newer multiplatform version of OBS. OBS is a great application that’s heavily used in the Twitch.tv and video game live streaming community. There’s a great green screen / chroma key effect filter built right into OBS. All you need to do is add a chroma key filter to your webcam source. For example here’s what the raw output of my camera (a Logitech C920 webcam) looks like with the screen behind me:
Notice how the 6×9 foot screen is just about big enough to cover my body. You can also see the lighting is relatively even across the screen (although in this example I should move the lights a little lower as they’re brighter on top than the bottom). There are some wrinkles in the screen, but I’ve found the chroma key filter is somewhat forgiving and will take care of them.
Once the chroma key filter is applied I adjust the similarity slider until it’s grabbing all of the green screen and none of my body:
Finally I apply a crop filter to cut out the edges the green screen doesn’t cover:
Now the camera source can be applied to a scene, like overlaid on a workbench camera:
Once you have the scenes setup make sure to do some recordings and carefully watch how the audio syncs up with the video. In particular watch your lips to see if it appears they’re moving after you hear the sounds of your voice. I found I needed to add about a 200 millisecond delay to my microphone audio (in the advanced audio settings of OBS) to get them in sync. The green screen processing adds a bit of latency to the video so be aware that some tweaks will be necessary.
That’s really all there is to using a green screen for live streaming!
One final tip is if you’d like to make your screen more convenient to setup and tear down you might consider putting the screen on a roller that can move it up and out of the way. I bought this inexpensive photo studio backdrop roller and a length of plastic ABS pipe from the hardware store (2″ in diameter and about 7 feet long) and attached it to my ceiling with heavy duty ceiling wall anchors, then taped the green screen to the roller. This way I can raise and lower the screen easily. If you don’t want to setup a roller like this I found just using a curtain rod worked well (although be aware beyond lengths of ~6 feet you’ll find the screen might pull down and bend small curtain rods).
Good luck and share any great tips you find for live streaming in the comments!