junkpile

19 · Tauri v1 Webcam Compositor

A standalone Tauri v1 + raw WebGL 1 example for combining a live webcam with keyed background replacement, graphics overlays, recording, and native file export.

What this example teaches

Signal chain

Camera texture
  ↓
Foreground framing + color grade
  ↓
Chroma/luminance key matte
  ↓
Background (procedural, image, or video)
  ↓
Transparent overlay
  ↓
WebGL preview → MediaRecorder / PNG export

Features

Camera

Background

Key matte

Foreground

Overlay

Output

Run

npm install
npm run dev

Press Start camera and approve the operating-system permission prompt. For chroma keying, use a green or blue background, select the corresponding preset, then inspect Matte while tuning threshold and softness.

macOS permission files

src-tauri/Info.plist provides NSCameraUsageDescription and src-tauri/entitlements.plist enables the camera entitlement. The bundle configuration points to the entitlement file.

Notes