Python API for ThorVision
Project description
pythorvision
pythorvision is a python package as client API for communicating with XDAQ video streaming subsystem -- ThorVision, designed to manage camera streams and recordings.
Features
pythorvision features High-level API with simple interface for managing camera streams and recordings.
- Camera Discovery: List available cameras and their capabilities.
- Flexible Stream Selection: Select stream capabilities:
- media type (MJPEG)
- format
- resolution
- framerate
- GStreamer-based Recording: Record video streams into split
.mkvfiles using GStreamer.
Requirements
- Python: Python 3.6 or higher is required.
- Dependencies:
- GStreamer: Must be installed on the client machine, and
gst-launch-1.0must be available in the system's PATH.-
You can download GStreamer from gstreamer.freedesktop.org/download.
-
Windows:
- Download and run the runtime installer.
- Add the
bindirectory of your GStreamer installation (e.g.,C:\gstreamer\1.0\msvc_x86_64\bin) to your system'sPathenvironment variable.
-
macOS:
- The recommended way to install is using Homebrew:
brew install gstreamer
- Alternatively, you can download and run the runtime installer from the GStreamer website. If you use the installer, you may need to manually add GStreamer to your PATH:
export PATH=/Library/Frameworks/GStreamer.framework/Versions/Current/bin:$PATH
- The recommended way to install is using Homebrew:
-
- GStreamer: Must be installed on the client machine, and
Installation
To install pythorvision, you can use pip in project root directory:
pip install .
This will install the package and its required Python dependencies.
Tutorial
This tutorial demonstrates how to use ThorVisionClient to connect to the server, start and record streams from cameras, and then clean up the resources.
Run the Example Scripts
Record Video from Two Cameras
Run the following script to record from the first two available cameras for 10 seconds:
python ./examples/run_two_cams.py
The recorded .mkv video files will be saved in the recordings/ directory.
Extract Metadata from a Video File
If you have a pre-recorded video, you can extract its frame metadata using this script:
python ./examples/extract_video_metadata.py "path/to/your/video.mkv"
Record and Immediately Extract Metadata
This script provides a complete end-to-end example of recording a short video and then immediately parsing it to display its metadata.
python ./examples/record_and_extract.py
API Documentation
For complete API documentation, visit: https://kontex-neuro.github.io/pythorvision/
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 pythorvision-0.3.0.tar.gz.
File metadata
- Download URL: pythorvision-0.3.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d80936d0538169249e88a08bc67c86cf18fafec47a6c679fa51b7d7b61fb4473
|
|
| MD5 |
91acec5128d30b6b86c31d6deaf3a603
|
|
| BLAKE2b-256 |
cab99d21491f0d96b77189da7b2c4b8e8f1a6f8f68acfff81f56adc6249d47d2
|
Provenance
The following attestation bundles were made for pythorvision-0.3.0.tar.gz:
Publisher:
publish.yml on kontex-neuro/pythorvision
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythorvision-0.3.0.tar.gz -
Subject digest:
d80936d0538169249e88a08bc67c86cf18fafec47a6c679fa51b7d7b61fb4473 - Sigstore transparency entry: 696082452
- Sigstore integration time:
-
Permalink:
kontex-neuro/pythorvision@24d170cfe8b494fef7c4955452f671cd8add60bf -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/kontex-neuro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24d170cfe8b494fef7c4955452f671cd8add60bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file pythorvision-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pythorvision-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8eab07ca3118d6b6b76d58ff3a4c6e45141e7167e596ed447f244c31e188d86
|
|
| MD5 |
2278299913d6a28242d6b20db05dc231
|
|
| BLAKE2b-256 |
fd8347e829c067ed294ca264a7d1e05df0362d03cc7dfef2ff29edec9f64c1fb
|
Provenance
The following attestation bundles were made for pythorvision-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on kontex-neuro/pythorvision
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythorvision-0.3.0-py3-none-any.whl -
Subject digest:
b8eab07ca3118d6b6b76d58ff3a4c6e45141e7167e596ed447f244c31e188d86 - Sigstore transparency entry: 696082471
- Sigstore integration time:
-
Permalink:
kontex-neuro/pythorvision@24d170cfe8b494fef7c4955452f671cd8add60bf -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/kontex-neuro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24d170cfe8b494fef7c4955452f671cd8add60bf -
Trigger Event:
push
-
Statement type: