Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

An asyncio-based RTSP library

Project description

https://travis-ci.com/marss/aiortsp.svg?branch=master https://coveralls.io/repos/github/marss/aiortsp/badge.svg?branch=master

This is a very simple asyncio library for interacting with an RTSP server, with basic RTP/RTCP support.

The intended use case is to provide a pretty low level control of what happens at RTSP connection level, all in python/asyncio.

This library does not provide any decoding capability, it is up to the client to decide what to do with received RTP packets.

One could easily decode using OpenCV or PyAV, or not at all depending on the intended use.

See examples for how to use the lib internals, butfor quick usage:

import asyncio
from airtsp.rtsp.reader import RTPReader

async def main():
    # Open a reader (which means RTSP connection, then media session)
    async with RTPReader('rtsp://cam/video.sdp') as reader:
        # Iterate on RTP packets
        async for pkt: RTP in reader.iter_packets():
            print('PKT', pkt.seq, pkt.pt, len(pkt)

asyncio.run(main())

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 aiortsp, version 1.3.0
Filename, size File type Python version Upload date Hashes
Filename, size aiortsp-1.3.0-py3-none-any.whl (33.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size aiortsp-1.3.0.tar.gz (25.0 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