examples/device/video_capture/README.md
A USB Video Class (UVC) camera that streams generated color-bar frames.
CFG_EXAMPLE_VIDEO_READONLY streams fixed MJPEG images from flash (or YUY2 with CFG_EXAMPLE_VIDEO_DISABLE_MJPEG), and CFG_EXAMPLE_VIDEO_BUFFERLESS fills the payload on the fly.CFG_TUD_VIDEO_STREAMING_BULK is set).| Interface | Class driver |
|---|---|
| 0–1 | UVC video (control + streaming) |
Notable tusb_config.h settings:
#define CFG_TUD_VIDEO 1
#define CFG_TUD_VIDEO_STREAMING 1
#define CFG_TUD_VIDEO_STREAMING_EP_BUFSIZE 256
#define CFG_TUD_VIDEO_STREAMING_BULK 0 // 0 = isochronous, 1 = bulk streaming
CMake:
mkdir build && cd build
cmake -DBOARD=raspberry_pi_pico ..
cmake --build .
Make:
make BOARD=raspberry_pi_pico all
The device appears as a webcam. On Linux, find it with v4l2-ctl --list-devices and view it with ffplay /dev/videoN or any camera app. You should see scrolling color bars.