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
Client
Client(rtsp_server_uri, verbose = TRUE)
Special URIs are also recognized for convenience:
- integers will load a local USB or webcam starting with interface 0 via
OpenCVe.g.rtsp.Client(0) - 'picam' uses a Raspberry Pi camera as source e.g.
rtsp.Client('picam')
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.6.tar.gz
(4.6 kB
view details)
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
rtsp-1.1.6-py3-none-any.whl
(6.0 kB
view details)
File details
Details for the file rtsp-1.1.6.tar.gz.
File metadata
- Download URL: rtsp-1.1.6.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cb2d385fdd3014f057792fe93036f86d635709f189e1bf507b869cf1bf142d8
|
|
| MD5 |
c6f5dd0d5b7d822329cebbfa3e4d99ca
|
|
| BLAKE2b-256 |
e033a065d07910a14b72c1871fe009dacf559bff55ba8393ace8e3bc3b0d1764
|
File details
Details for the file rtsp-1.1.6-py3-none-any.whl.
File metadata
- Download URL: rtsp-1.1.6-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c1c58527f4c822424569697a0ef7f5fcd044330f1aa588791512306dcbd2453
|
|
| MD5 |
ec52cf79f2198da198214919ee878fb3
|
|
| BLAKE2b-256 |
d899b494875950fcb2f13a5e8b7f8a8e7c487620259708964463fadd8836b6e7
|