GstWebRTC - PubNub Audio Examples - x86
GstWebRTC | ||||||||
---|---|---|---|---|---|---|---|---|
WebRTC Fundamentals | ||||||||
GstWebRTC Basics | ||||||||
|
||||||||
Evaluating GstWebRTC | ||||||||
Getting the code | ||||||||
Building GstWebRTC | ||||||||
Examples | ||||||||
|
||||||||
MCU Demo Application | ||||||||
Contact Us |
This page presents some GstRrWebRTC audio examples on x86 platform using PubNub.
Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help. |
Opus
Unidirectional elements
Example
In this example, we use rrwebrtcbin to send an audio stream and rrwebrtcbin to receive the audio stream.
Send Pipeline
USER_CHANNEL=123 PEER_CHANNEL=123peer gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler=GstPubnubSignaler \ signaler::server_url=https://webrtc.ridgerun.com:7443 \ signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink
Receive Pipeline
USER_CHANNEL=123peer PEER_CHANNEL=123 gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler=GstPubnubSignaler \ signaler::server_url=https://webrtc.ridgerun.com:7443 \ signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
Bidirectional elements
Example
In this example we use two rrwebrtcbins, each send an audio stream and receives each other audio stream.
Send-Receive Pipeline
USER_CHANNEL=123 PEER_CHANNEL=123peer gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler=GstPubnubSignaler \ signaler::server_url=https://webrtc.ridgerun.com:7443 \ signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \ web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
Send-Receive Pipeline
USER_CHANNEL=123peer PEER_CHANNEL=123 gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler=GstPubnubSignaler \ signaler::server_url=https://webrtc.ridgerun.com:7443 \ signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \ web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink