skillfed

aiortsp

An asyncio-based RTSP library

aiortsp v1.4.0 104.3K downloads/30d#12,754 on PyPI57
Copyleft license GNU Lesser General Public License v3 or later DORMANT released

What it is and what it does

aiortsp is a low-level asyncio RTSP client library that handles the protocol mechanics of connecting to RTSP servers and receiving RTP/RTCP media packets. It does not decode video or audio—that responsibility falls to the caller, who can use external libraries like OpenCV or PyAV if needed. The library is designed for developers who want fine-grained control over RTSP session management and packet handling within an async Python application.

The package depends only on dpkt for packet parsing and supports Python 3.6 onward. It is in beta status and has not seen active development for nearly two years, though the repository remains available and the last commit is recent. It is suitable for stable, well-understood use cases but should be evaluated carefully if you need ongoing maintenance or support for emerging RTSP server implementations.

Use it for:

  • Build a custom video surveillance application that connects to IP cameras via RTSP and processes raw RTP packets in real time.
  • Integrate RTSP stream capture into an asyncio-based media pipeline without relying on external video libraries.
  • Prototype or debug RTSP protocol interactions and RTP packet flows at a low level for network diagnostics.
  • Create a headless media ingestion service that receives RTSP streams and forwards packets to external processing systems.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides asyncio-based RTSP client functionality with basic RTP/RTCP support for connecting to RTSP servers and receiving media packets without built-in decoding.

Yes, if you need low-level RTSP client control in an asyncio application and can accept a copyleft license. The install friction is minimal and there are no known vulnerabilities. However, the dormant maintenance status means you should not expect bug fixes or support for new RTSP features; use it for stable, well-tested scenarios or when you are prepared to maintain a fork if needed.

Install

aiortsp on PyPI

pip

pip install aiortsp

uv

uv add aiortsp

poetry

poetry add aiortsp

Installing aiortsp

Before you install

Low install friction with a single pure-Python dependency (dpkt). Maintenance is dormant—last release was 686 days ago, though the repository remains active with a recent commit on 2024-09-27 and modest community interest (57 stars). Suitable for stable use cases but not for projects requiring active development support.

License in practice

Licensed under GNU Lesser General Public License v3 or later (copyleft). You may use and modify the package freely, but any derivative works must also be distributed under a compatible copyleft license; proprietary applications cannot link this library without releasing their own source code under the same terms.

Quickstart

import asyncio
from aiortsp.rtsp.reader import RTSPReader

async def main():
    async with RTSPReader('rtsp://cam/video.sdp') as reader:
        async for pkt in reader.iter_packets():
            print('PKT', pkt.seq, pkt.pt, len(pkt))

asyncio.run(main())

Requires Python 3.6 or later. RTSP server URL and network connectivity to the server are prerequisites; the library provides no decoding, so you must handle RTP packet interpretation separately.

Verify before relying

  • Whether the library works reliably with modern RTSP servers and camera implementations beyond the examples shown.
  • Performance characteristics under high-bandwidth or high-packet-rate scenarios.
  • Compatibility with Python versions beyond 3.8 (classifiers list only up to 3.8, but requires_python is ~=3.6).

Package facts

License GNU Lesser General Public License v3 or later (copyleft)
Python support supports the current Python release (~=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — dpkt
Maintenance dormant — 686 days since the last release
Last repo commit
First released
Downloads 104,330/month — #12,754 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aiortsp-1.4.0-py3-none-any.whl

Keywords: asyncio, rtsp

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

asyncio rtsp clientrtsp library pythonrtp packet streamingrtsp connection asyncmedia stream receiverrtsp reader asynciortp rtcp support
rtsp-streamingasyncio-networking

More Internet packages