Turn Your Phone Camera Into a Webcam in 3 Easy Steps
Tags: beginners, computerscience, android, tutorial
Published: 2021-02-19 12:05:55

If you **don't own a webcam** or are very unsatisfied with the **boring resolution quality** or you want to use your phone camera for **computer vision applications**, you're in the right place.   

Welcome to the [Tech-Hacks For Everybody Series](https://hashnode.com/series/tech-hacks-for-everybody-ckk3juqc10ihoqps16q0geabj), this is [Sai Ashish](https://www.linkedin.com/in/sai-ashish/) and today I'm going to show you how to turn your phone camera into a webcam in 3 easy steps. So, let's dive in 🚀

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5kkczbmcal3ocbhnbfzy.jpg)

**Note:** Your phone camera and computer must be connected to the **same network** for this to work. You can connect both your devices to the same WiFi or connect the devices using a portable hotspot.

## Step 1: Install  [IP Webcam](https://play.google.com/store/apps/details?id=com.pas.webcam) From Google Play Store 🕹

![IP Webcam Application Google Play Store](https://cdn.hashnode.com/res/hashnode/image/upload/v1610971933086/A-1HDmYjD.jpeg)

For our usage, I would suggest you install **IP Webcam**. IP Webcam is a free application that turns your phone into a network camera with multiple viewing options. You can view your device's camera on any platform with VLC player or web browser and also stream video inside a WiFi network without internet access. There is an optional Ivideon cloud broadcasting for instant global access to your camera. 

**The Features of IP Webcam are:**

- Video upload to Dropbox, SFTP, FTP and Email using Filoader plugin
- Several web renderers to choose from: Flash, Javascript or built-in
- Video recording in WebM, MOV, MKV or MPEG4 (on Android 4.1+)
- Audio streaming in wav, opus and AAC (AAC requires Android 4.1+)
- Motion detection with sound trigger, Tasker integration. 
- Date, time and battery level video overlay.
- Sensor data acquisition with online web graphing.
- Videochat support (video stream only for Windows and Linux via an universal MJPEG video streaming driver)
- Cloud push notifications on motion and sound, cloud recording for motion-triggered records, online video broadcasting powered by Ivideon.
- Extensive baby and pet monitor features such as night vision, motion detection, and sound detection.

## Step 2: Note the IP Address of Your Streaming Camera 📸

Open the IPWebcam application, scroll down and click on the start server option. 

![IPWebcam User Interface](https://cdn.hashnode.com/res/hashnode/image/upload/v1610972131325/t4wPqxpPR.jpeg)

Note down the IPv4 address of your camera from the screen or the notification bar.
 
## Step 3: Connect Your Desktop to the IP Address 💻
 
### 1. For General Use:

Open your browser, type in the IPv4 address, and hit enter. Next click on the Browser option from the Video Renderer row. Voila! You can view your phone camera on your computer now.

![Phone Camera Display into Webcam in action](https://cdn.hashnode.com/res/hashnode/image/upload/v1610973043472/4ghsKEtIY.jpeg)
 
### 2. For Computer Vision applications:

You can use your phone camera as input for face detection, object tracking, emotion recognition, and all computer vision or deep learning activities. As Python is the best programming language to code for Artificial Intelligence, I would be using the same.  

### The Source Code for the Same Could Be Found Below:

![Source Code For Turning Phone to Webcam for Computer Vision Application](https://cdn.hashnode.com/res/hashnode/image/upload/v1613207510198/SXOmn8tlG.png)

You can download the source code from my [Github Repository](https://github.com/SaiAshish-Konchada/Artificial-Intelligence/blob/main/Computer%20Vision/Turn%20Phone%20Camera%20into%20Webcam.py).

Simply replace the IPv4 address at the specified line of code, run it, and watch the streaming begin!

You can change the mode, resolution, camera options(front and back), flash, focus, scene, white balance, and a lot more from the video preferences option in the application. You can set up motion and sound detection, night vision effects, and change the interfacing options according to your required use case. As this post was centered on only the live streaming capability, I would prefer you to explore and experiment with the rest of the features on your own. 

That's it folks 💯 You can now turn your phone camera into a webcam anywhere, anytime in just 3 simple steps 📸

If you think this article provided value to you, consider giving this blog the maximum love you can and I promise to bring you valuable tech-hacks, step-by-step project builds and a ton of value bombs 💣 Until next time, take care 🙋🏻‍♂️ 

### Bonus Insights by  [The Insightful Coder](https://theinsightfulcoder.com/) :

-  Interested in Building Creative Beginner-Level Python Projects🐍?: Check out the  [Python Projects for Beginners Series](https://hashnode.com/series/python-projects-for-beginners-ckk31d9370h0vrus1blfl0a4y)😍

-  Interested in Building Your Own Artificial Intelligence Projects using Python?: Check out the [Python AI Series](https://hashnode.com/series/python-ai-series-ckkft33ux016dwjs11xlqbz4v)🧠

- Wanna Interact With Me 🙋🏻‍♂️? Connect With Me on Your Favourite Platform [Here](https://theinsightfulcoder.com/contact-me)  🤝🏻

- Find and Download All My Project Source Codes at My [Github Repository](https://github.com/SaiAshish-Konchada) 🎁