Video tutorial:
Chroma key is a technique used to replace the background in images. It is widely used in the production of videos, but it can also be used in video streams and videoconferences. To apply it, it is usually necessary that you have a background with a homogeneous color, usually green or blue, this could be a wall, a fabric or a sheet of paper.
Here we take a different approach, using image processing to replace the background easily and quickly. For this we are going to use the Snap Camera, which is basically a computer version of Snapchat, where you can apply all the funny effects and lenses of Snapchat, here we will focus on replacing the background.
If you just want a quick way to replace your background with something else, perhaps for privacy reasons, that's all you need. Once installed, just search for a background lens and apply (ex.: library, office. In your videoconference or stream you only need to select the snap camera as the video input.
But among the lenses we also have some that simulate a green backdrop, which can be replaced by other images and videos of your choice, in real time. For this we will use another free software, OBS Studio, together with its plugin, Virtualcam.
To capture the video from the Snap Camera you need to add a "video capture device" in the sources block, and set it with the Snap Camera. In some cases there may be a difference between the video resolution of the Snap Camera and the resolution of OBS, we can adjust the scale of the video directly in the preview, or change the OBS output resolution in its settings.
To add the chroma key effect to the video, we go back to the sources and with a right click on the Snap source we need to select the "filters" option. In the "Effect filters" we add the "Chroma key filter", confirming that we have the green selected as the "Key color". Remember that you should have a lens with a green background activated in the Snap Camera.
Then we can add an image, video or screen capture in the background of the camera video, I will demonstrate it here with an image, for that we go to sources and add "Image". In the new window just navigate to the location of the image, maybe we will have to adjust the image to the OBS resolution.
The image probably has taken the entire preview screen, as it is in the front plane, to put it in the background just reorganize the sources so that the image is below the video of the snap source.
At this point we can already stream or start a recording, but first you need to click on "Transition", so that the preview image goes to the program image.
It is not yet possible to use this video as input in a videoconference software, first we need to start the Virtualcam plugin. To start it, access the "Tool" menu and select the corresponding option, if it is not there you still need to install the plugin. In the new window the virtual camera can be started, if you want, you can also check the option so that it starts automatically with OBS. Now you just have to select the OBS camera as your webcam in your videoconference software.
Some notes about the Snap Camera:
Background removal works best when there is a certain contrast between you and the stuff on your background.
The lenses don't recognize arms, your arms will disappear in the video if you raise your hands.
The Snap Camera can use significant processing power, if you are gaming or doing a more demanding task while streaming, you may experience some performance drop. In such cases it may make more sense to invest in a physical green fund.
That's it for today, if you had any questions, feel free to ask in the comments. Enjoy.
Comments