An embedded Linux image that turns your Raspberry Pi Zero 2 W and camera module into a plug-and-play USB webcam.
| Part | Description |
|---|---|
| Raspberry Pi Zero 2 W | Main compute module |
| Supported camera sensor | CSI-2 camera module |
| microSD card (≥100 MB) | System storage |
| micro-USB cable | USB-OTG data & power |
| Case (optional) | Protection & mounting |
- OV5647*
- IMX219*
- IMX708
- IMX477
- IMX500*
- IMX296*
- IMX290*
- IMX519*
*: Untested – only the IMX708 and IMX477 have been verified to work. Other sensors are included in the kernel and supported by libcamera, but your mileage may vary.
- Fast boot: Less than 6 seconds to go from plugged in to functional.
- Running status: GPIO 23 goes
HIGHwhenever uvc-gadget is active. - Streaming status: GPIO 24 goes
HIGHwhenever video is being streamed to host. - Pause/resume: GPIO 26 freezes video on
HIGHwhile keeping the stream alive.
- Download the latest image from the Releases page.
- Insert your microSD card into your host computer.
- Flash the image:
- Linux/macOS:
# Replace /dev/sdX with your card device sudo dd if=webcampi-<version>.img of=/dev/sdX
- Windows:
Use a tool like Balena Etcher or Raspberry Pi Imager
Alternatively, if you already have a Linux image on a Pi that supports OTG you can skip Webcam Pi and just follow the generic UVC-gadget setup guide: uvc-gadget#installation
- Insert the flashed microSD card into the Pi.
- Connect the camera to the Pi’s camera port and secure the ribbon cable.
- Plug a Micro-USB cable into the “USB” OTG port of the Pi and the other end into your host USB port.
- On your host machine, a new video device should appear.
Once the gadget is running, any standard UVC-compatible tool can access it:
Any webcam-enabled app: Zoom, OBS, Discord, etc. just pick the Webcam Pi as your camera.
...or...
# List video devices
v4l2‐ctl --list-devices
# Stream with VLC
vlc v4l2:///dev/video0
# Record with ffmpeg
ffmpeg -f v4l2 -i /dev/video0 -t 00:00:10 output.mkv- Linux host (WSL is fine)
- Git and buildroot dependencies
git clone --recursive https://github.com/elcalzado/webcampi.git
cd webcampi# This will configure Buildroot and compile the kernel, rootfs, and image
./build.shWhen complete, the final SD card image will be in:
buildroot/output/images/sdcard.img
Flash it as described in Installation.
- uvc-gadget: Fork of the main uvc-gadget with added GPIO functionality.
- showmewebcam: Inspiration for this project and learning resource.
- Buildroot