uvcdynctrl
Control USB video devices' settings
TLDR
List all available cameras
Use a specific device (defaults to video0)
List available controls
Set a new control value (for negative values, use -- -value)
Get the current control value
Save the state of the current controls to a file
Load the state of the controls from a file
SYNOPSIS
uvcdynctrl [OPTION]... [COMMAND]...
PARAMETERS
-l, --list
Lists all available controls and their current values for the selected device.
-g
Retrieves the current value of the specified control (e.g., 'Brightness').
-s
Sets the specified control to the given value (e.g., 'Brightness' 128).
-d
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
Applies a previously saved camera preset by its ID.
-S
Saves the current camera settings as a new preset with the specified ID.
-p
Loads camera settings from a specified XML preset file.
-o
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.