uvccapture
Capture video frames from a USB webcam
SYNOPSIS
uvccapture [OPTIONS] <output_file>
PARAMETERS
-h, --help
Display help information and exit.
-o
Specify the output file name. The extension determines the format (e.g., .jpg for image, .avi for video).
-d
Select the video device to use (e.g., /dev/video0). Defaults to /dev/video0 if not specified.
-x
Set the capture width in pixels.
-y
Set the capture height in pixels.
-c
Number of frames to capture. Use 1 for a single image, 0 for continuous video capture (until interrupted).
-s
Number of frames to skip after the first frame, useful for time-lapse.
-t
Delay in seconds before starting the capture.
-q <0-100>, --quality <0-100>
Set the JPEG compression quality for still images (100 is best quality).
-v, --verbose
Enable verbose output, showing more details about the capture process.
-m, --mmap
Use the memory mapping (mmap) I/O method for capture (default).
-r, --read
Use the read() I/O method for capture.
-i
Select the video input channel (e.g., 0 for composite, 1 for S-Video).
-L, --list
List available video devices and their supported formats/resolutions.
-P, --pal
Set the video standard to PAL.
-N, --ntsc
Set the video standard to NTSC.
-a, --auto
Enable auto exposure mode.
-b
Set the image brightness.
-C
Set the image contrast.
-H
Set the image hue.
-S
Set the image saturation.
-G
Set the image gamma correction.
-W
Set the white balance value.
-B
Set the backlight compensation.
-e
Set the exposure value (manual exposure).
-F
Set the absolute focus value.
-Z, --focus_auto
Enable auto focus.
-T
Set the absolute pan position.
-U
Set the absolute tilt position.
-z
Set the absolute zoom value.
-f
Set the desired frames per second for video capture.
DESCRIPTION
uvccapture is a command-line utility designed for capturing still images and video streams from USB Video Class (UVC) compatible webcams. It provides a straightforward way to interact with UVC devices without a graphical interface, making it suitable for scripting, embedded systems, or quick captures. It leverages the Video4Linux2 (V4L2) API to control camera parameters like resolution, frame rate, brightness, contrast, and more. While simple in its core functionality, it offers sufficient control for basic image and video acquisition directly from the terminal, often saving output to JPEG for images and AVI for video.
CAVEATS
uvccapture is designed for simplicity and direct control. It lacks advanced features found in more comprehensive multimedia tools like live streaming, complex video filters, or support for a wide array of esoteric codecs. Its primary output formats are JPEG for stills and AVI for video, which might require re-encoding for modern web use or specific platforms. Dependence on well-behaved UVC drivers and V4L2 support is critical; some camera-specific controls might not be fully exposed or behave predictably.
UVC COMPATIBILITY
uvccapture specifically targets UVC (USB Video Class) compliant webcams. Most modern webcams adhere to this standard, ensuring broad compatibility with Linux systems.
SCRIPTING AND AUTOMATION
Due to its command-line nature, uvccapture is highly suitable for integration into shell scripts for automated tasks, such as time-lapse photography, security monitoring (e.g., capturing images on motion detection), or simple video recording without user intervention.
HISTORY
uvccapture emerged as a straightforward command-line tool for interacting with USB Video Class (UVC) devices on Linux, at a time when support for these webcams was maturing. It fills a niche for quick, scriptable image and video captures, predating or providing a lighter alternative to more feature-rich tools like ffmpeg for simple webcam tasks. Its development focused on providing direct access to V4L2 controls for UVC cameras.