GstWebRTC - PubNub Signaling Examples - x86: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
No edit summary
Line 49: Line 49:
# Start the call
# Start the call


=== PubNub's WebRTC page ===


WebRTC provides a PubNub page that can be found the repository:
<syntaxhighlight lang='bash'>
cd gst-webrtc/tests/examples/signalers/pubnub
python3 -m http.server 8080
</syntaxhighlight>
The following show how to establish a call using the PubNub's WebRTC page in https://localhost:<Port>
# Type a unique name in the top text bar.
# Type the pipeline name in the bottom text bar.
# Select video and audio options: Disable, Send only, Receive only or Send-Receive.
# Select Data: Send-Receive or Disable
# Select Register button.
# Start the call from the pipeline or selecting the call button on the Webpage.
The following figure show how to establish a call using the official PubNub's WebRTC demo in


== VP8+Opus Send+Receive ==
== VP8+Opus Send+Receive ==

Revision as of 19:41, 19 February 2018

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


Audio + Video


Home

Home



This page shows a series of pipelines to try out the experimental PubNub support.


PubNub Demo Pages

PubNub offers a couple of test web pages to try out the WebRTC signalers.

These examples are such that audio+video is required in both ways.
There is a known issue where different pipeline parameters are required for each browser. We are working to get this fixed.

SimpleRTC WebPage

The following figure show how to establish a call using the SimpleRTC web page in https://kevingleason.me/SimpleRTC/minivid.html

Establish a WebRTC call with https://kevingleason.me/SimpleRTC/minivid.html
Establish a WebRTC call with https://kevingleason.me/SimpleRTC/minivid.html
  1. Type a unique name in the top text bar.
  2. Register that unique name to PubNub
  3. Type the pipeline name in the bottom text bar. In the examples 123 this would be $USER_CHANNEL or 123
  4. Start the call

PubNub Official Demo

The following figure show how to establish a call using the official PubNub's WebRTC demo in https://www.pubnub.com/developers/demos/webrtc/

Establish a WebRTC call with https://www.pubnub.com/developers/demos/webrtc/
Establish a WebRTC call with https://www.pubnub.com/developers/demos/webrtc/
  1. Type the pipeline's name in the bottom text bar. In the examples 123 this would be $USER_CHANNEL or 123
  2. Start the call

PubNub's WebRTC page

WebRTC provides a PubNub page that can be found the repository:

cd gst-webrtc/tests/examples/signalers/pubnub
python3 -m http.server 8080

The following show how to establish a call using the PubNub's WebRTC page in https://localhost:<Port>

  1. Type a unique name in the top text bar.
  2. Type the pipeline name in the bottom text bar.
  3. Select video and audio options: Disable, Send only, Receive only or Send-Receive.
  4. Select Data: Send-Receive or Disable
  5. Select Register button.
  6. Start the call from the pipeline or selecting the call button on the Webpage.

The following figure show how to establish a call using the official PubNub's WebRTC demo in

VP8+Opus Send+Receive

This pipeline will encode a video and audio streams to VP8 and OPUS respectively and send them to the demo web page. Additionally, it will receive the web page's video and audio feeds, in the same format.

USER_CHANNEL=123
gst-launch-1.0 webrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_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

Pipeline to Pipeline

First Endpoint

USER_CHANNEL=123
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 \
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

Second Endpoint

USER_CHANNEL=123peer
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 \
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

H264+Opus Send+Receive

This pipeline will encode a video and audio streams to H264 and OPUS accordingly and send them to the demo web page. Additionally, it will receive the web page's video and audio feeds, in the same format.

x264

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.
USER_CHANNEL=123
gst-launch-1.0 webrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_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 \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink

OpenH264

USER_CHANNEL=123
gst-launch-1.0 webrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL name=web \
videotestsrc is-live=true ! openh264enc ! \
rtph264pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay pt=111 ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink

Pipeline to Pipeline

First Endpoint

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 \
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 \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink

Second Endpoint

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 \
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 \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink




Audio + Video


Home

Home