This repository provides a Python implementation of the Gstreamer WebRTC signalling protocol.
It provides an API close to the gstreamer API with a producer and a consumer. This allows to simply write producer/consumer examples using gstreamer signalling. It works with single producer and multiple consumers for exchanging data. See the data producer example for more details.
It also provides tools to list and monitor the peers connected to a signalling server.
Note that there is no example of audiovideo streaming. Gstreamer provides rust plugins that directly communicate with a signalling server
Simply install the package using pip:
pip install -e .
See the examples for more details.
Gstreamer signalling defines 3 roles (so the WebRTC peers are not symmetrical)
sequenceDiagram
Server-->>Producer: Welcome (PeerId)
Server-->>Consumer: Welcome (PeerId)
Producer->>Server: PeerStatusChanged # declare yourself as producer
Consumer->>Server: StartSession # with producer PeerId
Server-->>Producer: StartSession (SessionId)
Server-->>Consumer: SessionStarted (SessionId)
Producer->>Server: Peer (offer sdp)
Server-->>Consumer: Peer (offer sdp)
Consumer->>Server: Peer (answer sdp)
Server-->>Producer: Peer (answer sdp)
See this page for more details.
Please refer to our template repository for guidlines and coding style.
Development tools can be installed with
pip install -e .[dev]
The gstreamer signalling server is required to run on the localhost. Then run
pytest