Skip to main content
aiortc License Version Python versions Tests Coverage Documentation

What is aiortc?

aiortc is a library for Web Real-Time Communication (WebRTC) and Object Real-Time Communication (ORTC) in Python. It is built on top of asyncio, Python’s standard asynchronous I/O framework.

The API closely follows its Javascript counterpart while using pythonic constructs:

  • promises are replaced by coroutines

  • events are emitted using pyee.EventEmitter

To learn more about aiortc please read the documentation.

Why should I use aiortc?

The main WebRTC and ORTC implementations are either built into web browsers, or come in the form of native code. While they are extensively battle tested, their internals are complex and they do not provide Python bindings. Furthermore they are tightly coupled to a media stack, making it hard to plug in audio or video processing algorithms.

In contrast, the aiortc implementation is fairly simple and readable. As such it is a good starting point for programmers wishing to understand how WebRTC works or tinker with its internals. It is also easy to create innovative products by leveraging the extensive modules available in the Python ecosystem. For instance you can build a full server handling both signaling and data channels or apply computer vision algorithms to video frames using OpenCV.

Furthermore, a lot of effort has gone into writing an extensive test suite for the aiortc code to ensure best-in-class code quality.

Implementation status

aiortc allows you to exchange audio, video and data channels and interoperability is regularly tested against both Chrome and Firefox. Here are some of its features:

  • SDP generation / parsing

  • Interactive Connectivity Establishment, with half-trickle and mDNS support

  • DTLS key and certificate generation

  • DTLS handshake, encryption / decryption (for SCTP)

  • SRTP keying, encryption and decryption for RTP and RTCP

  • Pure Python SCTP implementation

  • Data Channels

  • Sending and receiving audio (Opus / PCMU / PCMA)

  • Sending and receiving video (VP8 / H.264)

  • Bundling audio / video / data channels

  • RTCP reports, including NACK / PLI to recover from packet loss

Installing

The easiest way to install aiortc is to run:

pip install aiortc

Building from source

If there are no wheels for your system or if you wish to build aiortc from source you will need a couple of libraries installed on your system:

  • Opus for audio encoding / decoding

  • LibVPX for video encoding / decoding

Linux

On Debian/Ubuntu run:

apt install libopus-dev libvpx-dev

OS X

On OS X run:

brew install opus libvpx

License

aiortc is released under the BSD license.

Metadata

Release files for aiortc-rtp 1.10.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiortc-rtp 1.10.1
File Size Uploaded
aiortc_rtp-1.10.1.tar.gz 1.2 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for aiortc-rtp 1.10.1
File
aiortc_rtp-1.10.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
aiortc_rtp-1.10.1-cp39-abi3-win32.whl CPython 3.9 abi3 Windows x86-32 Details
aiortc_rtp-1.10.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
aiortc_rtp-1.10.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
aiortc_rtp-1.10.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.9 abi3 Linux glibc 2.5+ x86-32, Linux glibc 2.17+ x86-32 Details
aiortc_rtp-1.10.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
aiortc_rtp-1.10.1-cp39-abi3-macosx_10_9_x86_64.whl CPython 3.9 abi3 macOS 10.9+ x86-64 Details

Total release size: 10.7 MB

Release files / aiortc_rtp-1.10.1.tar.gz

Download URL aiortc_rtp-1.10.1.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3afb07e1252afb6dac4ae702f2365b4bafa61eb4a07e0655ddab4eb067be0e4b
BLAKE2b-256 checksum
How to use checksums
60c7a90d055837f0e84b4b598c31805bc0485b8752a87177bb963024419816a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / aiortc_rtp-1.10.1-cp39-abi3-win_amd64.whl

Download URL aiortc_rtp-1.10.1-cp39-abi3-win_amd64.whl
Size 1.0 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a4b6d4af3ab5ae4bdcd4a904a1a1f30385deb12c7ef39e94b5657b0f84f1d752
BLAKE2b-256 checksum
How to use checksums
c51f291b57f42782fb617115353419c2086508bd62d5fe9c6d1084c5a3c10988
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / aiortc_rtp-1.10.1-cp39-abi3-win32.whl

Download URL aiortc_rtp-1.10.1-cp39-abi3-win32.whl
Size 923.5 kB
Tags CPython 3.9 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
e5bb4255eae3b5cf9f4350611fd6964c8a5137cc77893c6aee4c1d0536149a32
BLAKE2b-256 checksum
How to use checksums
b9b3e36bd519405103c15a60e2800f35b54aa9f9af47b492640cd8b75212567a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / aiortc_rtp-1.10.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL aiortc_rtp-1.10.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
aa2c66ec1d7f741a488b3dfbc06dbe39d26a02ce68022719c003548c750a2aa2
BLAKE2b-256 checksum
How to use checksums
27ef7484046b1ecf00bf0c21cdcd09c0d7ed041dca7b785401970c92c0ff314d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / aiortc_rtp-1.10.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL aiortc_rtp-1.10.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.8 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
98bd9fbc9ed338ee75236275c6d11cdd845fd4a1e9cfc7a851cdb036d739f1c5
BLAKE2b-256 checksum
How to use checksums
b2946e7b1f95ca36462351dcd3ca9f815e6bcd28004d7012b880f77f118093ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / aiortc_rtp-1.10.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL aiortc_rtp-1.10.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 1.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 abi3
SHA-256 checksum
How to use checksums
a67a2ed97e7788b723b2303b1e5a365ddd54e2bc72e9736758b579d57ce9183d
BLAKE2b-256 checksum
How to use checksums
8d6129893d73dbd4fcd0a608a7e079cd954bbe9825680296695b193ceace56c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / aiortc_rtp-1.10.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL aiortc_rtp-1.10.1-cp39-abi3-macosx_11_0_arm64.whl
Size 899.1 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7d648962599f18beeb75eb03d7b90cae52a862713b60186f2e6cc1900a22285d
BLAKE2b-256 checksum
How to use checksums
bb0da8dfedc450d47a20922285b10e0af5e69f39c76ac097cc3efd7a3e27950e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / aiortc_rtp-1.10.1-cp39-abi3-macosx_10_9_x86_64.whl

Download URL aiortc_rtp-1.10.1-cp39-abi3-macosx_10_9_x86_64.whl
Size 1.2 MB
Tags CPython 3.9 abi3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
3c16ac2e4c339cd2f0416edc258f61146dfcaee8faf43d3bc6d8de35e3e97434
BLAKE2b-256 checksum
How to use checksums
7cbf71bbd6ed153e1b8e6562b79c1622c997219a855b5dac0dae2b6de98ee4ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

1.10.1 This release

8 release files

1.10.0

7 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page