GstWebRTC - PubNub Video Examples - x86
GstWebRTC | ||||||||
---|---|---|---|---|---|---|---|---|
WebRTC Fundamentals | ||||||||
GstWebRTC Basics | ||||||||
|
||||||||
Evaluating GstWebRTC | ||||||||
Getting the code | ||||||||
Building GstWebRTC | ||||||||
Examples | ||||||||
|
||||||||
MCU Demo Application | ||||||||
Contact Us |
This page presents some GstRrWebRTC video examples on x86 platform using PubNub.
Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help. |
H264
Unidirectional elements
Example
In this example, we use rrwebrtcbin to send a video stream and rrwebrtcbin to receive the video stream.
Send Pipeline
USER_CHANNEL=123 PEER_CHANNEL=123peer gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::server_url=https://webrtc.ridgerun.com:7443 \ 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
Receive Pipeline
USER_CHANNEL=123peer PEER_CHANNEL=123 gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::server_url=https://webrtc.ridgerun.com:7443 \ signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
Bidirectional elements
Example
In this example we use two rrwebrtcbins, each send a video stream and receives each other video stream.
Send-Receive Pipeline
USER_CHANNEL=123 PEER_CHANNEL=123peer gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::server_url=https://webrtc.ridgerun.com:7443 \ 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 \ web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
Send-Receive Pipeline
USER_CHANNEL=123peer PEER_CHANNEL=123 gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::server_url=https://webrtc.ridgerun.com:7443 \ 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 \ web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
VP8
Unidirectional elements
Example
In this example, we use rrwebrtcbin to send a video stream and rrwebrtcbin to receive the video stream.
Send Pipeline
USER_CHANNEL=123 PEER_CHANNEL=123peer gst-launch-1.0 -v rrwebrtcbin rtcp-mux=true start-call=true signaler::server_url=https://webrtc.ridgerun.com:7443 \ signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink
Receive Pipeline
USER_CHANNEL=123peer PEER_CHANNEL=123 gst-launch-1.0 -v rrwebrtcbin rtcp-mux=true start-call=false signaler::server_url=https://webrtc.ridgerun.com:7443 \ signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink
Bidirectional elements
Example
In this example we use two rrwebrtcbins, each send a video stream, and receives each other video stream.
Send-Receive Pipeline
USER_CHANNEL=123 PEER_CHANNEL=123peer gst-launch-1.0 -v rrwebrtcbin rtcp-mux=true start-call=true signaler::server_url=https://webrtc.ridgerun.com:7443 \ signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \ web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink
Send-Receive Pipeline
USER_CHANNEL=123peer PEER_CHANNEL=123 gst-launch-1.0 -v rrwebrtcbin rtcp-mux=true start-call=false signaler::server_url=https://webrtc.ridgerun.com:7443 \ signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \ web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink