GstWebRTC - PubNub Audio + Video Examples - x86: Difference between revisions

From RidgeRun Developer Wiki
(Created page with "<table> <tr> <td><div class="clear; float:right">__TOC__</div></td> <td valign=top> {{Debug Symbol}} Problems running the pipelines shown on this page?<br>Please see our [http...")
 
mNo edit summary
 
(21 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<table>
{{GstWebRTC/Head|previous=PubNub Video Examples - x86|next=PubNub Web Pages - x86|keywords=GstWebRTC Examples,WebRTC Examples,GstWebRTC GStreamer pipelines,WebRTC GStreamer pipelines,GstWebRTC PubNub Signaler,WebRTC PubNub Signaler,WebRTC Audio+Video Example, WebRTC GStreamer Audio+Video pipelines,GstWebRTC PubNub,GstWebRTC Audio+Video Example, GstWebRTC GStreamer Audio+Video pipelines,WebRTC PubNub,signaling}}
<tr>
<td><div class="clear; float:right">__TOC__</div></td>
<td valign=top>
{{Debug Symbol}} Problems running the pipelines shown on this page?<br>Please see our [http://developer.ridgerun.com/wiki/index.php?title=GStreamer_Debugging GStreamer Debugging guide] for help.
</td>
</table>


{{GstWebRTC Page|
This page presents the GstRrWebRTC audio and video examples on '''x86 platform''' using PubNub.
[[GstWebRTC - Audio + Video Examples|Audio + Video]]|
<br>
[[GstWebRTC|Home]]|
<br>
{{GStreamer debug}}


This page shows a series of pipelines to try out the experimental PubNub support.
== H264+Opus  ==


__TOC__
=== Unidirectional elements ===
 
==== Example ====
 
In this example, we use rrwebrtcbin to send a video stream and an audio stream, then rrwebrtcbin receive the video and audio streams.
 
==== Send Pipeline ====
 
<syntaxhighlight lang=bash>
USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink
</syntaxhighlight>


== H264+Opus  ==
==== Receive Pipeline ====


=== Example ===
<syntaxhighlight lang=bash>
In this example we use two webrtcbins, each send a video stream and an audio stream, and receives each other video and audio streams.
USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
</syntaxhighlight>


==== x264 ====
=== Bidirectional elements ===


<pre style="background-color:yellow">
==== Example ====
It seems that browsers do not get along with x264 because of SEI NAL units sent with the stream. As a workaround, we set key-int-max=1 and avoid the SEI insertions.
In this example we use two rrwebrtcbins, each send a video stream and an audio stream, and receives each other video and audio streams.
</pre>


==== Send-Receive Pipeline ====
==== Send-Receive Pipeline ====
Line 31: Line 44:
USER_CHANNEL=123
USER_CHANNEL=123
PEER_CHANNEL=123peer
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 \
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! x264enc aud=false key-int-max=1 tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
Line 43: Line 56:
USER_CHANNEL=123peer
USER_CHANNEL=123peer
PEER_CHANNEL=123
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 \
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! x264enc aud=false key-int-max=1 tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
Line 52: Line 65:
== VP8+Opus ==
== VP8+Opus ==


=== Example ===
=== Unidirectional elements ===
In this example we use two webrtcbins, each send a video stream and an audio stream, and receives each other video and audio streams.
 
==== Example ====
 
In this example, we use rrwebrtcbin to send a video stream and an audio stream, then rrwebrtcbin receive the video and audio streams.
 
==== Send Pipeline ====
 
<syntaxhighlight lang=bash>
USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink
</syntaxhighlight>
 
==== Receive Pipeline ====
 
<syntaxhighlight lang=bash>
USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
</syntaxhighlight>
 
=== Bidirectional elements ===
 
==== Example ====
In this example we use two rrwebrtcbins, each send a video stream and an audio stream, then receives each other video and audio streams.


==== Send-Receive Pipeline ====
==== Send-Receive Pipeline ====
Line 60: Line 101:
USER_CHANNEL=123
USER_CHANNEL=123
PEER_CHANNEL=123peer
PEER_CHANNEL=123peer
gst-launch-1.0 -v webrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
Line 72: Line 113:
USER_CHANNEL=123peer
USER_CHANNEL=123peer
PEER_CHANNEL=123
PEER_CHANNEL=123
gst-launch-1.0 -v webrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
Line 79: Line 120:
</syntaxhighlight>
</syntaxhighlight>


}}
 
{{GstWebRTC/Foot|previous=PubNub Video Examples - x86|next=PubNub Web Pages - x86}}

Latest revision as of 19:35, 13 April 2020




Previous: PubNub Video Examples - x86 Index Next: PubNub Web Pages - x86




This page presents the GstRrWebRTC audio and video examples on x86 platform using PubNub.

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

H264+Opus

Unidirectional elements

Example

In this example, we use rrwebrtcbin to send a video stream and an audio stream, then rrwebrtcbin receive the video and audio streams.

Send Pipeline

USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
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::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink

Bidirectional elements

Example

In this example we use two rrwebrtcbins, each send a video stream and an audio stream, and receives each other video and audio streams.

Send-Receive Pipeline

USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
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::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink

VP8+Opus

Unidirectional elements

Example

In this example, we use rrwebrtcbin to send a video stream and an audio stream, then rrwebrtcbin receive the video and audio streams.

Send Pipeline

USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
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::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink

Bidirectional elements

Example

In this example we use two rrwebrtcbins, each send a video stream and an audio stream, then receives each other video and audio streams.

Send-Receive Pipeline

USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink \
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::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink



Previous: PubNub Video Examples - x86 Index Next: PubNub Web Pages - x86