GstWebRTC - PubNub Signaling Examples - x86
Problems running the pipelines shown on this page? |
← |
⌂ 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
- Type a unique name in the top text bar.
- Register that unique name to PubNub
- Type the pipeline name in the bottom text bar. In the examples 123 this would be $USER_CHANNEL or 123
- 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/
- Type the pipeline's name in the bottom text bar. In the examples 123 this would be $USER_CHANNEL or 123
- 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>
- 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
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
← |
⌂ Home |
→ |