| Name | pythorvision JSON |
| Version |
0.2.0
JSON |
| download |
| home_page | None |
| Summary | Python API for ThorVision |
| upload_time | 2025-09-02 10:18:15 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.6 |
| license | MIT License
Copyright (c) 2025 KonteX Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
| keywords |
vision
camera
api
|
| VCS |
|
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# 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 `.mkv` files using GStreamer.
## Requirements
- **Python**: Python 3.6 or higher is required.
- **Dependencies**:
- **GStreamer**: Must be installed on the client machine, and `gst-launch-1.0` must be available in the system's PATH.
- You can download GStreamer from [gstreamer.freedesktop.org/download](https://gstreamer.freedesktop.org/download).
- **Windows**:
1. Download and run the runtime installer.
2. Add the `bin` directory of your GStreamer installation (e.g., `C:\gstreamer\1.0\msvc_x86_64\bin`) to your system's `Path` environment variable.
- **macOS**:
- The recommended way to install is using [Homebrew](https://brew.sh/):
```bash
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:
```bash
export PATH=/Library/Frameworks/GStreamer.framework/Versions/Current/bin:$PATH
```
## Installation
To install **pythorvision**, you can use `pip` in project root directory:
```bash
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:
```bash
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:
```bash
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.
```bash
python ./examples/record_and_extract.py
```
## API Documentation
For complete API documentation, visit: [https://kontex-neuro.github.io/pythorvision/](https://kontex-neuro.github.io/pythorvision/)
Raw data
{
"_id": null,
"home_page": null,
"name": "pythorvision",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "vision, camera, api",
"author": null,
"author_email": "Kontex <hhuang@kontex.com>",
"download_url": "https://files.pythonhosted.org/packages/f9/6a/c27a8c3a3d4c9b43fa6bd997839d9f61403f1cb01768695634bef89da05f/pythorvision-0.2.0.tar.gz",
"platform": null,
"description": "# pythorvision\n\n`pythorvision` is a python package as client API for communicating with **XDAQ** video streaming subsystem -- **ThorVision**, designed to manage camera streams and recordings.\n\n## Features\n\n**pythorvision** features **High-level API** with simple interface for managing camera streams and recordings.\n- **Camera Discovery**: List available cameras and their capabilities.\n- **Flexible Stream Selection**: Select stream capabilities:\n - media type (MJPEG)\n - format\n - resolution\n - framerate\n- **GStreamer-based Recording**: Record video streams into split `.mkv` files using GStreamer.\n\n## Requirements\n\n- **Python**: Python 3.6 or higher is required.\n- **Dependencies**:\n - **GStreamer**: Must be installed on the client machine, and `gst-launch-1.0` must be available in the system's PATH.\n - You can download GStreamer from [gstreamer.freedesktop.org/download](https://gstreamer.freedesktop.org/download).\n\n - **Windows**:\n 1. Download and run the runtime installer.\n 2. Add the `bin` directory of your GStreamer installation (e.g., `C:\\gstreamer\\1.0\\msvc_x86_64\\bin`) to your system's `Path` environment variable.\n\n - **macOS**:\n - The recommended way to install is using [Homebrew](https://brew.sh/):\n ```bash\n brew install gstreamer\n ```\n - 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:\n ```bash\n export PATH=/Library/Frameworks/GStreamer.framework/Versions/Current/bin:$PATH\n ```\n\n## Installation\n\nTo install **pythorvision**, you can use `pip` in project root directory:\n\n```bash\npip install .\n```\n\nThis will install the package and its required Python dependencies.\n\n## Tutorial\n\nThis tutorial demonstrates how to use `ThorVisionClient` to connect to the server, start and record streams from cameras, and then clean up the resources.\n\n### Run the Example Scripts\n\n#### Record Video from Two Cameras\n\nRun the following script to record from the first two available cameras for 10 seconds:\n\n```bash\npython ./examples/run_two_cams.py\n```\n\nThe recorded `.mkv` video files will be saved in the `recordings/` directory.\n\n#### Extract Metadata from a Video File\n\nIf you have a pre-recorded video, you can extract its frame metadata using this script:\n\n```bash\npython ./examples/extract_video_metadata.py \"path/to/your/video.mkv\"\n```\n\n#### Record and Immediately Extract Metadata\n\nThis script provides a complete end-to-end example of recording a short video and then immediately parsing it to display its metadata.\n\n```bash\npython ./examples/record_and_extract.py\n```\n\n## API Documentation\n\nFor complete API documentation, visit: [https://kontex-neuro.github.io/pythorvision/](https://kontex-neuro.github.io/pythorvision/)\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 KonteX Inc\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Python API for ThorVision",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [
"vision",
" camera",
" api"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9b591a66e421ade7d3d1f6061ffb6d0dc579d1ef1801449dbc6be3a5225fcb1f",
"md5": "14f8d9e31f968daccaf73873f9a8f0ff",
"sha256": "6591e4e96b2810c754fb3249b307059e4bc28a839f4939a156dd897a6e358af7"
},
"downloads": -1,
"filename": "pythorvision-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "14f8d9e31f968daccaf73873f9a8f0ff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 11365,
"upload_time": "2025-09-02T10:18:13",
"upload_time_iso_8601": "2025-09-02T10:18:13.930386Z",
"url": "https://files.pythonhosted.org/packages/9b/59/1a66e421ade7d3d1f6061ffb6d0dc579d1ef1801449dbc6be3a5225fcb1f/pythorvision-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f96ac27a8c3a3d4c9b43fa6bd997839d9f61403f1cb01768695634bef89da05f",
"md5": "e0ddcc188ac346da8a6b2512704cb144",
"sha256": "a0987b8324747ce242be44cd16c3aac1e9a62ec06a2e3fa42d9d09d99b8eb354"
},
"downloads": -1,
"filename": "pythorvision-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "e0ddcc188ac346da8a6b2512704cb144",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11520,
"upload_time": "2025-09-02T10:18:15",
"upload_time_iso_8601": "2025-09-02T10:18:15.615797Z",
"url": "https://files.pythonhosted.org/packages/f9/6a/c27a8c3a3d4c9b43fa6bd997839d9f61403f1cb01768695634bef89da05f/pythorvision-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-02 10:18:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pythorvision"
}