GstWebRTC - AppRTC Web Page - x86

From RidgeRun Developer Connection
Jump to: navigation, search



Previous: AppRTC Audio + Video Examples - x86 Index Next: MediaSoup Signaling Examples - x86




This page presents some AppRTC Web page on x86 platform to use AppRTC.

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

Server Setup

To run the examples first enable the Websocket server:

$GOPATH/bin/collidermain -port=8089 -tls=false

Then, enable the AppRTC Node server in a different terminal window:

cd <PATH>/apprtc-node-server
node ./bin/www

Note: Make sure you previously install dependencies needed for enable the servers, if you didn't, follow this link:

Setup AppRTC Node Server with our websocket server


AppRTC WebPage

The following figure show how to establish a call using the AppRTC web page created locally in http://localhost:8080/

To open the Webside in Chrome, disable security running the following command:

google-chrome-stable --unsafely-treat-insecure-origin-as-secure=http://webrtc.ridgerun.com:8080 --user-data-dir=/tmp/foo
Establish a WebRTC call with AppRTC WebPage
  1. Type a unique Session ID in the text bar.
  2. Press join

Note: To execute the following examples, first run the pipeline and then, press join with the correct session ID. Also make sure you reset AppRTC Node server every time you execute a WebRTC communication with the AppRTC Web Page.

x264 Send+Receive

Example

This pipeline will encode a video stream to H264 and send it to the demo web page. Additionally, it will receive the web page's video feed, in the same format.

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web \
videotestsrc is-live=true ! queue ! videoconvert ! x264enc key-int-max=1 ! rtph264pay ! queue ! web.video_sink \
web.video_src ! rtph264depay ! avdec_h264 ! videoconvert ! ximagesink async=true

x264+OPUS Send+Receive

Example

This pipeline will send an audio and a H264 video streams the demo web page. Additionally, it will receive the web page's streams, in the same format.

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web \
videotestsrc is-live=true ! queue ! videoconvert ! x264enc key-int-max=1 ! rtph264pay ! queue ! web.video_sink \
web.video_src ! rtph264depay ! avdec_h264 ! videoconvert ! ximagesink async=true \
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio_sink \
web.audio_src ! rtpopusdepay ! opusdec ! audioconvert ! alsasink async=false

VP8 Send+Receive

Example

This pipeline will encode a video stream to VP8 and send it to the demo web page. Additionally, it will receive the web page's video feed, in the same format.

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
web.video_src ! rtpvp8depay ! vp8dec ! videoconvert ! ximagesink async=true

VP8+OPUS Send+Receive

Example

This pipeline will send an audio and a Vp8 video streams the demo web page. Additionally, it will receive the web page's streams, in the same format.

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
web.video_src ! rtpvp8depay ! vp8dec ! videoconvert ! ximagesink async=true \
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio_sink \
web.audio_src ! rtpopusdepay ! opusdec ! audioconvert ! alsasink async=false



Previous: AppRTC Audio + Video Examples - x86 Index Next: MediaSoup Signaling Examples - x86