Skip to main content

roboflex.webcam_gst

Support for USB and built-in webcams using GStreamer. This module is a drop-in alternative to roboflex_webcamuvc, but it avoids the libuvc dependency and instead drives cameras through the GStreamer stack. The message schema and Python/C++ APIs are kept as close as possible to the original UVC implementation.

System dependencies

GStreamer and its development headers are required at build time:

# Ubuntu / Debian
sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good

# macOS (Homebrew)
brew install gstreamer gst-plugins-base gst-plugins-good

Install

The project can be built like other roboflex modules:

pip install roboflex.webcam_gst

or from source with CMake.

Python usage

import roboflex.webcam_gst as rcw

print(rcw.get_device_list_string())

sensor = rcw.WebcamSensor(
    width=640,
    height=480,
    fps=30,
    device_index=-1,  # use default camera
    format="",  # empty string lets GStreamer pick
    emit_rgb=True,
)

sensor.start()
try:
    # consume messages...
    pass
finally:
    sensor.stop()

The emitted messages (WebcamDataRGB / WebcamDataRaw) match the original module so downstream nodes can continue to operate without changes.

Device descriptors

get_device_list() returns DeviceDescriptor objects with the following fields:

  • display_name: Human-readable label reported by GStreamer.
  • gst_factory_name: The underlying factory name used by GStreamer.
  • device_class: The class of device (e.g. Video/Source).
  • device_path: OS-specific identifier when available.
  • caps_strings: A list of capability structures advertised by the device.

Notes

  • RGB output is enabled by default. Set emit_rgb=False to receive raw frames; use the format parameter to request a specific pixel format string (e.g. "NV12" or "YUY2"), subject to what the device supports.
  • The helper WebcamRawToRGBConverter currently expects RGB input; raise an exception otherwise. Most workflows should request RGB directly from the sensor.
  • Because we rely on GStreamer, the available devices and pixel formats depend on the plugins installed on your system.

Metadata

Release files for roboflex.webcam-gst 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for roboflex.webcam-gst 0.1.4
File Size Uploaded
roboflex_webcam_gst-0.1.4.tar.gz 13.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for roboflex.webcam-gst 0.1.4
File Interpreter ABI Platform
roboflex_webcam_gst-0.1.4-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details

Total release size: 315.0 kB

Release files / roboflex_webcam_gst-0.1.4.tar.gz

Download URL roboflex_webcam_gst-0.1.4.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f6cc89fa711532c673a8447419023581b166876f6729e41098a25d7ee4d66f11
BLAKE2b-256 checksum
How to use checksums
9b2c98b62465a9a41c732f857f3c843caad90b789d9805f7f02a2d90e10a1ce7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / roboflex_webcam_gst-0.1.4-cp311-cp311-macosx_15_0_arm64.whl

Download URL roboflex_webcam_gst-0.1.4-cp311-cp311-macosx_15_0_arm64.whl
Size 301.1 kB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
3c626b99aafdb07397e54f6e5b122c2e7928253b4d1946a6ec68810f40f0acb2
BLAKE2b-256 checksum
How to use checksums
dc9c5377fd81464f9127eefda8cce5b8e76abf1493311ac887b57d9c97db3e0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page