Skip to content

Latest commit

 

History

History

Tutorial

Tutorial: Configuring OBS studio to create virtual cameras

After completing this tutorial you can use the python output window as a virtual camera.

Install OBS studio

First download OBS studio and the virtual camera plug-in

Step 1 Once you have selected your operating system, download and install OBS Studio first and then proceed with the virtual camera plug-in.

During the installation you will be asked to configure OSB studio. Select the virtual camera and proceed. Step 2

You only need one virtual camera device - press next. Step 3

Create Virtual Camera

After installing OBS Studio open a terminal, download the repository and start the Python program.

$ git clone https://github.com/M-Schrapel/Webcam-Augmentation.git
$ cd Webcam-Augmentation
$ python emoji_webcam.py

If you have any errors check if you have installed the right modules.

$ pip install opencv-contrib-python
$ pip install numpy

Your webcam should run now in a window created by python. You can stop the recording by pressing q. If you want to select a different webcam open emoji_webcam.py with a text editor and change the VIDEO_SOURCE in line 26. Now navigate to OBS studio again and press the right mouse button in the main window. To select the Python window for your virtual camera navigate to Add → Window Capture. Step 4

Simply press OK. Step 5

A new window should appear. Select the python window as shown below and press OK. Step 6

Navigate to Tools → Virtual Camera in the main window of OBS Studio. If you cannot see this option, you need to install the OBS virtual-camera-plugin. Step 7

A new window appears. Select the target camera OBS-Camera2 as shown below. Then, press Start and close this window. Step 8

At the bottom on the main window you should see now an entry of the recorded window in Sources. Press the right mouse button and select Filters. Step 9

A new window appears in which you press the + on the right bottom corner. Then select the VirtualCam. Step 10

On the right of this window, you can now set up the virtual camera. Select the target camera OBS-Camera2 and press Start. You can set the number of buffered frames to zero. Press Close and your virtual camera is ready for use. Step 11

Start your preferred video chat program and select the OBS-Camera. If your program is not able to find a camera stop the Python window by pressing q, search for camera in your video chat program again, select the OBS-Camera and restart the Python script.

$ python emoji_webcam.py

Everything should work now. By bringing the Phyton window to the front you can augment the webcam stream. Use the ArUco marker with the green and black color to make movements smooth.

HCI Group

This repository is provided by the Human-Computer Interaction Group at the University Hannover, Germany. For inquiries, please contact Maximilian Schrapel maximilian.schrapel@hci.uni-hannover.de