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.6.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

rtsp-1.0.6-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rtsp-1.0.6.tar.gz
Algorithm Hash digest
SHA256 7a3d8f12738a2202dc985348d910e95ded76797f8a8989b5d87635e0bbca6f1b
MD5 1e62ecb81058ae57f7b7d3ce74a4a333
BLAKE2b-256 3766ac5ec8b6b536a3194c572adc2465e2a74e2da92ba87872e1ecae526888ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rtsp-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b93f03c251b362803107dc222035b7d6d10105f8eb5c837ef09b68d4ec4fafa4
MD5 823bffad1aba08bbc44ed07faab28e3f
BLAKE2b-256 a50d488e7ff389979e55138c7cfc45f349490e4eea8481f6b972cff003996cf8

See more details on using hashes here.

Supported by

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