Difference between revisions of "GstWebRTC - OpenWebRTC Web Page - TX1/TX2"

From RidgeRun Developer Connection
Jump to: navigation, search
m
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
    ***This wiki page is under construction***
+
{{GstWebRTC/Head|previous=Audio + Video Examples - TX1/TX2|next=Data Channel Examples - TX1/TX2|keywords=signaling,OpenWebRTC,TX1,TX2}}
  
==Jetson TX1/TX2==
+
__TOC__
 +
 
 +
This page presents GstRrWebRTC Web page on TX1/TX2 platform to use OpenWebRTC.
 +
 
 +
==SimpleRTC WebPage==
 +
 
 +
The following figure show how to establish a call using the SimpleRTC web page in:
 +
* https://webrtc.ridgerun.com:8443 (recommended)
 +
* http://webrtc.ridgerun.com:8080
 +
 
 +
Note that browsers such as Chrome won't work with an insecure (non-https) connection.
 +
 
 +
[[File:webrtc_page.png|700px|center|Establish a WebRTC call with https://webrtc.ridgerun.com:8443]]
 +
 
 +
# Type a unique Session ID in the text bar.
 +
# Select in the check box if you want audio or video streaming.
 +
# Press join
 +
 
 +
'''Note:''' In the following examples, the start-call property on the pipeline is set to true, thus the pipeline starts the call. If start-call is set to false, you have to start the call from the website pressing the correct button.
 +
<br>
 +
<br>
 +
Following examples are tested using Firefox and Chrome browser versions 64 and 71 respectively (64-bit) for testing the demo OpenWebRTC web page.
 +
 
 +
==Example pipelines==
  
 
'''Tested in JetPack 3.3'''
 
'''Tested in JetPack 3.3'''
  
==VP8==
+
===VP8===
 +
 
 +
'''Send/receive camera stream to/from webrtc demo page, remote endpoint starts the call'''
 +
<pre style="white-space: pre-wrap;">
 +
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0  ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink web.video_src ! rtpvp8depay ! omxvp8dec ! videoconvert ! ximagesink async=true
 +
</pre>
  
'''Send camera stream to webrtc demo page (VP8 encoding)'''
+
'''Send camera stream to webrtc demo page, remote endpoint starts the call'''
 
<pre style="white-space: pre-wrap;">
 
<pre style="white-space: pre-wrap;">
 
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0  ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink
 
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0  ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink
 
</pre>
 
</pre>
  
'''Send/receive camera stream to webrtc demo page (VP8 encoding)'''
+
'''Receive camera stream from webrtc demo page, remote endpoint starts the call'''
 
<pre style="white-space: pre-wrap;">
 
<pre style="white-space: pre-wrap;">
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0  ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink web.video_src ! rtpvp8depay ! omxvp8dec ! videoconvert ! ximagesink async=true
+
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web web.video_src ! rtpvp8depay ! omxvp8dec ! videoconvert ! ximagesink async=true
 
</pre>
 
</pre>
  
==H.264==
 
  
'''Send camera stream to webrtc demo page (H264 encoding)'''
+
<pre style='background-color:light blue'>
 +
NOTE: Pipelines below have been reported to work properly on Chrome only
 +
</pre>
  
*As for JP 3.3 there is no support for "constrained-baseline" profile for the H264 encoding in the omxh264enc gstreamer element.
 
  
 +
'''Send/receive camera stream to/from webrtc demo page, browser starts the call'''
 
<pre style="white-space: pre-wrap;">
 
<pre style="white-space: pre-wrap;">
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0 ! queue ! nvvidconv ! x264enc ! rtph264pay ! queue ! web.video_sink
+
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0 ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink web.video_src ! rtpvp8depay ! omxvp8dec ! videoconvert ! ximagesink async=true
 
</pre>
 
</pre>
  
'''Send/receive camera stream to webrtc demo page (H264 encoding)'''
+
'''Send camera stream to webrtc demo page, browser starts the call'''
 +
<pre style="white-space: pre-wrap;">
 +
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0  ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink
 +
</pre>
  
 +
'''Receive camera stream from webrtc demo page, browser starts the call'''
 
<pre style="white-space: pre-wrap;">
 
<pre style="white-space: pre-wrap;">
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0 ! queue ! nvvidconv ! x264enc ! rtph264pay ! queue ! web.video_sink web.video_src ! rtph264depay ! avdec_h264 ! videoconvert ! ximagesink async=true
+
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web web.video_src ! rtpvp8depay ! omxvp8dec ! videoconvert ! ximagesink async=true
 
</pre>
 
</pre>
  
{{GstWebRTC Page|
+
===H.264===
[[GstWebRTC - Audio + Video Examples - TX1/TX2 | Audio + Video - TX1/TX2]]|
 
[[GstWebRTC - Data Channel Examples - TX1/TX2| Data Channel - TX1/TX2]]|
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
 +
*'''Note''': We set the profile-level-id because the omxh264enc don't support "constrained-baseline" profile for the H264 encoding.
  
 +
''' H264 Send '''
  
 +
'''Example'''
  
 +
This pipeline will encode a video stream to H264 and send it to the demo web page.
  
 +
<syntaxhighlight lang=bash>
 +
gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web videotestsrc is-live=true ! queue  ! nvvidconv ! omxh264enc insert-sps-pps=true ! h264parse ! rtph264pay ! capssetter caps="application/x-rtp,profile-level-id=(string)42c01f" ! queue ! web.video_sink
 +
</syntaxhighlight>
  
  
}}
+
{{GstWebRTC/Foot|previous=Audio + Video Examples - TX1/TX2|next=Data Channel Examples - TX1/TX2}}

Latest revision as of 15:40, 13 April 2020



Previous: Audio + Video Examples - TX1/TX2 Index Next: Data Channel Examples - TX1/TX2




This page presents GstRrWebRTC Web page on TX1/TX2 platform to use OpenWebRTC.

SimpleRTC WebPage

The following figure show how to establish a call using the SimpleRTC web page in:

Note that browsers such as Chrome won't work with an insecure (non-https) connection.

Establish a WebRTC call with https://webrtc.ridgerun.com:8443
  1. Type a unique Session ID in the text bar.
  2. Select in the check box if you want audio or video streaming.
  3. Press join

Note: In the following examples, the start-call property on the pipeline is set to true, thus the pipeline starts the call. If start-call is set to false, you have to start the call from the website pressing the correct button.

Following examples are tested using Firefox and Chrome browser versions 64 and 71 respectively (64-bit) for testing the demo OpenWebRTC web page.

Example pipelines

Tested in JetPack 3.3

VP8

Send/receive camera stream to/from webrtc demo page, remote endpoint starts the call

GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0  ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink web.video_src ! rtpvp8depay ! omxvp8dec ! videoconvert ! ximagesink async=true

Send camera stream to webrtc demo page, remote endpoint starts the call

GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0  ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink

Receive camera stream from webrtc demo page, remote endpoint starts the call

GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web web.video_src ! rtpvp8depay ! omxvp8dec ! videoconvert ! ximagesink async=true


NOTE: Pipelines below have been reported to work properly on Chrome only


Send/receive camera stream to/from webrtc demo page, browser starts the call

GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0  ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink web.video_src ! rtpvp8depay ! omxvp8dec ! videoconvert ! ximagesink async=true

Send camera stream to webrtc demo page, browser starts the call

GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web nvcamerasrc sensor-id=0  ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink

Receive camera stream from webrtc demo page, browser starts the call

GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web web.video_src ! rtpvp8depay ! omxvp8dec ! videoconvert ! ximagesink async=true

H.264

  • Note: We set the profile-level-id because the omxh264enc don't support "constrained-baseline" profile for the H264 encoding.

H264 Send

Example

This pipeline will encode a video stream to H264 and send it to the demo web page.

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 signaler::session_id=testid1 name=web videotestsrc is-live=true ! queue  ! nvvidconv ! omxh264enc insert-sps-pps=true ! h264parse ! rtph264pay ! capssetter caps="application/x-rtp,profile-level-id=(string)42c01f" ! queue ! web.video_sink



Previous: Audio + Video Examples - TX1/TX2 Index Next: Data Channel Examples - TX1/TX2