uvccapture
TLDR
Capture a single image from webcam
SYNOPSIS
uvccapture [options]
DESCRIPTION
uvccapture captures still images from USB Video Class (UVC) compatible webcams. It outputs JPEG images and is designed for scripting, time-lapse photography, and automated image capture without a graphical interface.
The tool uses Video4Linux2 (V4L2) to access the camera. Resolution must be supported by the device; use v4l2-ctl --list-formats-ext to check available options. High resolutions (>960x720) automatically activate YUYV capture mode.
For continuous capture, use -t with an interval in seconds. The -c option runs a command after each capture, useful for uploading images or triggering other actions. Image processing beyond JPEG can be done with ImageMagick or similar tools.
PARAMETERS
-o FILE
Output filename (default: snap.jpg)-d DEVICE
Video device (default: /dev/video0)-x WIDTH
Image width (must be supported by device)-y HEIGHT
Image height (must be supported by device)-q QUALITY
JPEG quality 0-100 (default: 95)-t SECONDS
Continuous capture interval (0 for single shot)-c COMMAND
Command to run after each capture-w
Wait for command to finish before next capture-s FRAMES
Frames to skip after first capture-r
Use read() instead of mmap for capture-m
Toggle to YUYV capture mode-v
Verbose output-B VALUE
Set brightness-C VALUE
Set contrast-S VALUE
Set saturation-G VALUE
Set gain
CAVEATS
User must have read/write permissions on the video device. Resolution must be natively supported by the webcam. Only JPEG output is supported; use ImageMagick for other formats. Some cameras may require warm-up frames (-s) for proper exposure. Depends on libjpeg library.
HISTORY
uvccapture was developed for capturing images from UVC webcams on Linux systems. UVC (USB Video Class) is a standard for USB video devices that provides driver-free compatibility across operating systems. The tool was designed as a lightweight alternative to full webcam applications, focusing on command-line scripting and automation use cases.


