LinuxCommandLibrary

uvccapture

Capture video frames from a USB webcam

SYNOPSIS

uvccapture [options]

PARAMETERS

-b
    Set brightness to value (0-255)

-c
    Set contrast to value (0-255)

-s
    Set saturation to value (0-255)

-g
    Set gamma to value (0-255)

-r x
    Set the resolution to width x height (e.g., 640x480)

-d
    Specify the video device (e.g., /dev/video0)

-o
    Output filename (default: image.jpeg)

-q
    JPEG quality (0-100, default 85)

-i
    Set input channel. Default: 0

-m
    Show control menu and exit.

-v
    Verbose output. Reports details about the camera and capture process.

-x
    Capture a single frame and exit.

-t
    Record video for the specified number of seconds. Requires additional codec configuration.

-w
    Disable display window.

-f
    Fullscreen display.

-n
    Number of frames to capture when recording (useful with -t).

-j
    Save each frame as a separate JPEG file.

DESCRIPTION

uvccapture is a command-line tool for capturing video from USB webcams that adhere to the USB Video Class (UVC) standard. It allows users to grab frames or record videos directly from their webcam, providing basic control over image parameters such as resolution, brightness, contrast, and saturation. While uvccapture is straightforward to use, its functionality is somewhat limited compared to more advanced video capture applications.

It is often used in scripts or automated setups where a lightweight and easily controllable capture tool is required. It's a good option for quick tests or simple surveillance applications, but it may lack features for more sophisticated video processing or recording needs. The captured images/video can be saved in various formats, depending on the specified options. Its key strength lies in its simplicity and direct access to UVC device controls.

CAVEATS

uvccapture relies heavily on the UVC driver provided by the Linux kernel. Compatibility can vary between different webcams. Video recording functionality might require additional setup, particularly specifying the desired video codec. Also, uvccapture has limitations in supporting advanced features. Some new cameras may not be fully supported or require newer versions/patches.

VIDEO CODEC SUPPORT

While uvccapture can record video, configuring the video codec for proper encoding can be complex. It is not as straightforward as specifying a simple output format. Consult the uvccapture documentation or online resources for example codec configurations.

DEVICE PERMISSIONS

Ensure the user running uvccapture has the necessary permissions to access the video device (e.g., /dev/video0). Using `sudo` might be necessary, but it is generally better to configure device permissions correctly for regular user access.

HISTORY

uvccapture has been around for a while. It was developed as a lightweight tool for capturing images from webcams, primarily UVC-compliant devices. Its early usage was often in embedded systems or environments where resource efficiency was important. Over time, its popularity has somewhat declined with the rise of more feature-rich alternatives like FFmpeg, but it remains valuable for simple capture tasks or scripts.

SEE ALSO

ffmpeg(1), v4l2-ctl(1), mplayer(1)

Copied to clipboard