Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

python-webrtc logo
A Python extension that provides bindings to WebRTC M92
Examples • Documentation • PyPI

Python WebRTC

Let's use the native WebRTC with strict compatibility and fully implemented stuff!

This project follows the W3C specification with some modifications and additions to make it work better with Python applications, with useful APIs like programmatic audio and video.

DISCLAIMER

This project is still under development and isn't ready for any serious use. In the current stage, it's possible to establish connection and work with audio, but many interfaces and methods not implemented yet.

You can easily check status of methods and interfaces availability here.

Snippet

import asyncio
import webrtc


async def main():
    pc = webrtc.RTCPeerConnection()

    stream = webrtc.get_user_media()
    for track in stream.get_tracks():
        pc.add_track(track, stream)

    audio_source = webrtc.RTCAudioSource()
    track = audio_source.create_track()
    pc.add_track(track)

    local_sdp = await pc.create_offer()
    print(local_sdp.sdp)


if __name__ == '__main__':
    asyncio.run(main())

Requirements

Pre-built wheels:

  • Python 3.7 or higher
  • pip 21 or higher
  • And compatible platform:
Linux macOS Windows
armv7l arm64 x86_64 Intel Apple Silicon 64bit
Python 3.7 N/A N/A ✅ ✅ N/A ✅
3.8 N/A N/A ✅ ✅ ✅ ✅
3.9 N/A N/A ✅ ✅ ✅ ✅
3.10 N/A N/A ✅ ✅ ✅ ✅

Building from sources (sdist):

  • ~15 GB of free disk space
  • CMake 3.14 or higher
  • GCC 7.5 or higher
  • glibc 2.18 or higher
  • ARM toolchain (ARM only)

Full building instruction will be present later

Installing

Pre-built wheel:

pip3 install --pre wrtc

Build from sources:

pip3 install --pre wrtc --no-binary wrtc

Documentation

The documentation is live at readthedocs.io.

Getting help

You can get help in several ways:

Contributing

Contributions of any sizes are welcome.

Special thanks to

License

The python-webrtc is published under the BSD 3-Clause License.

Release files for wrtc 0.0.0.dev9

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

Source distribution (sdist)

Source distribution for wrtc 0.0.0.dev9
File Size Uploaded
wrtc-0.0.0.dev9.tar.gz 229.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for wrtc 0.0.0.dev9
File
wrtc-0.0.0.dev9-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
wrtc-0.0.0.dev9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64, Linux glibc 2.24+ x86-64 Details
wrtc-0.0.0.dev9-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
wrtc-0.0.0.dev9-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
wrtc-0.0.0.dev9-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
wrtc-0.0.0.dev9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64, Linux glibc 2.24+ x86-64 Details
wrtc-0.0.0.dev9-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
wrtc-0.0.0.dev9-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details
wrtc-0.0.0.dev9-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
wrtc-0.0.0.dev9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64, Linux glibc 2.24+ x86-64 Details
wrtc-0.0.0.dev9-cp38-cp38-macosx_11_0_arm64.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64 Details
wrtc-0.0.0.dev9-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details
wrtc-0.0.0.dev9-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
wrtc-0.0.0.dev9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64, Linux glibc 2.24+ x86-64 Details
wrtc-0.0.0.dev9-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details

Total release size: 94.3 MB

Release files / wrtc-0.0.0.dev9.tar.gz

Download URL wrtc-0.0.0.dev9.tar.gz
Size 229.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7b91aba492583911d952ebb230cc53ac6dce168075f270f78a1f08e8b784d860
BLAKE2b-256 checksum
How to use checksums
f07669ac0597c08c49ff2beefb1db416fc1d36b46df011ceebbdc29557683a73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / wrtc-0.0.0.dev9-cp310-cp310-win_amd64.whl

Download URL wrtc-0.0.0.dev9-cp310-cp310-win_amd64.whl
Size 5.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
6c5c70d841c366e8c98ba244739e899a11ec25b7b8820249f2d862ae22e7f373
BLAKE2b-256 checksum
How to use checksums
9a0f5e363c718bd4c953c5eddeaf9475fa7033e377290ff0c020d753a0f67a16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Release files / wrtc-0.0.0.dev9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl

Download URL wrtc-0.0.0.dev9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Size 7.7 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
79f454e0b90dafdcc3477899e67286deb724601877632395607b39b6fa1fb26e
BLAKE2b-256 checksum
How to use checksums
0cac2b9d14c33e8559e57c516e84df0c371297287576fed1b1035baf0e671d39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

Release files / wrtc-0.0.0.dev9-cp310-cp310-macosx_11_0_arm64.whl

Download URL wrtc-0.0.0.dev9-cp310-cp310-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fde21931e0b85ef59c896d13127bb14e06910a2a9f48ec7bd3d652af7125d278
BLAKE2b-256 checksum
How to use checksums
c8b23375bf820da65f82781de6a788f70a3d93c5f34f6a04d6ff9e19e58bd19c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / wrtc-0.0.0.dev9-cp310-cp310-macosx_10_9_x86_64.whl

Download URL wrtc-0.0.0.dev9-cp310-cp310-macosx_10_9_x86_64.whl
Size 6.5 MB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
e798c05d100a51d4d0c6b20a0a47c0731e9893dc9e5b078abef944e88721cb34
BLAKE2b-256 checksum
How to use checksums
8e8c6338a29c377a5ff58cecde39d575b5bc1686984ac4d9f99670e4b73c0471
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / wrtc-0.0.0.dev9-cp39-cp39-win_amd64.whl

Download URL wrtc-0.0.0.dev9-cp39-cp39-win_amd64.whl
Size 5.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
ae86119560e409951fe01eba2a07af4a19fb5c9891ccda06e858dbb3d850a412
BLAKE2b-256 checksum
How to use checksums
736d4c228c739d46b7771734d2f03b8d8c357e333de9e8c928cec57cca24fe5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Release files / wrtc-0.0.0.dev9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl

Download URL wrtc-0.0.0.dev9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Size 7.7 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
465148c0d45c20f9461d2db70b33f70fe58375aaf76417eaee60af5388fe50a0
BLAKE2b-256 checksum
How to use checksums
6689773c85cb87d9008e457b5fa5453f8882cdba080b2c84f6fdae079f3e34c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

Release files / wrtc-0.0.0.dev9-cp39-cp39-macosx_11_0_arm64.whl

Download URL wrtc-0.0.0.dev9-cp39-cp39-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ce61001215746b41feff84a8a14283106b4d8479efc32b79ddc3e37e70b0ed12
BLAKE2b-256 checksum
How to use checksums
747b4879894d3d692b4c0341045f6d7e5896fcc2eeb8b63d79985280b822a360
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / wrtc-0.0.0.dev9-cp39-cp39-macosx_10_9_x86_64.whl

Download URL wrtc-0.0.0.dev9-cp39-cp39-macosx_10_9_x86_64.whl
Size 6.5 MB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
1417d962d2712c9d27108a62e022d11a908bc7e6589ac283e578136168fce672
BLAKE2b-256 checksum
How to use checksums
91651841254e6ba5a877e18834190832ad6f8f93693042e3ca63072f1a61b21f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / wrtc-0.0.0.dev9-cp38-cp38-win_amd64.whl

Download URL wrtc-0.0.0.dev9-cp38-cp38-win_amd64.whl
Size 5.3 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
efdb4d63b5d08419fca8cacff52ca922d6a1ee9cab91c23577b37ce9cefd63ad
BLAKE2b-256 checksum
How to use checksums
705cf5bb837d4b76675bcd23ec12e7e8c963c98df0d9a28ab078a344eeeaa246
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Release files / wrtc-0.0.0.dev9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl

Download URL wrtc-0.0.0.dev9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Size 7.7 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
5d9458754124f8b800720cab154be457a38d1256eab13d9c29fa31e9a4562f9f
BLAKE2b-256 checksum
How to use checksums
6c89579c941d6a1364b4ca186343fd3b8dd883227a71fe0dd2879a74c12fd35e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

Release files / wrtc-0.0.0.dev9-cp38-cp38-macosx_11_0_arm64.whl

Download URL wrtc-0.0.0.dev9-cp38-cp38-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.8 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e145f8e7494b67a838e63ba36b5846f23e3f39d474f839e2617188335f632d42
BLAKE2b-256 checksum
How to use checksums
7566812a8b7673b151dd78831489ae3fc9fc4834d6ad3b3ef303cf5c61c9998f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / wrtc-0.0.0.dev9-cp38-cp38-macosx_10_9_x86_64.whl

Download URL wrtc-0.0.0.dev9-cp38-cp38-macosx_10_9_x86_64.whl
Size 6.5 MB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
3d168ba88801bd3dbe32753ee567b805c91000b521aec1e41adb79083aef6ed3
BLAKE2b-256 checksum
How to use checksums
cfb9073a49b4dbc26c6fca282f81b429aed34003680f6f46c732e4a0efca03b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

Release files / wrtc-0.0.0.dev9-cp37-cp37m-win_amd64.whl

Download URL wrtc-0.0.0.dev9-cp37-cp37m-win_amd64.whl
Size 5.3 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
51076e25580bc72442a6a3ce3b4e44e707445470a30db1819d28e848b716fca0
BLAKE2b-256 checksum
How to use checksums
ae22418b3a7976896798b5e926c5295a5c19167f9243ccbdc6c7132c20f7ac50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Release files / wrtc-0.0.0.dev9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl

Download URL wrtc-0.0.0.dev9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Size 7.6 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
c90556b9cd1697a87ebc1b2cbf953c1b3f5560c4b0c84ef2f4ad26e1d73ed06b
BLAKE2b-256 checksum
How to use checksums
4cdb3cd124fcfb94d940e523f3640eda0181c23aa3727a62e9e739e6bc624b64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

Release files / wrtc-0.0.0.dev9-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL wrtc-0.0.0.dev9-cp37-cp37m-macosx_10_9_x86_64.whl
Size 6.5 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
2c725f161c974f3cae6dad579daefae0f5e5132b293af4e90897654eb0bdab53
BLAKE2b-256 checksum
How to use checksums
79f1a33277acafb9a62de29828b5cae8aea8fb16d88c9002285abd943a4e6430
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12
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