Convert your Android device into a virtual webcam on macOS using IP Webcam app and OBS Studio.
brew install --cask obsImportant: This is required for the virtual camera to work in other apps.
- Open OBS Studio
- Go to Tools → Start Virtual Camera
- If prompted with "The virtual camera is not installed", click OK
- macOS will open System Settings automatically
- Navigate to: General → Login Items & Extensions → Camera Extensions
- Find "OBS Virtual Camera" and enable it (toggle on)
- Restart OBS Studio
- Open OBS Studio
- Go to Tools → WebSocket Server Settings
- Check Enable WebSocket server
- Note the port (default: 4455) and password (if set)
- Click Apply and OK
pip3 install -r requirements.txtCopy the example environment file and fill in your values:
cp .env.example .envEdit .env and set:
ANDROID_IP: Your Android device IP (you'll get this from the IP Webcam app)OBS_PASSWORD: Your OBS WebSocket password
For easier access, install the launcher script globally:
chmod +x webcam
mkdir -p ~/.local/bin
ln -sf "$(pwd)/webcam" ~/.local/bin/webcamAdd ~/.local/bin to your PATH if not already present:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcNow you can run webcam from anywhere!
- Install "IP Webcam" app from Google Play Store
- Open the app and scroll down to "Start server"
- Note the IP address shown (e.g.,
192.168.1.100:8080)
Important: Make sure OBS Studio is running before starting the script!
webcamOnce you've configured your .env file, simply run:
python3 ip_webcam_virtual.pypython3 ip_webcam_virtual.py <IP_ADDRESS># Using .env file (simplest!)
webcam
# With command-line argument
webcam 192.168.1.100:8080
# Override .env with custom resolution
webcam --width 1280 --height 720
# Full manual configuration
webcam 192.168.1.100:8080 --obs-password your_password --width 1920 --height 1080--width: Output video width (default: 1920)--height: Output video height (default: 1080)--obs-host: OBS WebSocket host (default: localhost)--obs-port: OBS WebSocket port (default: 4455)--obs-password: OBS WebSocket password (if set)
Once the script is running, the virtual camera will be available in:
- Zoom (select "OBS Virtual Camera")
- Google Meet
- Microsoft Teams
- Discord
- Any app that uses webcams
Press Ctrl+C to stop the virtual camera.
-
Check if the camera extension is enabled:
system_profiler SPCameraDataType
You should see "OBS Virtual Camera" in the list.
-
If not listed:
- Go to System Settings → General → Login Items & Extensions → Camera Extensions
- Make sure OBS Virtual Camera is enabled (toggled on)
- Restart OBS and your browser
-
Restart everything:
- Quit and restart OBS
- Close all browser windows
- Run the script again:
python3 ip_webcam_virtual.py - Open Google Meet in a fresh browser window
Run the test script:
python3 test_obs_connection.pyThis will help diagnose connection issues and test your password.
- Make sure your Android device and Mac are on the same WiFi network
- Check that the IP Webcam app shows "Server is running"
- Try accessing the stream in your browser:
http://<ANDROID_IP>/video