Raspberry Pi

How to Use Mobile Camera on Raspberry Pi

Raspberry Pi is an excellent device that can be handy if you utilize it for security and surveillance purposes. Although Raspberry Pi doesn’t have a built-in camera for capturing or monitoring activities, you can purchase camera modules to install it with your Raspberry Pi device. However, purchasing a camera module may not be suitable for someone because of the price; in that case, those who don’t want to purchase the module may look for another solution.

The good news is that with the DroidCam application, you can use your mobile camera on a Raspberry Pi device and start it for several purposes, such as taking images or video recording of your projects and transferring them to your device. You can use it for surveillance and spy purposes. This tutorial will guide you on how to set up DroidCam on your mobile and start using the camera on the Raspberry Pi browser.

How to Use Mobile Camera on Raspberry Pi

Setting up the mobile camera on Raspberry Pi is pretty easy using the DroidCam application that allows you to access your mobile camera on your device browser through your mobile IP address. To start performing this process, use the below-mentioned steps:

Step 1: Install DroidCam on Your Mobile

First you should need to install DroidCam application on your mobile from the Google Play Store.

Step 2: Open DroidCam on Your Mobile

After the installation, you can open the application on your mobile to see the IP cam access information. This information will be used to access your mobile camera from the Raspberry Pi device.

Step 3: Access Mobile Camera on Raspberry Pi

To access the mobile camera on Raspberry Pi, open the browser on your Raspberry Pi and enter the IP address that appears on DroidCam application below the IP Cam Access section.

In our case, the IP address of our mobile phone is “192.168.18.12” and once you enter the address, you will be able to use your mobile camera on your Raspberry Pi device and you can monitor activities right from your device.

If you want to capture an image from your mobile phone, you can click on the “Save Photo Here” option to save the image on your Raspberry Pi device.

To start video recording, you can enter the address “Mobile_IP:4747/video”.

However, if you want to save the video recording, you should need to install a screen recorder that can save the recording of your mobile on your Raspberry Pi device. The recommended application for screen recording on Raspberry Pi is Kazam, which you can install using the following command:

$ sudo apt install kazam -y

Conclusion

DroidCam is a perfect mobile application that allows you to use your mobile camera on your Raspberry Pi device and start capturing images directly from the Raspberry Pi browser. You can set it up on Raspberry Pi by first installing the application on your mobile phone to get the IP address of your mobile and then using the same IP address with port 4747 to start using mobile camera from the web. However, to save your mobile video recording, you should need to install the screen recorder Kazam on your Raspberry Pi device.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.