Skip to main content

A simple package for getting live frames from rtsp streams.

Project description

RTSParty

A RTSP module that makes it easy to grab live frames from a RTSP stream. This package basically just wraps cv2 and lets you grab the latest frame from the camera, instead of relying on the buffer.

Usage

from rtsparty import Stream


stream = Stream('rtsp://username:password@10.0.0.1/endpoint/', live=True)

# Get a live frame from the camera
live_frame_from_camera = stream.get_frame()

# Force a reconnection
stream.reconnect()

# Show a live view of the stream
stream.view()

To grab the latest frame from the camera no matter what, construct the stream with live=True (or leave it out, it's the default):

stream = Stream(live=True)
stream = Stream()

To use the buffer, which may not provide the most live images from the camera, set live to False.

stream = Stream(live=False)

By leaving out the first argument in the Stream constructor, it will by default use the default video capture device on your machine (your webcam most likely).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rtsparty-0.0.2.tar.gz (3.0 kB view hashes)

Uploaded source

Built Distribution

rtsparty-0.0.2-py2-none-any.whl (3.5 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page