RTSP client
Project description
RTSP Package
/((((((\\\\
=======((((((((((\\\\\
(( \\\\\\\
( (* _/ \\\\\\\
\ / \ \\\\\\________________
| | | </ __ ((\\\\
o_| / ____/ / _______ \ \\\\ \\\\\\\
| ._ / __/ __(_-</ _ \ \ \\\\\\\\\\\\\\\\
| / /_/ \__/___/ .__/ / \\\\\\\ \\
.______/\/ / /_/ / \\\
/ __.____/ _/ ________( /\
/ / / ________/`---------' \ / \_
/ / \ \ \ \ \_ \
( < \ \ > / \ \
\/ \\_ / / > )
\_| / / / /
_// _//
/_| /_|
RTSP Client. Requires OpenCV-Python
Features
-
fetch a single image as Pillow Image
-
open RTSP stream and poll most recent frame as Pillow Image
-
preview stream in OpenCV
-
Robustness
- configurable number of frames to allow dropped
- configure time to retry creating a new connection
Client
Client(rtsp_server_uri, drop_frame_limit=15, retry_connection=TRUE, verbose = TRUE)
Examples
One-off Retrieval
import rtsp
client = rtsp.Client(rtsp_server_uri = 'rtsp://...')
client.read().show()
client.close()
Stream Preview
import rtsp
with rtsp.Client('rtsp://...') as client:
client.preview()
Continuous Retrieval
import rtsp
with rtsp.Client(rtsp_server_uri = 'rtsp://...',drop_frame_limit=10) as client:
_image = client.read()
while True:
process_image(_image)
_image = client.read()
Verbose mode
In [1]: import rtsp
In [2]: client = rtsp.Client()
Connected to RTSP video source rtsp://192.168.1.3/ufirststream/track1.
In [3]: client.preview()
In [4]: client.close()
Dropped RTSP connection.
Received signal to stop.
In [5]: client.open()
Connected to RTSP video source rtsp://192.168.1.3/ufirststream/track1.
In [6]: client.read().show()
Connected to RTSP video source rtsp://192.168.1.3/ufirststream/track1.
In [7]: client.close()
Dropped RTSP connection.
Received signal to stop.
Roadmap:
- v1.0.0 - basic function relying on OpenCV or ffmpeg
- v2.0.0 - lightweight native-Python implementation rtsp client functions
- live stream reading & buffer
- on-demand frame retrieval
- v2.1.0 - native Python rtsp server functions
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
rtsp-1.1.3.tar.gz
(4.3 kB
view details)
Built Distribution
rtsp-1.1.3-py3-none-any.whl
(5.6 kB
view details)
File details
Details for the file rtsp-1.1.3.tar.gz
.
File metadata
- Download URL: rtsp-1.1.3.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f9c9e3e9bce95a2bc403fd74fb2cbc7512e7f99b283d614cae4ca54c60dd9ce5
|
|
MD5 |
1a1a8821c9467f1a8613ac1b6aeaac79
|
|
BLAKE2b-256 |
83b5e852c6c35678ae422054e9e7a9f928a59cd7a80eaf18923355675ed1bd8f
|
File details
Details for the file rtsp-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: rtsp-1.1.3-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
843a6e101ab9879443dba9331d850559bfce69571c773135f951997a1bb05960
|
|
MD5 |
057e21d5268b6d0a0039185831e9afc1
|
|
BLAKE2b-256 |
b9f32aa91f9022293f5e77b47e98a5108c1d5dbf7ce0f85f5440e09d36c38d8d
|