GstWebRTC - PubNub Video Examples - x86: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
No edit summary
Line 22: Line 22:


In this example we use webrtcsink to send a video stream and webrtcsrc to receive the video stream.
In this example we use webrtcsink to send a video stream and webrtcsrc to receive the video stream.
==== x264 ====


<pre style="background-color:yellow">
<pre style="background-color:yellow">
Line 49: Line 47:
==== Example ====
==== Example ====
In this example we use two webrtcbins, each send a video stream and receives each other video stream.
In this example we use two webrtcbins, each send a video stream and receives each other video stream.
==== x264 ====


==== Send-Receive Pipeline ====
==== Send-Receive Pipeline ====
Line 74: Line 70:
== VP8 ==
== VP8 ==


=== Example ===
=== Unidirectional elements ===
 
==== Example ====
 
In this example we use webrtcsink to send a video stream and webrtcsrc to receive the video stream.
 
 
==== Send Pipeline ====
 
<syntaxhighlight lang=bash>
USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 -v webrtcsink 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
</syntaxhighlight>
 
==== Receive Pipeline ====
 
<syntaxhighlight lang=bash>
USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 -v webrtcsrc rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
web.video ! rtpvp8depay ! avdec_vp8 ! autovideosink
</syntaxhighlight>
 
=== Bidirectional elements ===
 
==== Example ====
In this example we use two webrtcbins, each send a video stream, and receives each other video stream.
In this example we use two webrtcbins, each send a video stream, and receives each other video stream.



Revision as of 19:35, 20 February 2018

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


Audio + Video


Home

Home



This page presents some GstWebRTC video examples using PubNub.


H264

Unidirectional elements

Example

In this example we use webrtcsink to send a video stream and webrtcsrc to receive the video stream.

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.

Send Pipeline

USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 webrtcsink 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

Receive Pipeline

USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 webrtcsrc rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web web.video ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink

Bidirectional elements

Example

In this example we use two webrtcbins, each send a video stream and receives each other video stream.

Send-Receive Pipeline

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 \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink

Send-Receive Pipeline

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 \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink

VP8

Unidirectional elements

Example

In this example we use webrtcsink to send a video stream and webrtcsrc to receive the video stream.


Send Pipeline

USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 -v webrtcsink 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

Receive Pipeline

USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 -v webrtcsrc rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
web.video ! rtpvp8depay ! avdec_vp8 ! autovideosink

Bidirectional elements

Example

In this example we use two webrtcbins, 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 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 \
web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink

Send-Receive Pipeline

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 \
web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink




Audio + Video


Home

Home