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

From RidgeRun Developer Connection
Jump to: navigation, search
m
Line 3: Line 3:
 
[[GstWebRTC - Opus Examples | Opus]]|
 
[[GstWebRTC - Opus Examples | Opus]]|
  
This page links to the GstWebRTC audio examples using OpenWebRTC.
+
This page presents some GstWebRTC audio examples using OpenWebRTC.
  
== Examples Index ==
+
=Opus=
<html>
+
==Unidirectional Elements==
  <div class="toc" style="font-size:80%;">
+
===Example===
    <ol>
+
In this example we use webrtcsink to send an audio stream and webrtcsrc to receive the audio stream.
      <li> <a href=http://developer.ridgerun.com/wiki/index.php?title=GstWebRTC_-_Opus_Examples>Opus Examples</a></li>
+
 
    </ol>
+
====Send pipeline====
  </div>
+
The following pipeline will send periodic ticks:
</html>
+
<syntaxhighlight lang='bash'>
 +
gst-launch-1.0  webrtcsink start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
 +
signaler::session_id=1234ridgerun name=web audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample \
 +
! queue ! opusenc ! rtpopuspay ! web.audio
 +
</syntaxhighlight>
 +
 
 +
====Receive pipeline====
 +
The following pipeline will receive the periodic ticks:
 +
<syntaxhighlight lang='bash'>
 +
gst-launch-1.0 webrtcsrc start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
 +
signaler::session_id=1234ridgerun name=web web.audio ! rtpopusdepay ! opusdec ! audioconvert ! \
 +
alsasink async=false
 +
</syntaxhighlight>
 +
 
 +
When executing the two previous pipelines, you should be able to listen the ticks in the receiving computer.
 +
 
 +
<br /><br />
 +
==Bidirectional Element==
 +
===Example===
 +
In this example we use two webrtcbin 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.
 +
<syntaxhighlight lang='bash'>
 +
gst-launch-1.0 webrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
 +
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
 +
</syntaxhighlight>
 +
 
 +
====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.
 +
<syntaxhighlight lang='bash'>
 +
gst-launch-1.0 webrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
 +
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
 +
</syntaxhighlight>
 +
 
 +
When executing the two previous pipelines, you should be able to listen the ticks and the white noise.
  
 
}}
 
}}

Revision as of 17:17, 18 September 2017