Ultra low-latency RTSP stream interception library for USV robotics
Project description
haythemusv
An ultra low-latency RTSP video stream library designed for Unmanned Surface Vehicles (USV) and robotics.
This library bypasses standard OpenCV/FFmpeg buffering to provide near-instant real-time video feeds by aggressively dropping stale frames and using hardware-accelerated decoding.
Installation
pip install haythemusv
Note: Requires ffmpeg to be installed and available in your system PATH.
Usage
from haythemusv import USVStream
import cv2
# Initialize the stream (optimized for Dahua/Amcrest sub-streams)
url = "rtsp://admin:password@192.168.1.161:554/cam/realmonitor?channel=1&subtype=1"
cam = USVStream(url, width=640, height=352)
try:
while cam.is_alive():
frame = cam.get_frame()
if frame is not None:
cv2.imshow("USV Real-Time Feed", frame)
if cv2.waitKey(1) & 0xFF == 27:
break
finally:
cam.stop()
cv2.destroyAllWindows()
Features
- Zero Latency: Aggressive frame-drop strategy ensures you always see the latest microsecond.
- Hardware Accelerated: Automatically uses NVIDIA NVDEC (
h264_cuvid) if available. - Threaded Pipeline: Background FFmpeg pipe maintains steady flow without blocking your main AI/Control loop.
- Lightweight: Minimal dependencies (
numpy,opencv-python).
License
MIT
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 haythemusv-0.1.0.tar.gz.
File metadata
- Download URL: haythemusv-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5ed818658cd3811ee9ebe0f581b866e9eedc3515548f0ff36859f1868ab7be4
|
|
| MD5 |
b46d5ff55fa7bf0d0003d0c9537b5600
|
|
| BLAKE2b-256 |
1d9186d4e1af728047466e5ddd2bb1a5d9a5200766924dd540198b8a4ca9b78d
|
File details
Details for the file haythemusv-0.1.0-py3-none-any.whl.
File metadata
- Download URL: haythemusv-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebf43b62dc4bc66437c0f41df6adac4701d9ea99f48d1027ff93a3a67767de26
|
|
| MD5 |
32b79301a3d909fb75cc8b67b340262e
|
|
| BLAKE2b-256 |
37d90cafc61e593ff3f66b41133cc18edfaac85798d4ea2d279c072a61302735
|