The problem#
In my previous posts on minimal-webrtc, I set up a peer-to-peer connection between the web browsers on two different devices. For more flexibility, including making the remote camera and microphone appear as local camera and microphone devices, we need to handle the WebRTC connection outside of a web browser.
The solution#
minimal-webrtc-gstreamer
is a command-line
client for minimal-webrtc
written in Python using
the GStreamer library. It's mostly a modification of
the webrtc-sendrecv.py
demo script to use
minimal-webrtc
as the signaling server to make it easier for me to
tinker with.
Run as follows:
./minimal-webrtc-host.py\
--url "https://apps.aweirdimagination.net/camera/"\
--receiveAudio --receiveVideo any
It will output a URL as text and QR code for the other device to connect
to. With those options, the output from that device's camera will be
shown on screen and the output from its microphone will be played
through your speakers. That device will be sent video and audio test
patterns. See ./minimal-webrtc-host.py --help
for more information.