skillfed

aiortc

An implementation of WebRTC and ORTC

aiortc v1.15.0 2.2M downloads/30d#3,202 on PyPI5,084
Permissive license BSD-3-Clause Active released

What it is and what it does

aiortc is a pure-Python implementation of WebRTC and ORTC protocols built on asyncio, enabling peer-to-peer real-time communication directly from Python applications. Unlike browser-native WebRTC or native libraries, it provides readable, modular code that can be extended with Python ecosystem tools—making it suitable for building signaling servers, applying computer vision to video streams, or experimenting with WebRTC internals.

The library handles the full WebRTC stack: SDP generation, ICE connectivity, DTLS encryption, SRTP keying, SCTP data channels, and codec support for Opus/PCMU/PCMA audio and VP8/H.264 video. It includes RTCP reporting and packet-loss recovery (NACK/PLI), with interoperability regularly tested against Chrome and Firefox. Runtime dependencies include aioice for connectivity, av for media codec access, cryptography and pyopenssl for encryption, and pylibsrtp for secure RTP.

Use it for:

  • Build a WebRTC signaling server that manages peer connections and relays SDP offers/answers
  • Apply real-time computer vision or audio processing to incoming video/audio streams using Python libraries
  • Create a peer-to-peer data channel application for low-latency messaging between Python clients
  • Prototype or experiment with WebRTC protocol internals without diving into browser or native code
  • Integrate live media streaming into a Python backend service with full control over codecs and routing

Worth the install?

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

aiortc is a Python library implementing WebRTC and ORTC protocols for real-time audio, video, and data channel communication over asyncio, with interoperability tested against Chrome and Firefox.

Yes. aiortc is actively maintained, permissively licensed, and widely used (top 5000 PyPI packages by downloads). It's the right choice if you need WebRTC in Python and can accept the dependency on compiled media libraries. Not suitable if you need a lightweight data-only solution or cannot install system packages for av and pylibsrtp.

Install

aiortc on PyPI

pip

pip install aiortc

uv

uv add aiortc

poetry

poetry add aiortc

Installing aiortc

Before you install

Low install friction with a pure-Python wheel; actively maintained with a recent release 32 days ago and active repository status. Depends on compiled libraries (av, cryptography, pylibsrtp) that may require system packages, but the package itself installs cleanly.

License in practice

Released under BSD-3-Clause (permissive), allowing commercial and private use with minimal restrictions—suitable for most projects.

Quickstart

pip install aiortc

from aiortc import RTCPeerConnection
from pyee.asyncio import AsyncIOEventEmitter

pc = RTCPeerConnection()
# Configure audio/video tracks and data channels

Requires Python 3.10 or later; av and pylibsrtp dependencies may need system libraries (libavformat, libsrtp) to compile.

Verify before relying

  • Specific performance characteristics (latency, throughput) under typical workloads
  • Production deployment patterns and known scaling limits
  • Detailed comparison of feature completeness vs. browser-native WebRTC implementations

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 7 — aioice, av, cryptography, google-crc32c, pyee, pylibsrtp, pyopenssl
Maintenance actively maintained — 32 days since the last release
Last repo commit
First released
Downloads 2,218,401/month — #3,202 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aiortc-1.15.0-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

webrtc python asyncioreal-time communication libraryaudio video streaming pythondata channels peer-to-peerortc implementation pythonasyncio webrtcpeer-to-peer video python
webrtcpeer-to-peerreal-time-communication

More Internet packages