How to use the Raspberry Pi as a webcam

You may not have a webcam at home but need to make a video call now? Want to take advantage of your Raspberry Pi camera, but don't know how to use it as a webcam?

Turning a Raspberry Pi into a webcam is easy and today's article will show you how to do that.

How to use the Raspberry Pi camera module as a webcam

In fact, the Raspberry Pi camera module cannot be plugged into the computer. The solution proposed by the article is to stream the network camera image (IP camera), capture it on a computer, and send it to your favorite video call application (eg Skype).

In this article, TipsMake.com will explain step by step how to do this.

With just the right software on your computer and on the Raspberry Pi, you can do this quickly.

Prepare the Raspberry Pi

Get started now with the preparation of the Raspberry Pi.

Install Raspbian

This tutorial is for the Raspbian distribution, so if you haven't already, install it now. Refer to the article: How to install an operating system for the Raspberry Pi for detailed instructions.

Raspbian version is not important. The author has made this tutorial on Raspbian Lite, so all versions will be fine.

Before going any further, you need to:

  1. Install Raspbian by following the instructions if needed.
  2. Update Raspbian packages to the latest version.
sudo apt update && sudo apt upgrade && sudo reboot
  1. Connect the Raspberry Pi to the network (Ethernet or WiFi).
  2. Activate SSH.
sudo raspi-config
  1. Then go to Interfacing options, SSH and answer Yes.

You can now use SSH to proceed to the next section of this tutorial. Are you ready to start.

Plug in the camera

You probably know how to do this if you have a camera, but don't forget to plug it properly into your Raspberry Pi.

Remove the slot protection and plug the cable as shown in this picture:

Activate the camera

By default, the camera interface of the Raspberry Pi is not enabled

To enable it, you need to use raspi-config:

sudo raspi-config

Then go to Interfacing options , select Camera item . Answer Yes and exit raspi-config.

The tool will ask you to reboot, accept and do this.

After reboot, the camera will be activated and now you can install the software.

Motion settings

Motion is a powerful software to do everything with the camera. We will use it to stream cameras on the network (IP cameras), but Motion can do more.

To use Motion, follow this procedure:

  1. Install Motion and necessary dependencies.
sudo apt install motion libavcodec-dev libavformat-dev libavutil-dev libjpeg-dev libjpeg62-turbo-dev libpq-dev libswresample-dev
  1. Answer Yes to install them.
  2. Activate the camera driver:
sudo modprobe bcm2835-v4l2
  1. Use this command to check if the camera is visible and show its settings
v4l2-ctl -V

You will get results similar to the following:

Format Video Capture: Width/Height : 1024/768 Pixel Format : 'JPEG' Field : None Bytes per Line : 0 Size Image : 786432 Colorspace : JPEG Transfer Function : Default YCbCr/HSV Encoding: Default Quantization : Default Flags

Then you need to configure Motion. The best way is to directly download the configuration you need.

wget https://www.dropbox.com/s/6ruqgv1h65zufr6/motion-mmal-lowflyerUK-20151114.tar.gz
  1. Extract file:
tar -zxvf motion-mmal-lowflyerUK-20151114.tar.gz
  1. Start Motion:
sudo motion -c motion-mmalcam-both.conf

Please adjust the settings in this file to match the camera configuration (for example, image height and width).

To complete the Motion settings, you just need to check the video stream before moving on to the computer configuration

Check out the video stream

Livestream is available in HTTP, using the Raspberry Pi IP address and port 8081.

Open the web browser and access:

http://:8081

Check if you can see exactly livestream with enough quality.

Now you will see the livestream and can adjust the Motion configuration.

The goal of this tutorial is not to explain how to configure Motion, but you can find all the resources you need on the GitHub page:

https://motion-project.github.io/motion_config.html

Install computer software

Now the livestream is working and you need to use another software on your computer to forward the camera image during the video call.

Introducing SplitCam

SplitCam is the article software that will be used to turn IP cameras into webcams for computers. SplitCam allows you to create a virtual camera on your computer and send an IP camera stream to it.

This article will use this software to have a camera on Skype (or other video calling software), even if there is no real camera on the computer.

Download and install

SplitCam is a free software for Windows, you can download here. 

Setting

To install SplitCam on a computer, follow this procedure:

  1. Double click on the file you have just downloaded.
  2. Keep the default values ​​( Next, Agree, Install ).
  3. When the installation is finished, click Next and choose where you want the shortcut to be, then leave the default options as they are.
  4. Choose whatever you want. In the case of the example, the author holds the Start menu shortcut.
  5. Then click Finish to start SplitCam. You may be required to reboot to install the camera. This is required.

Configuration

  1. After rebooting, start SplitCam.
  2. Click Sources in the bottom menu.
  3. In the drop-down list, make sure you select IP Split Camera . You will get results similar to the following:
How to use the Raspberry Pi as a webcam Picture 1 Make sure to select IP Split Camera
  1. Then in the URL field, enter the livestream URL. For example:
http://192.168.1.17:8081
  1. Click Add.
  2. After a few seconds, this line will appear in the IP Camera List and the image is in the main window.

You are almost ready. Just configure the video call software again.

Skype configuration

This article will show you how to use the Raspberry Pi as a webcam in Skype, because this is probably the most used tool for this. However, you can apply the same steps with any software.

  1. Start Skype
  2. Click . on the left and select Settings.
  3. In the Settings window , go to Audio & Video .
  4. In the Camera section , make sure that SplitCam Video driver is the main camera.
How to use the Raspberry Pi as a webcam Picture 2 Ensure that SplitCam Video driver is the main camera
  1. You can check the camera image below. You are now ready to use your Raspberry Pi camera as a webcam.

Related questions

How to automatically start Motion on startup?

You will use a specific configuration file and the command to start temporary motion, but you can move the file into the default directory to configure it as a daemon.

Here is how to do this:

sudo mv motion /usr/bin/motion sudo mv motion-mmalcam-both.conf /etc/motion.conf

After that, edit the daemon configuration file:

sudo nano /etc/default/motion

And change the start_motion_daemon option to Yes.

On the next reboot, Motion will start directly

Now you know how to use your Raspberry Pi camera as a webcam in any computer software.

Hope this tutorial is helpful for you!

4.1 ★ | 34 Vote

May be interested

  • How to secure webcam on Windows to avoid exposureHow to secure webcam on Windows to avoid exposure
    adjusting webcam privacy and webcam security is something you need to do. below are some webcam security settings on windows 11.
  • How to boot Raspberry Pi 4 from USB or over the networkHow to boot Raspberry Pi 4 from USB or over the network
    the raspberry pi is a wonderful, flexible piece of software, capable of a wide range of possibilities, from running a media center to using it as a radio.
  • Unexpected uses of laptop webcamsUnexpected uses of laptop webcams
    webcam is an indispensable part of laptops and desktops with a series of online video chat software such as skype, google hangouts, facebook ... however, webcams are not only tools for chatting. your video, it can also do many other interesting things that make you surprised.
  • What is the Raspberry Pi and how is the Raspberry Pi used?What is the Raspberry Pi and how is the Raspberry Pi used?
    you can use the raspberry pi as a computer because everything needed has been built in. its broadcom bcm2835 soc processor includes cpu, gpu, ram, microsd card slot, wi-fi, bluetooth and 4 usb 2.0 ports.
  • This is why you should turn off or use the Webcam tape immediatelyThis is why you should turn off or use the Webcam tape immediately
    webcam is one of the extremely useful features integrated on laptops, tablets, .... so that users can easily exchange information and chat together through video calls. today hackers can easily use the tools available, including webcams to gain unauthorized access to your computer and use email trojans or social networking accounts for different purposes.
  • How to start Raspberry Pi 3 from USBHow to start Raspberry Pi 3 from USB
    raspberry pi is a great, versatile software suite, with a variety of capabilities like running a media center or using as a radio.
  • How to change the default webcam on a Windows 10 computerHow to change the default webcam on a Windows 10 computer
    in the complicated situation of covid-19 spread, the need for distance learning and meeting is still very high. therefore, the demand for using webcam on computers is also increasing. applications like teams, skype, zoom ... all need a webcam.
  • Why should people try Raspberry Pi 4?Why should people try Raspberry Pi 4?
    the new raspberry pi 4 has been released, but do you need to upgrade? is raspberry pi 4 really offering more features than the previous raspberry pi 3 b +?
  • The security of the webcam is extremely simpleThe security of the webcam is extremely simple
    many webcams have an indicator light that shows when the camera is recording a video. however, hackers can trick users into installing spyware, disabling this activity indicator by hacking software or modifying configuration settings.
  • Raspberry Pi AI Kit: Bring AI to Raspberry PiRaspberry Pi AI Kit: Bring AI to Raspberry Pi
    the raspberry pi ai kit is essentially raspberry pi's new m.2 hat+ board integrated with the hailo-8l acceleration module.