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.

Source Distribution

rtsp-1.0.5.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rtsp-1.0.5-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file rtsp-1.0.5.tar.gz.

File metadata

  • Download URL: rtsp-1.0.5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rtsp-1.0.5.tar.gz
Algorithm Hash digest
SHA256 21fc55f267be29d0dcf0785610f1cb8ef548e09c1fb646d6bfb83f8b4ec751e3
MD5 b4bb359b1417628e4f75ff3c270b58e9
BLAKE2b-256 f6d1c74a8336b92b4535573d43e3ef5b7e776e4d79e33a8bddfe2ec7900aa72d

See more details on using hashes here.

File details

Details for the file rtsp-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for rtsp-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 885e48247d6a6078d75efd6934cd3c55eb391361e801cbf684f963cb5c115280
MD5 a012fd13231116348b35615f9486404d
BLAKE2b-256 2170683cdd2dd9b0792532527d03442fd1fa36001889bf1f9bbd739e6aa7e6a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page