Difference between revisions of "GstWebRTC - PubNub Audio Examples - x86"
Line 17: | Line 17: | ||
== Opus == | == Opus == | ||
− | === | + | === Unidirectional elements === |
− | |||
− | ==== | + | ==== Example ==== |
− | < | + | In this example we use webrtcsink to send an audio stream and webrtcsrc to receive the audio stream. |
− | + | ||
− | </ | + | ==== Send Pipeline ==== |
+ | |||
+ | <syntaxhighlight lang=bash> | ||
+ | USER_CHANNEL=123 | ||
+ | PEER_CHANNEL=123peer | ||
+ | gst-launch-1.0 webrtcsink rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ | ||
+ | audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== Receive Pipeline ==== | ||
+ | |||
+ | <syntaxhighlight lang=bash> | ||
+ | USER_CHANNEL=123peer | ||
+ | PEER_CHANNEL=123 | ||
+ | gst-launch-1.0 webrtcsrc rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ | ||
+ | web.audio ! rtpopusdepay ! opusdec ! autoaudiosink | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Bidirectional elements === | ||
+ | |||
+ | ==== Example ==== | ||
+ | |||
+ | In this example we use two webrtcbins, each send an audio stream and receives each other audio stream. | ||
==== Send-Receive Pipeline ==== | ==== Send-Receive Pipeline ==== |
Revision as of 14:39, 20 February 2018
Problems running the pipelines shown on this page? |
← |
⌂ Home |
→ |
This page presents some GstWebRTC audio examples using PubNub.
Opus
Unidirectional elements
Example
In this example we use webrtcsink to send an audio stream and webrtcsrc to receive the audio stream.
Send Pipeline
USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 webrtcsink rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio
Receive Pipeline
USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 webrtcsrc rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
web.audio ! rtpopusdepay ! opusdec ! autoaudiosink
Bidirectional elements
Example
In this example we use two webrtcbins, each send an audio stream and receives each other audio stream.
Send-Receive Pipeline
USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 webrtcbin rtcp-mux=true start-call=true 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 webrtcbin rtcp-mux=true start-call=false 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
← |
⌂ Home |
→ |