Zephyr
Zephyr is a simple RTSP library to stream and receive video over RTSP.
Pre-requisites
Installation
The easiest way to install Zephyr is using pip:
$ pip install zephyr-rtsp
But you can also install Zephyr from source:
$ git clone https://github.com/bpradana/zephyr.git
$ cd zephyr
$ python setup.py install
Usage
Zephyr has 2 main classes, Stream and Client. Stream is used to stream video over RTSP, while Client is used to receive video from RTSP stream.
Stream
To stream video, you need to create a Stream object and call send with a frame. You can also call end to stop the stream.
import cv2
from zephyr import Stream
if __name__ == "__main__":
stream = Stream(
url="rtsp://localhost:8554/test",
resolution=(1280, 720),
fps=30,
bitrate="2M"
)
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
stream.send(frame)
Client
To receive video, you need to create a Client object and call read to get the frame. You can also call release to stop receiving video.
import cv2
from zephyr import Client
if __name__ == "__main__":
client = Client(url="rtsp://localhost:8554/test")
while True:
ret, frame = client.read()
cv2.imshow('frame', frame)
if cv2.waitKey(1) & 0xFF == ord("q"):
client.release()
break
License
Zephyr is licensed under the MIT License.
Credits
Metadata
Release files for zephyr-rtsp 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zephyr-rtsp-0.0.6.tar.gz | 8.2 kB | Without provenance | Details for zephyr-rtsp-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zephyr_rtsp-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for zephyr_rtsp-0.0.6-py3-none-any.whl |
Total release size: 18.7 kB
Release files / zephyr-rtsp-0.0.6.tar.gz
| Download URL | zephyr-rtsp-0.0.6.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82680696b608764f0d1a10830494c1b7d33ef8453602b27049bc19bc7ed26601
|
|
BLAKE2b-256 checksum How to use checksums |
122ae32605e5d869d2bc0a6d9333b942c6a39383f479f9d2fb902b22d71b3dc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / zephyr_rtsp-0.0.6-py3-none-any.whl
| Download URL | zephyr_rtsp-0.0.6-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
912bbae4d08f3048b9567cb8460e81b97e4f0d53ff1073e457913dc739404ab8
|
|
BLAKE2b-256 checksum How to use checksums |
a41b00e8c3d498357a3cd8a845d5371e93813840c7769f0dcc85f1c5f571ad8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Security for zephyr-rtsp 0.0.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.