Difference between revisions of "GstWebRTC - Audio Examples - x86"

From RidgeRun Developer Connection
Jump to: navigation, search
m
Line 16: Line 16:
 
===Unidirectional Elements===
 
===Unidirectional Elements===
 
====Example====
 
====Example====
In this example we use rrwebrtcsink to send an audio stream and rrwebrtcsrc to receive the audio stream.
+
In this example we use rrwebrtcbin to send an audio stream.
  
 
=====Send pipeline=====
 
=====Send pipeline=====
 
The following pipeline will send periodic ticks:
 
The following pipeline will send periodic ticks:
 
<syntaxhighlight lang='bash'>
 
<syntaxhighlight lang='bash'>
gst-launch-1.0  rrwebrtcsink start-call=true signaler=GstOwrSignaler \
+
gst-launch-1.0  rrwebrtcbin start-call=true signaler=GstOwrSignaler \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::session_id=1234ridgerun name=web audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample \
 
signaler::session_id=1234ridgerun name=web audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample \
! queue ! opusenc ! rtpopuspay ! web.audio
+
! queue ! opusenc ! rtpopuspay ! web.audio_sink
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 30: Line 30:
 
The following pipeline will receive the periodic ticks:
 
The following pipeline will receive the periodic ticks:
 
<syntaxhighlight lang='bash'>
 
<syntaxhighlight lang='bash'>
gst-launch-1.0 rrwebrtcsrc start-call=false signaler=GstOwrSignaler \
+
gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web web.audio ! rtpopusdepay ! opusdec ! audioconvert ! \
+
signaler::session_id=1234ridgerun name=web web.audio_src ! rtpopusdepay ! opusdec ! audioconvert ! \
 
alsasink async=false
 
alsasink async=false
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 11:33, 14 March 2019

Error something wrong.jpg Problems running the pipelines shown on this page?
Please see our GStreamer Debugging guide for help.


OpenWebRTC Signaler Examples


Home

Video - x86



This page presents some GstRrWebRTC audio examples on x86 platform using OpenWebRTC.

Opus

Unidirectional Elements

Example

In this example we use rrwebrtcbin to send an audio stream.

Send pipeline

The following pipeline will send periodic ticks:

gst-launch-1.0  rrwebrtcbin start-call=true signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample \
! queue ! opusenc ! rtpopuspay ! web.audio_sink
Receive pipeline

The following pipeline will receive the periodic ticks:

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web web.audio_src ! rtpopusdepay ! opusdec ! audioconvert ! \
alsasink async=false

When executing the two previous pipelines, you should be able to listen the ticks in the receiving computer.



Bidirectional Element

Example

In this example we use two rrwebrtcbin elements, each sends an audio stream and receives each other audio stream.


Send-Receive Pipeline

The following pipeline will send a white noise audio stream and receive the ticks audio stream sent by the next pipeline. This pipeline starts the call.

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web audiotestsrc is-live=true wave=5 ! audioconvert ! \
audioresample ! queue ! opusenc ! rtpopuspay ! web.audio_sink web.audio_src ! rtpopusdepay ! \
opusdec ! audioconvert ! alsasink sync=false async=false
Send-Receive Pipeline

The following pipeline will send ticks audio stream and receive the white noise audio stream sent by the previous pipeline. This pipeline joins the call.

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web audiotestsrc is-live=true wave=8 ! audioconvert ! \
audioresample ! queue ! opusenc ! rtpopuspay ! web.audio_sink web.audio_src ! rtpopusdepay ! \
opusdec ! audioconvert ! alsasink sync=false async=false

When executing the two previous pipelines, you should be able to listen the ticks and the white noise.




OpenWebRTC Signaler Examples


Home

Video - x86