Skip to main content

A simple package for getting live frames from rtsp streams.

Project description


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.


from rtsparty import Stream

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

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

# Force a reconnection

# Show a live view of the stream

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 and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page