WebRTC with python

I have started putting together the basic blocks needed to create a Python WebRTC endpoint.

One is an asyncio-based Interactive Connectivity Establishment module:

https://github.com/jlaine/aioice

Another one is a Python binding for libsrtp:

https://github.com/jlaine/pylibsrtp

We also need SRTP keying support in the OpenSSL bindings:

https://github.com/pyca/cryptography/pull/4099

On top of this, we can then build an asyncio-based WebRTC implementation:

https://github.com/jlaine/aiortc

I have been able to get both Chrome and Firefox to establish an audio and video stream to a Python-based server.


What you can do is take screen shots continuously and push them to a websocket and allow your twisted server to take a gander at each one as it comes in.

I have modified some common recorders and my version takes Jpeg images and pushes them over a websocket. Feel free to use and modify how you want so that it fits your needs. Source code here. The example I use is pushing down to a libwebsocket server built in C but the same javascript could be used to send to any websocket server.