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
  • open RTSP stream in FFmpeg and poll for most recent frame

Examples

One-off Retrieval

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

Continuous Retrieval

import rtsp

collector = rtsp.FFmpegListener()

image = collector.read()

Continuous Retrieval Context Manager

import rtsp
with rtsp.FFmpegListener() as collector:
    _image = collector.read()

    while True:
        process_image(_image)
        _image = collector.read()

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.7
Filename, size File type Python version Upload date Hashes
Filename, size rtsp-1.0.7-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size rtsp-1.0.7.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page