A simple batch script to make IP Webcam (Android) use USB instead of Wi-Fi connection.
Download a .EXE in releases.
- Can be used with OBS and OBS Virtual Cam to use your Android camera as a webcam with higher definition than other currently free apps.
- Can reduce problems when the Wi-Fi signal of the phone is too weak.
- Allows you to use IP Webcam even if it's not connected to any Wi-Fi access point.
- Enable USB Debugging in your Android phone.
- Connect your phone thru USB.
- On your Windows PC, make sure that you have installed (download and extract) Android SDK Platform Tools and add it into your
PATH
environment variable. To test if it works, either:- Open a
cmd
window. Typewhere adb
. It should show a path where you extracted the platform-tools. - Open a
cmd
window, and typeadb devices
. It should list your device if you enabled USB debugging already.
- Open a
- Run the script (forward_ipwebcam_usb.bat) or the .EXE file in releases.
- IMPORTANT: Microsoft Defender SmartScreen will block the application due to it's potential to be used in malicious activities. I hold no liability to any damages resulting in this application (see LICENSE). However, all the code is published here publicly available for review.
- Open IP Webcam, and set settings shown in the window shown. Then, start server.
- Press any key in the script to continue.
- To test if it works (thru USB), you should be able to access the
IP Webcam Settings URL
shown in a browser. Use the username and password that you set in IP Webcam. - To use this as a virtual webcam in OBS:
- Add a
Media Source
in your scene. - Uncheck the
Local File
. - Copy and paste the
Video URL (OBS Media Source)
shown in the script to theInput
. Replace the<YOUR_USERNAME>
and<YOUR_PASS>
with the same credentials you entered in the IP Webcam. - Drag the
Network Buffering
andReconnect Delay
all the way to the left (minimum value). - Click
OK
, thenStart Virtual Camera
. - On your video conference software (i.e. Google Meet, Zoom, etc), select the
OBS Virtual Camera
as your camera. As long as your OBS is running, it should work.
- Add a
By default, this forwards your phone's port 8080
(IP Webcam's default) to your local machine's port 7000
(script's default).
You can provide a custom port by opening a cmd
in the folder where the script is located, then use the following syntax:
forward_ipwebcam_usb [ipwebcam_port] [local_port]
For example, the following will forward IP Webcam's port 5000
to a port in your machine 6000
.
forward_ipwebcam_usb 5000 6000
Download .bat (Right Click -> Save link as...)
You can check the Task Manager
> Network Tab
to see that OBS is not fetching the video feed from the network. This means that you can also use this even if the phone is not connected to any Wi-Fi.