Use your iPhone as a 1080p USB webcam on Linux — no Wi-Fi, no latency, no subscription. Works with Zoom, Meet, OBS, Teams, browsers, and any V4L2-compatible app.
iPhone (IP Camera Lite)
│ USB cable
▼
iproxy (USB tunnel)
│ HTTP/MJPEG 127.0.0.1:8081
▼
ffmpeg ──► /dev/video2 (v4l2loopback)
│
▼
Zoom / Meet / OBS / ...
"iPhone Cam"
sudo apt install ffmpeg v4l2loopback-dkms v4l2loopback-utils \
libimobiledevice-utils usbmuxd| Package | Role |
|---|---|
ffmpeg |
decodes the iPhone stream and writes it to the virtual camera |
v4l2loopback-dkms |
kernel module that creates /dev/video2 |
v4l2loopback-utils |
v4l2loopback-ctl — pins the video format for reliable reconnects |
libimobiledevice-utils |
idevicepair — pairs your iPhone over USB |
usbmuxd |
iproxy — tunnels HTTP over USB (no Wi-Fi needed) |
IP Camera Lite (free, App Store).
Recommended settings:
- Resolution: 1920×1080 (Settings → Video → Resolution)
- Username / Password:
admin/admin(default — or updateiphone-cam.sh)
git clone https://github.com/theophile-wallez/iphone-webcam-linux.git
cd iphone-webcam-linux
chmod +x install.sh
./install.sh
source ~/.zshrc # or ~/.bashrcThe installer checks dependencies, copies the script to ~/.local/bin/iphone-cam, and adds the cam helper to your shell.
# plug in iPhone, unlock it, tap Trust
idevicepair paircam # start — pick "iPhone Cam" in your app
cam status # tunnel / ffmpeg / device state
cam log # live logs (Ctrl-C to exit)
cam stop # stop everythingcam runs in the background — terminal stays free, stream survives terminal close.
Edit the top of iphone-cam.sh:
LOCAL_PORT=8081 # USB tunnel port
DEVICE_PORT=8081 # port IP Camera Lite listens on
CAM_USER="admin" # app username
CAM_PASS="admin" # app password
STREAM="video" # "video" = MJPEG (stable). "live.flv" = H.264 (lower bandwidth)
VCAM="/dev/video2"
FPS=30
RES_H=1080 # output height. 720 = lower latency, 1080 = sharperiproxytunnels TCP port 8081 from the iPhone to127.0.0.1:8081over USB — no Wi-Fi required.ffmpegreads the MJPEG stream, scales it toRES_H(preserving aspect ratio), and writes raw YUYV frames to/dev/video2.v4l2loopbackexposes that device as "iPhone Cam" — indistinguishable from a real webcam to any app.
Why the module reloads on every cam: v4l2loopback with exclusive_caps=1 flips the device to capture-only after a producer closes, causing the next ffmpeg to fail with VIDIOC_G_FMT: Invalid argument. Reloading resets this; v4l2loopback-ctl set-caps then pins the exact resolution as the first opener, making every ffmpeg restart reliable.
| Symptom | Fix |
|---|---|
idevicepair validate fails |
Unplug/replug, unlock iPhone, tap Trust, re-run idevicepair pair |
Tunnel failed |
Open IP Camera Lite on the iPhone before running cam |
iPhone Cam not in app |
Run cam status; if ffmpeg isn't running, check cam log |
| Choppy video | Lower RES_H to 720, or try STREAM="live.flv" |
v4l2loopback busy on start |
Close the app using the camera, then run cam again |
./iphone-cam.sh start # foreground — Ctrl-C to stop
./iphone-cam.sh stop
./iphone-cam.sh statusMIT — see LICENSE.