Python / asyncio implementation of WebRTC / ORTC

697 views
Skip to first unread message

Jeremy Lainé

unread,
Jul 24, 2018, 4:14:25 AM7/24/18
to discuss-webrtc
I have been working on a Python asyncio implementation of the WebRTC / ORTC APIs called aiortc [1]. The ICE code lives in a separate aioice [2] project as it is useful in its own right. Libraries such as libsrtp, libvpx and libopus are accessed via CFFI-generated wrappers so the code is highly portable between OS's.

Some features:

- Data Channels using a pure-Python / asyncio SCTP stack
- sending / receiving audio and video (VP8 / Opus / G.711)
- basic RTCP reports

While not as mature as the major WebRTC implementations, aiortc has a couple of interesting features:

- the code base is compact, making it pretty easy to hack on it
- applying processing on video frames (OpenCV!) is easy
- having its own SCTP stack (and not usrsctp) has already led to finding a crash in Firefox (now fixed!)
- there is a growing collection of examples illustrating things such as : edge detection on a live video stream, file transfer over data channels, VPN over data channels.

I'd be interested in having some extra eyeballs / hands on the code, as there a couple of topics for which I could do with some help:

- video improvements : VP8 feedback, retransmission
- audio jitterbuffer
- unified plan SDP for multiple audio/video tracks
- squeezing additional performance out of the code

If this is something you're interested in, come join the fun and open issues / PRs :)

Jeremy

Saúl Ibarra Corretgé

unread,
Jul 24, 2018, 7:58:45 AM7/24/18
to discuss...@googlegroups.com
Hi Jeremy,

Impressive work, thanks a lot for sharing!
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/75a12650-89c7-4c44-92b0-4d4e7fd75f10%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
Saúl

Sean DuBois

unread,
Jul 24, 2018, 4:48:46 PM7/24/18
to discuss...@googlegroups.com
This is fantastic, nice work Jeremy! I don't work with Python often, but excited to check it out. Especially with DataChannels I think server<->server communication could be really big for how people design systems. People can scale a lot easier if the only thing they pass is SDPs through the global message broker.

Really nice find with SCTP, I think it is really important that we start implementing these things instead of everything depending on libraries blindly.

Also if you are interested you should drop SRTP dependency! https://github.com/pions/webrtc/blob/master/internal/srtp/srtp.go I am sure there are bugs but your free to take anything (you don't need to credit, link etc..) 

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages