Skip to main content

ffmpeg wrapper for RTSP client

Project description

RTSP Package

        /((((((\\\\
=======((((((((((\\\\\
     ((           \\\\\\\
     ( (*    _/      \\\\\\\
       \    /  \      \\\\\\________________
        |  |   |      </    __             ((\\\\
        o_|   /        ____/ / _______       \ \\\\    \\\\\\\
             |  ._    / __/ __(_-</ _ \       \ \\\\\\\\\\\\\\\\
             | /     /_/  \__/___/ .__/       /    \\\\\\\     \\
     .______/\/     /           /_/           /         \\\
    / __.____/    _/         ________(       /\
   / / / ________/`---------'         \     /  \_
  / /  \ \                             \   \ \_  \
 ( <    \ \                             >  /    \ \
  \/      \\_                          / /       > )
           \_|                        / /       / /
                                    _//       _//
                                   /_|       /_|

RTSP Client. Requires ffmpeg system call for RTSP support and Pillow for parsing and conversion.

Features

  • fetch a single image as Pillow Image

Examples

One-off Retrieval

import rtsp
image = rtsp.fetch_image('rtsp://1.0.0.1/StreamId=1')

Continuous Retrieval

import rtsp
import time

collector = rtsp.BackgroundListener()

## image_1 may be None but has no delay
image_1 = collector.current_image

## image_2 will not be None but may have a delay
image_2 = collector.blocking_get_new_image()

## image_2 and image_3 will not be the same
image_3 = collector.blocking_get_new_image(old_image = image_2)

collector.shutdown(verbose=False)

Continuous Retrieval Context Manager

import rtsp
import time
with rtsp.BackgroundListener() as collector:
    _image = collector.blocking_get_new_image()

    while True:
        process_image(_image)
        _image = collector.blocking_get_new_image(old_image = _image)

Project details


Download files

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

Files for rtsp, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size rtsp-1.0.4-py3-none-any.whl (3.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size rtsp-1.0.4.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

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