My iPhone Is Now a Wireless Film Camera

Blog post #58


I’ve wanted a better camera for recordings for a while. The iPhone has a great one — it just sits in my pocket instead of in front of my face. Today that changed: one session with Claude Code, and my iPhone is now a wireless camera for my Windows desktop. No app store, no subscription, no cloud.


What shipped

  • iphone-cam — a small Node project that streams the iPhone camera to my desktop over local WiFi using WebRTC.
  • The phone side is just a web page in Safari. Scan a QR code from the terminal, tap “Start camera”, done. No native app, no Xcode, no Mac required.
  • The receiving side is a deliberately boring black page that OBS loads as a Browser Source. OBS then exposes it as a virtual camera to Teams, HeyGen, or anything else that wants a webcam.
  • Lens switching (0.5×/1×/tele), resolution presets up to 1080p60, a wake lock so the screen doesn’t kill the stream, and a tiny status HUD showing live bitrate and FPS.

What’s working

  • The whole chain: iPhone → WebRTC → viewer page → OBS Virtual Camera. Verified with my actual phone on the first real attempt.
  • Latency is low enough that it feels like a local camera, because it is a local camera — the video goes peer-to-peer over the LAN and never touches the internet.
  • Auto-reconnect on both ends. OBS can reload the source, the phone can drop off and come back, and the stream picks itself up again.

What’s unclear or broken

  • iOS shows a scary “connection is not private” warning because the TLS certificate is self-made (mkcert). It’s harmless — the “attacker” is my own desktop — but I still click through it manually. The permanent fix is installing the local root certificate as a profile on the phone; haven’t bothered yet.
  • Safari has to stay in the foreground on the phone. Switching apps or locking the screen kills the stream until you come back.
  • 1080p60 works but the phone will thermally throttle after 15–20 minutes. 1080p30 is the stable choice for longer sessions.

Decisions made

  • No native iOS app. The camera APIs in Safari are good enough for this, and a web page means zero install on the phone.
  • No cloud, no accounts, no TURN servers. Everything stays on the LAN. The Node server only does signaling — it relays WebRTC handshake messages and never sees the video.
  • Let OBS do the heavy lifting. Writing a virtual camera driver for Windows is a signed-driver rabbit hole. OBS already solved it, so the project just feeds OBS.
  • Two ports, one server. HTTPS for the phone (camera access requires a secure context), plain HTTP on localhost for OBS (localhost is always a secure context). That one trick avoided the entire “make OBS trust my certificate” problem.

Tooling & process

  • The spec came out of a conversation with Claude in the chat app; Claude Code then built the whole thing from that spec — server, signaling, both web pages, README with an OBS guide and a troubleshooting table.
  • The signaling protocol was smoke-tested with fake WebSocket clients before I ever touched the phone. When I did, it just worked.
  • mkcert (installed via winget) handles the local TLS certificates. npm run setup finds the machine’s LAN IP and generates certs for it; npm start prints a QR code straight in the terminal.
  • Roughly what the paid wireless-webcam apps charge a subscription for, in an afternoon, and I own every line of it.

— Stefan