Skip to main content

An implementation of WebRTC and ORTC

Project description

aiortc License Version Python versions Tests Coverage Documentation

What is vsaiortc?

vsaiortc 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 vsaiortc please read the documentation.

Why should I use vsaiortc?

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 vsaiortc 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 vsaiortc code to ensure best-in-class code quality.

Implementation status

vsaiortc 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 vsaiortc is to run:

pip install vsaiortc

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

vsaiortc is released under the BSD license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vsaiortc-0.0.8.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vsaiortc-0.0.8-cp39-abi3-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.9+Windows x86-64

vsaiortc-0.0.8-cp39-abi3-win32.whl (923.9 kB view details)

Uploaded CPython 3.9+Windows x86

vsaiortc-0.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

vsaiortc-0.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

vsaiortc-0.0.8-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

vsaiortc-0.0.8-cp39-abi3-macosx_11_0_arm64.whl (899.6 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

vsaiortc-0.0.8-cp39-abi3-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9+macOS 10.9+ x86-64

File details

Details for the file vsaiortc-0.0.8.tar.gz.

File metadata

  • Download URL: vsaiortc-0.0.8.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for vsaiortc-0.0.8.tar.gz
Algorithm Hash digest
SHA256 03c9d4e50ac7b2e35c8f8c5a856b71b10bf3454e510bb50c40b89e04b307e3f1
MD5 b7b710f4347477b0a8794b633a454f25
BLAKE2b-256 a430dff25c3eb317983732472e1b0604f441dd8b9d89ea3109aa4f918e0629ac

See more details on using hashes here.

File details

Details for the file vsaiortc-0.0.8-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: vsaiortc-0.0.8-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for vsaiortc-0.0.8-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4969926ffcd7cc8c6b9fbe51b2dfb363bdd9d9cb842dcb0bddd772899a6ece59
MD5 a3a575fe1725f0d4e19d966c363cc39b
BLAKE2b-256 8958312fd3b146f8f687e659792fe58bfa91e7e33fae7d3bcf59640854cf3f3e

See more details on using hashes here.

File details

Details for the file vsaiortc-0.0.8-cp39-abi3-win32.whl.

File metadata

  • Download URL: vsaiortc-0.0.8-cp39-abi3-win32.whl
  • Upload date:
  • Size: 923.9 kB
  • Tags: CPython 3.9+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for vsaiortc-0.0.8-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 360384792c6c2286b57bcc3333e2b8f26676590890a924011b9eae3d9ad57299
MD5 2996aac58f4864211fa3305df112e9fb
BLAKE2b-256 f9912978deceb448a8c7cb5fe76be4ba6165b461cbb781c4b316c3acb186fdc9

See more details on using hashes here.

File details

Details for the file vsaiortc-0.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vsaiortc-0.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba85b526ff1ee123e0ae80ccad68babf64fdaf7e9ee1d1eed92fe4f4fbf81afb
MD5 76fc811b4c7c19631605c230ac43f204
BLAKE2b-256 0ec82d88369caaeebdb0959995f0a9ad0a44d93480baffb45c6cb725af789d45

See more details on using hashes here.

File details

Details for the file vsaiortc-0.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for vsaiortc-0.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1945ac3d72a466b23ba6e6b39ec86300cdbe025d7b5ff33191c9c937db63e3f9
MD5 0165a5656359cffc9639d7b25688265f
BLAKE2b-256 b29c1d5d6475376c87bdc58c7e1307e5ed5e2cf1bf773dc7919380a2294ee58e

See more details on using hashes here.

File details

Details for the file vsaiortc-0.0.8-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for vsaiortc-0.0.8-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 567b9f711dbd02298eb166e73d76f22a608f1bbac6e0224d9058f5c454938bf9
MD5 63e47b9044e28a9cc56c431f23dee734
BLAKE2b-256 3d07ba28db3672cfe0a691c429bd78720c399d6a4f497239dd549874c582b3d4

See more details on using hashes here.

File details

Details for the file vsaiortc-0.0.8-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vsaiortc-0.0.8-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c1437af062f529fe82855126729d9971b65347e3dd25c99b2c33cb3c855e674e
MD5 0e644a0058f39aae44cbe9a77f24ffc3
BLAKE2b-256 2234325a7b951c8732f4c7632a59b5ca3ccb75e7394e1651afa7c540a20743e9

See more details on using hashes here.

File details

Details for the file vsaiortc-0.0.8-cp39-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for vsaiortc-0.0.8-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ec2e164a22e556e75101d9fa8056b48c5b3ee9e9120bd7565e6121212650c29c
MD5 c9565ffa9127a00e8152ecb292716c33
BLAKE2b-256 6d934423b3e56a6ba97ad4c5ffd738d1c8bed97d35be4ad2aa5123ff43b5ea8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page