roboflex.webcam-gst


Nameroboflex.webcam-gst JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/flexrobotics/roboflex_webcam_gst
SummaryRoboflex module that streams webcams via GStreamer
upload_time2025-10-22 02:45:27
maintainerNone
docs_urlNone
authorColin Prepscius
requires_python>=3.6
licenseMIT
keywords webcam gstreamer robotics middleware flexbuffers python c++ c++20
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
# 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:

```bash
pip install roboflex.webcam_gst
```

or from source with CMake.

## Python usage

```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/flexrobotics/roboflex_webcam_gst",
    "name": "roboflex.webcam-gst",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "webcam, gstreamer, robotics, middleware, flexbuffers, python, c++, c++20",
    "author": "Colin Prepscius",
    "author_email": "colinprepscius@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/54/ff/1d86a94416cea70a55a5c4358a4aa6a2f72a04e432786fb24445feb51d75/roboflex_webcam_gst-0.1.1.tar.gz",
    "platform": null,
    "description": "# roboflex.webcam_gst\n\nSupport 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.\n\n## System dependencies\n\nGStreamer and its development headers are required at build time:\n\n```bash\n# Ubuntu / Debian\nsudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good\n\n# macOS (Homebrew)\nbrew install gstreamer gst-plugins-base gst-plugins-good\n```\n\n## Install\n\nThe project can be built like other roboflex modules:\n\n```bash\npip install roboflex.webcam_gst\n```\n\nor from source with CMake.\n\n## Python usage\n\n```python\nimport roboflex.webcam_gst as rcw\n\nprint(rcw.get_device_list_string())\n\nsensor = rcw.WebcamSensor(\n    width=640,\n    height=480,\n    fps=30,\n    device_index=-1,  # use default camera\n    format=\"\",  # empty string lets GStreamer pick\n    emit_rgb=True,\n)\n\nsensor.start()\ntry:\n    # consume messages...\n    pass\nfinally:\n    sensor.stop()\n```\n\nThe emitted messages (`WebcamDataRGB` / `WebcamDataRaw`) match the original module so downstream nodes can continue to operate without changes.\n\n## Device descriptors\n\n`get_device_list()` returns `DeviceDescriptor` objects with the following fields:\n\n- `display_name`: Human-readable label reported by GStreamer.\n- `gst_factory_name`: The underlying factory name used by GStreamer.\n- `device_class`: The class of device (e.g. `Video/Source`).\n- `device_path`: OS-specific identifier when available.\n- `caps_strings`: A list of capability structures advertised by the device.\n\n## Notes\n\n- 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.\n- The helper `WebcamRawToRGBConverter` currently expects RGB input; raise an exception otherwise. Most workflows should request RGB directly from the sensor.\n- Because we rely on GStreamer, the available devices and pixel formats depend on the plugins installed on your system.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Roboflex module that streams webcams via GStreamer",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/flexrobotics/roboflex_webcam_gst"
    },
    "split_keywords": [
        "webcam",
        " gstreamer",
        " robotics",
        " middleware",
        " flexbuffers",
        " python",
        " c++",
        " c++20"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cae0462ae2af5fc4fd852cb104d1158e57fda244ff99cea74909d4536ccc79de",
                "md5": "8a232880520e9c0228f4ceaf24ade23d",
                "sha256": "441001340baf3f7e9d74352e39a1311a5412c8dddc96968670db5bfc9cac56d1"
            },
            "downloads": -1,
            "filename": "roboflex_webcam_gst-0.1.1-cp311-cp311-macosx_15_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "8a232880520e9c0228f4ceaf24ade23d",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.6",
            "size": 299612,
            "upload_time": "2025-10-22T02:45:26",
            "upload_time_iso_8601": "2025-10-22T02:45:26.743440Z",
            "url": "https://files.pythonhosted.org/packages/ca/e0/462ae2af5fc4fd852cb104d1158e57fda244ff99cea74909d4536ccc79de/roboflex_webcam_gst-0.1.1-cp311-cp311-macosx_15_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "54ff1d86a94416cea70a55a5c4358a4aa6a2f72a04e432786fb24445feb51d75",
                "md5": "8954ad5e6cbabd59120f419b91a90aac",
                "sha256": "6ce95ea720bcd7a8c46138238aabf69e5baac560be6d216e2672d15c27c44401"
            },
            "downloads": -1,
            "filename": "roboflex_webcam_gst-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8954ad5e6cbabd59120f419b91a90aac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 13873,
            "upload_time": "2025-10-22T02:45:27",
            "upload_time_iso_8601": "2025-10-22T02:45:27.863269Z",
            "url": "https://files.pythonhosted.org/packages/54/ff/1d86a94416cea70a55a5c4358a4aa6a2f72a04e432786fb24445feb51d75/roboflex_webcam_gst-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-22 02:45:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "flexrobotics",
    "github_project": "roboflex_webcam_gst",
    "github_not_found": true,
    "lcname": "roboflex.webcam-gst"
}
        
Elapsed time: 2.70424s