Difference between revisions of "GstWebRTC - Video Examples - x86"

From RidgeRun Developer Connection
Jump to: navigation, search
m
m
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table>
+
{{GstWebRTC/Head|previous=Audio Examples - x86|next=Audio + Video Examples - x86|keywords=GstWebRTC Examples,WebRTC Examples,GstWebRTC GStreamer pipelines,WebRTC GStreamer pipelines,OpenWebRTC signaler,OpenWebRTC Examples,WebRTC Video Example,WebRTC GStreamer Video pipelines,GstWebRTC GStreamer Video pipelines,signaling}}
<tr>
 
<td><div class="clear; float:right">__TOC__</div></td>
 
<td valign=top>
 
{{Debug Symbol}} Problems running the pipelines shown on this page?<br>Please see our [http://developer.ridgerun.com/wiki/index.php?title=GStreamer_Debugging GStreamer Debugging guide] for help.
 
</td>
 
</table>
 
  
{{GstWebRTC Page|
+
This page presents video examples on '''x86 platform''' using OpenWebRTC.
[[GstWebRTC - Audio Examples - x86|Audio]]|
+
<br>
[[GstWebRTC - Audio + Video Examples - x86 |Audio + Video]]|
+
<br>
  
This page presents video examples on '''x86 platform''' using OpenWebRTC.
+
{{GStreamer debug}}
  
 
==H264==
 
==H264==
 
===Unidirectional Elements===
 
===Unidirectional Elements===
 
====Example====
 
====Example====
In this example we use rrwebrtcsink to send a video stream and rrwebrtcsrc to receive the video stream.
+
In this example we use rrwebrtcbin to send a video stream and rrwebrtcbin to receive the video stream.
  
 
=====Send Pipeline=====
 
=====Send Pipeline=====
 
The following pipeline will send a color bars h264 video stream:
 
The following pipeline will send a color bars h264 video stream:
 
<syntaxhighlight lang='bash'>
 
<syntaxhighlight lang='bash'>
gst-launch-1.0 rrwebrtcsink start-call=true signaler=GstOwrSignaler \
+
gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
 
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
x264enc key-int-max=2 ! rtph264pay ! queue ! web.video
+
x264enc key-int-max=2 ! rtph264pay ! queue ! web.video_sink
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 30: Line 24:
 
The following pipeline will receive the video stream and display it:
 
The following pipeline will receive the video stream and display it:
 
<syntaxhighlight lang='bash'>
 
<syntaxhighlight lang='bash'>
gst-launch-1.0 rrwebrtcsrc start-call=false signaler=GstOwrSignaler \
+
gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web web.video ! rtph264depay ! avdec_h264 ! videoconvert \
+
signaler::session_id=1234ridgerun name=web web.video_src ! rtph264depay ! avdec_h264 ! videoconvert \
 
! ximagesink async=true
 
! ximagesink async=true
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 72: Line 66:
 
===Unidirectional Elements===
 
===Unidirectional Elements===
 
====Example====
 
====Example====
In this example we use rrwebrtcsink to send a video stream and rrwebrtcsrc to receive the video stream.
+
In this example we use rrwebrtcbin to send a video stream and rrwebrtcbin to receive the video stream.
 
=====Send Pipeline=====
 
=====Send Pipeline=====
 
The following pipeline will send a color bars vp8 video stream:
 
The following pipeline will send a color bars vp8 video stream:
 
<syntaxhighlight lang='bash'>
 
<syntaxhighlight lang='bash'>
gst-launch-1.0 rrwebrtcsink start-call=true signaler=GstOwrSignaler \
+
gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
 
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
vp8enc ! rtpvp8pay ! queue ! web.video
+
vp8enc ! rtpvp8pay ! queue ! web.video_sink
 
</syntaxhighlight>
 
</syntaxhighlight>
 
=====Receive Pipeline=====
 
=====Receive Pipeline=====
 
The following pipeline will receive the video stream and display it:
 
The following pipeline will receive the video stream and display it:
 
<syntaxhighlight lang='bash'>
 
<syntaxhighlight lang='bash'>
gst-launch-1.0 rrwebrtcsrc start-call=false signaler=GstOwrSignaler \
+
gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web web.video ! rtpvp8depay ! vp8dec ! videoconvert ! \
+
signaler::session_id=1234ridgerun name=web web.video_src ! rtpvp8depay ! vp8dec ! videoconvert ! \
 
ximagesink async=true
 
ximagesink async=true
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 116: Line 110:
 
You should be able to see two windows with a video pattern similar to Fig.1.
 
You should be able to see two windows with a video pattern similar to Fig.1.
  
|keywords=GstWebRTC Examples,WebRTC Examples,GstWebRTC GStreamer pipelines,WebRTC GStreamer pipelines,OpenWebRTC signaler,OpenWebRTC Examples,WebRTC Video Example,WebRTC GStreamer Video pipelines,GstWebRTC GStreamer Video pipelines}}
+
{{GstWebRTC/Foot|previous=Audio Examples - x86|next=Audio + Video Examples - x86}}

Latest revision as of 14:11, 13 April 2020



Previous: Audio Examples - x86 Index Next: Audio + Video Examples - x86




This page presents video examples on x86 platform using OpenWebRTC.

Error something wrong.jpg 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

The following pipeline will send a color bars h264 video stream:

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
x264enc key-int-max=2 ! rtph264pay ! queue ! web.video_sink
Receive Pipeline

The following pipeline will receive the video stream and display it:

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web web.video_src ! rtph264depay ! avdec_h264 ! videoconvert \
! ximagesink async=true

You should be able to see a video pattern similar to Fig.1.

Fig.1 Snapshot of video received




Bidirectional Element

Example

In this example we use two rrwebrtcbin elements, each sends a video stream and receives each other video stream.


Send-Receive Pipeline

The following pipeline starts the call:

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
x264enc key-int-max=2 ! rtph264pay ! queue ! web.video_sink web.video_src \
! rtph264depay ! avdec_h264 ! videoconvert ! ximagesink async=true


Send-Receive Pipeline

The following pipeline joins the call:

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
x264enc key-int-max=2 ! rtph264pay ! queue ! web.video_sink web.video_src \
! rtph264depay ! avdec_h264 ! videoconvert ! ximagesink async=true

You should be able to see two windows with a video pattern similar to Fig.1.

VP8

Unidirectional Elements

Example

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

Send Pipeline

The following pipeline will send a color bars vp8 video stream:

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
vp8enc ! rtpvp8pay ! queue ! web.video_sink
Receive Pipeline

The following pipeline will receive the video stream and display it:

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web web.video_src ! rtpvp8depay ! vp8dec ! videoconvert ! \
ximagesink async=true

You should be able to see a video pattern similar to Fig.1.



Bidirectional Element

Example

In this example we use two rrwebrtcbin elements, each sends a video stream and receives each other video stream.

Send-Receive Pipeline

The following pipeline starts the call:

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
vp8enc ! rtpvp8pay ! queue ! web.video_sink web.video_src ! rtpvp8depay ! \
vp8dec ! videoconvert ! ximagesink async=true
Send-Receive Pipeline

The following pipeline joins the call:

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler \
signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
vp8enc ! rtpvp8pay ! queue ! web.video_sink web.video_src ! rtpvp8depay \
! vp8dec ! videoconvert ! ximagesink async=true

You should be able to see two windows with a video pattern similar to Fig.1.


Previous: Audio Examples - x86 Index Next: Audio + Video Examples - x86