Skip to main content

Video Stream Data

Dependency-free data structures for video streaming.

Installation

Use pip to install. Its recommended to install in a virtual environment

python3 -m venv video-streaming-pipeline
# install using system-site-packages (like opencv and pyudev)
source video-streaming-pipeline/bin/activate --system-site-packages
pip3 install video_stream_data

Although not recommended a user installation with --break-system-packages would also be okay as it does not have any dependencies.

Usage

Simply import the data classes you want to have, you can use the parser to load the video stream settings from a file (see test/-folder).

You can use the data structure to manually create any kind of video stream.

classDiagram
    direction LR

    class StreamControlType {
        <<enumeration>>
        +INT: str = 'int'
        +BOOL: str = 'bool'
        +MENU: str = 'menu'
    }

    class Encoding {
        <<enumeration>>
        +PASSTHROUGH: str = 'passthrough'
        +BGR: str = 'bgr'
        +GREY: str = 'grey'
        +GREY16: str = 'grey16'
        +GRB: str = 'rbg'
        +BGRA: str = 'bgra'
        +RGBA: str = 'rgba'

    }

    class Codec {
        <<enumeration>>
        +MJPEG: str = 'MJPEG'  # Motion-JPEG
        +YUYV: str = 'YUYV'  # e.g. YUYV 4:2:2
        +XVID: str = 'XVID'  # e.g. mp4 files
        +H264: str = 'H264'
        +UNKNOWN: str = 'unknown'
    }

    class StreamControl {
        +type: StreamControlType
        +name: str
        +writable: bool = False
        +min: float = 0
        +max: float = 0
        +step: int = 1
        +value: float | bool | None = None
        +options: list = []
    }

    class StreamValue {
        # desired video resolution
        +resolution: list[int]
        +fps: float  # desired FPS by user
        # desired configuration
        +controls: dict[str, int | float | bool | None]
        +encoding: Encoding = Encoding.PASSTHROUGH
        +codec: Codec = Codec.UNKNOWN
    }

    class StreamInfo {
        +name: str
        +stream_path: str
        +driver: str
        +codec: list[str]
        +controls: list[StreamControl]
        +resolutions: list[int, int]
        +max_fps: float
        +values: StreamValue
        +backend: str = 'v4l2'
    }

    StreamControlType <|-- StreamControl
    Encoding <|-- StreamValue
    Codec <|-- StreamValue
    StreamControl --> StreamInfo : controls
    StreamValue --> StreamInfo : values

Fig. 1: Data Model for the StreamInfo generated from any device

Metadata

Release files for video-stream-data 0.1.6

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

Source distribution (sdist)

Source distribution for video-stream-data 0.1.6
File Size Uploaded Provenance Actions
video_stream_data-0.1.6.tar.gz 6.7 kB Without provenance Details for video_stream_data-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for video-stream-data 0.1.6
File Interpreter ABI Platform Actions
video_stream_data-0.1.6-py3-none-any.whl Python 3 none any Details for video_stream_data-0.1.6-py3-none-any.whl

Total release size: 12.4 kB

Release files / video_stream_data-0.1.6.tar.gz

Download URL video_stream_data-0.1.6.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
96cd5242248da4b97896b60d40728c6406337987318926378e53edbca54f3107
BLAKE2b-256 checksum
How to use checksums
c07bc8e6f2774a7a924beaf42d6afb0c03fd67e845f866b3de9133bf84c1bacc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Release files / video_stream_data-0.1.6-py3-none-any.whl

Download URL video_stream_data-0.1.6-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
520123c0f9b9c5c8237d0f4156c04ea7eee623438d9b0c229184a97996aa08cd
BLAKE2b-256 checksum
How to use checksums
ecc800b9e938a7ccc0b4704cfd0ab7215269232d65ceb63cc992eba95fa773cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Security for video-stream-data 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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