Generated by GPT-5-mini| libuvc | |
|---|---|
| Name | libuvc |
| Developer | Linux Foundation, independent contributors |
| Released | 2012 |
| Operating system | POSIX, Windows |
| License | BSD |
libuvc
libuvc is a portable user-space library for accessing USB Video Class (UVC) devices. It provides a C API for enumerating, configuring, streaming, and controlling webcams and other video capture devices compliant with the USB Video Class specification. libuvc is used in multimedia frameworks, robotics, scientific imaging, and embedded systems where direct USB video device access is required.
libuvc exposes functions to open devices, query streaming formats, negotiate frame descriptors, submit bulk or isochronous transfers, and control camera parameters. The project sits in the ecosystem alongside V4L2, DirectShow, FFmpeg, GStreamer, and OpenCV as a low-level interface bridging USB hardware like Logitech webcams, Intel RealSense modules, and Sony UVC-compatible sensors. It interoperates with toolchains and build systems such as CMake, Autotools, and Meson and is relevant to projects integrating with ROS, Node.js, Python wrappers, and Android native layers.
Development began in the early 2010s to address cross-platform UVC access without relying on platform-specific APIs like Video4Linux or Media Foundation. Influences include the USB Implementers Forum's USB Video Class specification and open-source efforts from organizations such as Intel Corporation and communities around Linux Kernel development. Contributors have included independent developers, researchers from institutions like MIT, engineers from companies such as Google, and maintainers active in GitHub and SourceForge-era projects. Releases have tracked improvements in USB standards, interoperability testing in conferences like FOSDEM and Linux Plumbers Conference, and integration reports from embedded venues including Embedded Linux Conference.
libuvc's architecture centers on a device discovery layer, a handle-based device context, and a streaming subsystem. It relies on libusb for USB transport management and interacts with host stacks such as libusb-1.0 and platform USB subsystems. The API provides types and functions for device enumeration, format negotiation (frame size, frame rate, pixel format), control transfers for UVC extension units, and callback-driven frame delivery. Typical objects map to USB descriptors referenced in the USB Implementers Forum documentation. The design permits integration with event loops used by GLib, Boost.Asio, and libuv while enabling direct use in multimedia pipelines that include PulseAudio, JACK Audio Connection Kit, and ALSA for synchronized audio/video projects.
libuvc runs on POSIX-compatible systems like Linux, macOS, and BSDs, as well as on Microsoft Windows via libusb backends. It supports a wide range of devices adhering to the UVC standard, including consumer webcams from Logitech, industrial cameras from Basler, depth cameras from Intel RealSense models, and capture devices from Hauppauge. It can be used with single-board computers like Raspberry Pi and BeagleBone for robotics and vision projects. Platform integration examples include using libuvc with Android NDK builds, deployment on Yocto Project-based images, and cross-compilation for ARM and MIPS embedded targets.
Typical usage patterns include device enumeration, opening a device by vendor/product IDs, negotiating a streaming profile, and starting a callback to receive frames. Example integrations show libuvc feeding frames into OpenCV for computer vision, providing input to FFmpeg for encoding, or supplying texture data to OpenGL and Vulkan renderers in graphics applications. Bindings and wrappers exist for languages and frameworks such as Python, Node.js, Rust, and C# enabling usage in projects involving TensorFlow inference, ROS perception stacks, or Qt GUI applications. Developers often combine libuvc with camera calibration tools used in OpenCV tutorials and research from institutions like Stanford University and Carnegie Mellon University.
libuvc performance depends on USB host controller capabilities (e.g., USB 2.0, USB 3.0), kernel driver behavior, and underlying libusb implementations. High-resolution or high-frame-rate streams can be constrained by isochronous transfer scheduling on controllers such as EHCI and XHCI and by platform USB stack implementations maintained by teams from Intel, Microsoft, and Apple Inc.. Limitations include variable support for vendor-specific extension units, differences in UVC compliance across manufacturers like Sony and Samsung, and issues when competing kernel drivers (e.g., uvcvideo) claim devices. Workarounds often involve blacklisting kernel modules on Linux or using exclusive access strategies on Windows and macOS.
libuvc is distributed under a permissive BSD-style license, encouraging reuse in proprietary and open-source projects. The project is maintained in public code hosting platforms, where contributors from companies such as Google, Intel Corporation, and independent developers collaborate via issue trackers and pull requests in environments like GitHub and GitLab. Community activity appears in mailing lists and forums associated with events like FOSDEM and repositories used by projects including OpenCV-based systems, ROS packages, and embedded distributions from Yocto Project maintainers. Commercial products and research labs integrate libuvc into pipelines alongside other open-source components governed by licenses like MIT and LGPL.
Category:Software