LinuxCommandLibrary

uvcdynctrl

Control USB video devices' settings

TLDR

List all available cameras

$ uvcdynctrl [[-l|--list]]
copy

Use a specific device (defaults to video0)
$ uvcdynctrl [[-d|--device]] [device_name]
copy

List available controls
$ uvcdynctrl [[-c|--clist]]
copy

Set a new control value (for negative values, use -- -value)
$ uvcdynctrl [[-s|--set]] [control_name] [value]
copy

Get the current control value
$ uvcdynctrl [[-g|--get]] [control_name]
copy

Save the state of the current controls to a file
$ uvcdynctrl [[-W|--save]] [filename]
copy

Load the state of the controls from a file
$ uvcdynctrl [[-L|--load]] [filename]
copy

SYNOPSIS

uvcdynctrl [OPTION]... [COMMAND]...

PARAMETERS

-l, --list
    Lists all available controls and their current values for the selected device.

-g , --get
    Retrieves the current value of the specified control (e.g., 'Brightness').

-s , --set
    Sets the specified control to the given value (e.g., 'Brightness' 128).

-d , --device
    Specifies the V4L2 device node to operate on (e.g., /dev/video1). Defaults to /dev/video0.

-v, --verbose
    Enables verbose output, providing more detailed information during operations.

-h, --help
    Displays a brief help message and exits.

-f, --list-formats
    Lists supported video formats (resolutions and pixel formats) for the device.

-i, --info
    Displays general information about the connected UVC device.

-L, --list-presets
    Lists available camera presets that have been saved.

-P , --set-preset
    Applies a previously saved camera preset by its ID.

-S , --save-preset
    Saves the current camera settings as a new preset with the specified ID.

-p , --load-preset
    Loads camera settings from a specified XML preset file.

-o , --output-file
    Saves the current device settings to an XML file.

DESCRIPTION

uvcdynctrl is a command-line utility designed for dynamically controlling USB Video Class (UVC) devices, commonly webcams. It provides an interface to list, get, and set various video properties such as brightness, contrast, exposure, and white balance. This tool interacts directly with the Linux Video4Linux2 (V4L2) kernel interface, allowing users to manipulate device controls that might not be easily accessible through graphical user interfaces. It's particularly useful for scripting camera adjustments, debugging video input, or fine-tuning webcam behavior for specific applications. While v4l2-ctl offers broader V4L2 control, uvcdynctrl focuses specifically on the dynamic capabilities of UVC compliant devices, making it a powerful tool for custom camera configurations.

CAVEATS

  • Requires appropriate permissions to access /dev/videoX devices; often requires sudo.
  • Not all controls are supported by every UVC device, as devices implement a subset of the UVC standard.
  • Control names might be case-sensitive or vary slightly depending on the device and kernel version.
  • For broader V4L2 device control and more active development, v4l2-ctl is often recommended as an alternative.

COMMON USAGE EXAMPLES

  • List all available controls and their current values:
    uvcdynctrl -l

  • Set the 'Brightness' control to a value of 128:
    uvcdynctrl -s "Brightness" 128

  • Get the current value of the 'Exposure, Auto' control:
    uvcdynctrl -g "Exposure, Auto"

  • Operate on a specific device (e.g., /dev/video1) to set 'Contrast':
    uvcdynctrl -d /dev/video1 -s "Contrast" 100

HISTORY

uvcdynctrl emerged as a command-line tool within the libwebcam project, specifically designed to offer detailed control over USB Video Class (UVC) compliant cameras. Its development aimed to bridge the gap in easily accessible controls for webcam settings, leveraging the Video4Linux2 (V4L2) API in the Linux kernel. It provided a direct method for users and scripts to manipulate dynamic properties of UVC devices, which were often not exposed through standard graphical applications. While v4l2-ctl has since become a more general-purpose and widely adopted tool for V4L2 devices, uvcdynctrl played a crucial role in enabling fine-grained control for UVC-specific functionalities.

SEE ALSO

v4l2-ctl(1), lsusb(8), dmesg(1)

Copied to clipboard