aiortsp
An asyncio-based RTSP library
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 aiortspuv
uv add aiortsppoetry
poetry add aiortspInstalling 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
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
aiortcaiortc is a Python library implementing WebRTC…
permissive · top 5,000 on PyPI
rtpDecodes, encodes, and manipulates RTP…
permissive · top 15,000 on PyPI
pylibsrtppylibsrtp encrypts and decrypts Secure…
permissive · top 5,000 on PyPI
go2rtc-clientAsynchronous Python client library for…
permissive · top 15,000 on PyPI
ircProvides a low-level, event-driven IRC protocol…
permissive · top 15,000 on PyPI
python-ffmpegProvides a Python binding for FFmpeg with both…
permissive · top 15,000 on PyPI
icmplibicmplib provides a pure Python implementation…
copyleft · top 5,000 on PyPI
aioserialProvides async/await serial port I/O using…
copyleft · top 15,000 on PyPI
pypcapPython wrapper around libpcap that lets you…
unclear · top 15,000 on PyPI
aioblescanaioblescan listens for and parses Bluetooth Low…
permissive · top 15,000 on PyPI