Unified data format for video streams (devices, server, ...)
Project description
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
+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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file video_stream_data-0.1.3.tar.gz.
File metadata
- Download URL: video_stream_data-0.1.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c22428cbb6bf20320bbd587284f0235444d35579133f890b82a5c79bc57242e
|
|
| MD5 |
a6bf8f8bc7cd4b1e2722352d1fd1382b
|
|
| BLAKE2b-256 |
33879c4ebbb544869f8ce6db7da4cdb4902e8c81a46a0a73535dd258310c18dd
|
Provenance
The following attestation bundles were made for video_stream_data-0.1.3.tar.gz:
Publisher:
test-and-publish.yml on brean/video_stream_data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
video_stream_data-0.1.3.tar.gz -
Subject digest:
3c22428cbb6bf20320bbd587284f0235444d35579133f890b82a5c79bc57242e - Sigstore transparency entry: 919264048
- Sigstore integration time:
-
Permalink:
brean/video_stream_data@1b04f7ed2ad3327db125708ff5f96949f15a35ea -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/brean
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-and-publish.yml@1b04f7ed2ad3327db125708ff5f96949f15a35ea -
Trigger Event:
push
-
Statement type:
File details
Details for the file video_stream_data-0.1.3-py2.py3-none-any.whl.
File metadata
- Download URL: video_stream_data-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35d388d39a79168da3257277948631ca2c2d24ed216b865da098075163237eb4
|
|
| MD5 |
916c3919874b2a45b16aa48bcc938060
|
|
| BLAKE2b-256 |
3424145594f8f771aa908be7d312302853572ebef5c9077fea09320e4bc3a40e
|
Provenance
The following attestation bundles were made for video_stream_data-0.1.3-py2.py3-none-any.whl:
Publisher:
test-and-publish.yml on brean/video_stream_data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
video_stream_data-0.1.3-py2.py3-none-any.whl -
Subject digest:
35d388d39a79168da3257277948631ca2c2d24ed216b865da098075163237eb4 - Sigstore transparency entry: 919264053
- Sigstore integration time:
-
Permalink:
brean/video_stream_data@1b04f7ed2ad3327db125708ff5f96949f15a35ea -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/brean
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-and-publish.yml@1b04f7ed2ad3327db125708ff5f96949f15a35ea -
Trigger Event:
push
-
Statement type: