GStreamer WebRTC Wrapper/GStreamer Pipelines/Pubnub Pipelines: Difference between revisions
mNo edit summary |
No edit summary |
||
(17 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{GStreamer WebRTC Wrapper/Head|next= | {{GStreamer WebRTC Wrapper/Head|next=GStreamer_Pipelines/OWR_Pipelines|previous=GStreamer_Pipelines|metakeywords=}} | ||
</noinclude> | </noinclude> | ||
<table> | |||
<tr> | |||
<td><div class="clear; float:right">__TOC__</div></td> | |||
<td valign=top> | |||
{{GStreamer debug}} | |||
</td> | |||
</table> | |||
== Description == | == Description == | ||
Line 10: | Line 18: | ||
Open the [https://stephenlb.github.io/webrtc-sdk/ PubNub WebRTC Demo] on a Chrome or a Chromium browser. | Open the [https://stephenlb.github.io/webrtc-sdk/ PubNub WebRTC Demo] on a Chrome or a Chromium browser. | ||
* Safari not yet supported | |||
<center> | <center> | ||
[[File:Pubnub demo image.png|500px]]<br> | [[File:Pubnub demo image.png|500px]]<br> | ||
'''Figure | '''Figure 1.''' Pubnub Web Demo | ||
</center> | |||
The Pubnub ID should be used to connect the GstWebRTCWrapperbin pipeline. Take '''PEER_CHANNEL=136'''' as highlighted in the image above as '''ID Number''', for the following examples. | |||
<center> | |||
[[File:Expected output of a working webrtc-wrapper.png|500px]]<br> | |||
'''Figure 2.''' WebRTC-Wrapper on work | |||
</center> | </center> | ||
The '''ID Number''' will change whenever you open the [https://stephenlb.github.io/webrtc-sdk/ PubNub WebRTC Demo], so take it into account to use the new number for '''PEER_CHANNEL'''. | |||
== x86 == | |||
=== Unidirectional === | === Unidirectional === | ||
==== Video ==== | ==== Video ==== | ||
---- | |||
===== H264 codec ===== | |||
<syntaxhighlight lang=bash> | |||
USER_CHANNEL=123 | |||
PEER_CHANNEL=136 | |||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web videotestsrc is-live=true ! videoconvert ! queue ! x264enc ! rtph264pay ! queue ! web. | |||
</syntaxhighlight> | |||
==== Video and Audio ==== | |||
---- | |||
===== H264 codec and OPUS codec ===== | |||
<syntaxhighlight lang=bash> | |||
USER_CHANNEL=123 | |||
PEER_CHANNEL=136 | |||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web videotestsrc is-live=true ! videoconvert ! queue ! x264enc ! rtph264pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. | |||
</syntaxhighlight> | |||
== NVIDIA Jetson devices == | |||
The following pipelines are created using NVIDIA resources like cameras, video codecs. | |||
=== Unidirectional === | |||
==== Video ==== | |||
---- | |||
===== VP8 codec ===== | ===== VP8 codec ===== | ||
Line 32: | Line 84: | ||
PEER_CHANNEL=136 | PEER_CHANNEL=136 | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 41: | Line 93: | ||
PEER_CHANNEL=136 | PEER_CHANNEL=136 | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 50: | Line 102: | ||
PEER_CHANNEL=136 | PEER_CHANNEL=136 | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Video and Audio ==== | ==== Video and Audio ==== | ||
---- | |||
===== VP8 codec and OPUS codec ===== | ===== VP8 codec and OPUS codec ===== | ||
Line 61: | Line 114: | ||
PEER_CHANNEL=136 | PEER_CHANNEL=136 | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 70: | Line 123: | ||
PEER_CHANNEL=136 | PEER_CHANNEL=136 | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 79: | Line 132: | ||
PEER_CHANNEL=136 | PEER_CHANNEL=136 | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 85: | Line 138: | ||
==== Video ==== | ==== Video ==== | ||
---- | |||
===== VP8 codec ===== | ===== VP8 codec ===== | ||
Line 92: | Line 147: | ||
PEER_CHANNEL=136 | PEER_CHANNEL=136 | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 101: | Line 156: | ||
PEER_CHANNEL=136 | PEER_CHANNEL=136 | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. web. ! rtpvp9depay ! nvv4l2vp9dec ! nveglglessink | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 110: | Line 165: | ||
PEER_CHANNEL=136 | PEER_CHANNEL=136 | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. web. ! rtph264depay ! nvv4l2h264dec ! nveglglessink | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Video and Audio ==== | ==== Video and Audio ==== | ||
---- | |||
===== VP8 codec and OPUS codec ===== | ===== VP8 codec and OPUS codec ===== | ||
Line 122: | Line 179: | ||
AUDIO_DEVICE="plughw:0,7" # Assign your audio device | AUDIO_DEVICE="plughw:0,7" # Assign your audio device | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 132: | Line 189: | ||
AUDIO_DEVICE="plughw:0,7" # Assign your audio device | AUDIO_DEVICE="plughw:0,7" # Assign your audio device | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 142: | Line 199: | ||
AUDIO_DEVICE="plughw:0,7" # Assign your audio device | AUDIO_DEVICE="plughw:0,7" # Assign your audio device | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp9depay ! nvv4l2vp9dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 152: | Line 209: | ||
AUDIO_DEVICE="plughw:0,7" # Assign your audio device | AUDIO_DEVICE="plughw:0,7" # Assign your audio device | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtph264depay ! nvv4l2h264dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== WebRTC connection along xirsys CoTurn ==== | ==== WebRTC connection along xirsys CoTurn ==== | ||
This example includes the Xirsys credentials to enable the Xirsys CoTurn service, the xirsys credentials | This example includes the Xirsys credentials to enable the Xirsys CoTurn service, the xirsys credentials are also used in the above pipelines as well. The user should be generated his/her xirsys credentials before continuing, see the [https://developer.ridgerun.com/wiki/index.php?title=GStreamer_WebRTC_Wrapper/GStreamer_Pipelines/Pubnub_Pipelines#Xirsys_Credentials Xirsys Credentials]. | ||
1. Open the Pubnub demo on the mobile device and follow the section [https://developer.ridgerun.com/wiki/index.php?title=GStreamer_WebRTC_Wrapper/GStreamer_Pipelines/Pubnub_Pipelines#Bring_up_the_PubNub_Demo Bring up the PubNub Demo] | 1. Open the Pubnub demo on the mobile device and follow the section [https://developer.ridgerun.com/wiki/index.php?title=GStreamer_WebRTC_Wrapper/GStreamer_Pipelines/Pubnub_Pipelines#Bring_up_the_PubNub_Demo Bring up the PubNub Demo] | ||
Line 163: | Line 221: | ||
https://stephenlb.github.io/webrtc-sdk | https://stephenlb.github.io/webrtc-sdk | ||
2. Run the below pipeline setting the Xirsys credentials up. | 2. Run the below pipeline setting the Xirsys credentials up. | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
Line 175: | Line 233: | ||
AUDIO_DEVICE="plughw:0,7" # Assign your audio device | AUDIO_DEVICE="plughw:0,7" # Assign your audio device | ||
gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL ice-server::ident=$XIRSYS_IDENT ice-server::secret=$XIRSYS_SECRET ice-server::channel=$XIRSYS_CHANNEL ice-server::path=$XIRSYS_PATH start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! | gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL ice-server::ident=$XIRSYS_IDENT ice-server::secret=$XIRSYS_SECRET ice-server::channel=$XIRSYS_CHANNEL ice-server::path=$XIRSYS_PATH start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 208: | Line 266: | ||
</center> | </center> | ||
'''Note''': Create a Xirsys account if you do not have | '''Note''': Create a Xirsys account if you do not have one. | ||
Go to Xirsys Dashboard services. | Go to Xirsys Dashboard services. | ||
Line 219: | Line 277: | ||
Take the Xirsys credentials to set up the WebRTC session. | Take the Xirsys credentials to set up the WebRTC session. | ||
<noinclude>{{GStreamer WebRTC Wrapper/Foot|GStreamer_Pipelines|GStreamer_Pipelines/OWR_Pipelines}}</noinclude> | |||
<br> | |||
< | |||
</ | |||
< | |||
[[Category:GStreamer WebRTC Wrapper]] | [[Category:GStreamer WebRTC Wrapper]] |
Latest revision as of 20:29, 18 May 2023
GStreamer WebRTC Wrapper |
---|
Introduction |
Architecture |
|
Evaluating GstWebRTCWrapper |
Getting the Code |
GStreamer Pipelines |
Other WebRTC RidgeRun products |
Contact Us |
|
Description
This page presents some GStreamer examples pipeline on supported platforms using PubNub Demo.
Bring up the PubNub Demo
Open the PubNub WebRTC Demo on a Chrome or a Chromium browser.
- Safari not yet supported
The Pubnub ID should be used to connect the GstWebRTCWrapperbin pipeline. Take PEER_CHANNEL=136' as highlighted in the image above as ID Number, for the following examples.
The ID Number will change whenever you open the PubNub WebRTC Demo, so take it into account to use the new number for PEER_CHANNEL.
x86
Unidirectional
Video
H264 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web videotestsrc is-live=true ! videoconvert ! queue ! x264enc ! rtph264pay ! queue ! web.
Video and Audio
H264 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web videotestsrc is-live=true ! videoconvert ! queue ! x264enc ! rtph264pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web.
NVIDIA Jetson devices
The following pipelines are created using NVIDIA resources like cameras, video codecs.
Unidirectional
Video
VP8 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web.
VP9 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web.
H264 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web.
Video and Audio
VP8 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web.
VP9 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web.
H264 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web.
Bidirectional
Video
VP8 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink
VP9 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. web. ! rtpvp9depay ! nvv4l2vp9dec ! nveglglessink
H264 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. web. ! rtph264depay ! nvv4l2h264dec ! nveglglessink
Video and Audio
VP8 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
VP8 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
VP9 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp9depay ! nvv4l2vp9dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
H264 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtph264depay ! nvv4l2h264dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
WebRTC connection along xirsys CoTurn
This example includes the Xirsys credentials to enable the Xirsys CoTurn service, the xirsys credentials are also used in the above pipelines as well. The user should be generated his/her xirsys credentials before continuing, see the Xirsys Credentials.
1. Open the Pubnub demo on the mobile device and follow the section Bring up the PubNub Demo
https://stephenlb.github.io/webrtc-sdk
2. Run the below pipeline setting the Xirsys credentials up.
USER_CHANNEL=123 PEER_CHANNEL=136 XIRSYS_IDENT=<ident> XIRSYS_SECRET=<secret> XIRSYS_CHANNEL=<channel> XIRSYS_PATH=<path> AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL ice-server::ident=$XIRSYS_IDENT ice-server::secret=$XIRSYS_SECRET ice-server::channel=$XIRSYS_CHANNEL ice-server::path=$XIRSYS_PATH start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
Appendix
Find audio device
Run the command (in the terminal)
aplay -l
The output looks like
**** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: ALC262 Analog [ALC262 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0
The device for this is plughw:0,0. The two zeros come from the device 0 and Subdevice #0.
Xirsys Credentials
Go to Xirsys login panel
Note: Create a Xirsys account if you do not have one.
Go to Xirsys Dashboard services.
Take the Xirsys credentials to set up the WebRTC session.