Difference between revisions of "GstWebRTC - OpenWebRTC Web Page - x86"

From RidgeRun Developer Connection
Jump to: navigation, search
Line 88: Line 88:
  
 
==Jetson TX1/TX2==
 
==Jetson TX1/TX2==
 +
 +
'''Tested in JetPack 3.2.1'''
  
 
'''Send camera stream to webrtc demo page (VP8 encoding)'''
 
'''Send camera stream to webrtc demo page (VP8 encoding)'''
Line 95: Line 97:
  
 
'''Send camera stream to webrtc demo page (H264 encoding)'''
 
'''Send camera stream to webrtc demo page (H264 encoding)'''
 +
 +
*As for JP 3.2.1 there is no support for "constrained-baseline" profile for the H264 encoding in the omxh264enc gstreamer element.
 +
 
<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=http://webrtc.ridgerun.com:8080 signaler::session_id=123456ridgerun name=web nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1' ! nvvidconv ! omxh264enc ! "video/x-h264,stream-format=(string)avc,profile=(string)baseline" ! rtph264pay ! capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! queue ! web.video_sink
 
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 signaler::session_id=123456ridgerun name=web nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1' ! nvvidconv ! omxh264enc ! "video/x-h264,stream-format=(string)avc,profile=(string)baseline" ! rtph264pay ! capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! queue ! web.video_sink
  
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 signaler::session_id=123456ridgerun name=web nvcamerasrc ! queue ! nvvidconv ! x264enc key-int-max=1 ! rtph264pay ! queue ! web.video_sink
+
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 signaler::session_id=123456ridgerun name=web nvcamerasrc ! queue ! nvvidconv ! x264enc key-int-max=1 ! "video/x-h264,stream-format=(string)avc,profile=(string)constrained-baseline" ! rtph264pay ! queue ! web.video_sink
 
</pre>
 
</pre>
 
|keywords=GstWebRTC Examples,WebRTC Examples,GstWebRTC GStreamer pipelines,WebRTC GStreamer pipelines,OpenWebRTC signaler,OpenWebRTC Examples,OpenWebRTC web page, OpenWebRTC GStreamer pipeline}}
 
|keywords=GstWebRTC Examples,WebRTC Examples,GstWebRTC GStreamer pipelines,WebRTC GStreamer pipelines,OpenWebRTC signaler,OpenWebRTC Examples,OpenWebRTC web page, OpenWebRTC GStreamer pipeline}}

Revision as of 15:33, 7 January 2019

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


Audio + Video


Home

Data Channel



This page presents some GstWebRTC Web page 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 browser versions 47.0 and 58.0.2 (64-bit) for testing the demo OpenWebRTC web page. These pipelines will not work with the newer versions of Firefox browser and also it will not work with the Chrome browser.

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=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com: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 sync=false enable-last-sample=false

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=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com: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=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com: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=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com: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

Jetson TX1/TX2

Tested in JetPack 3.2.1

Send camera stream to webrtc demo page (VP8 encoding)

GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 signaler::session_id=123456ridgerun name=web nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1' ! nvvidconv ! omxvp8enc ! rtpvp8pay ! web.video_sink

Send camera stream to webrtc demo page (H264 encoding)

  • As for JP 3.2.1 there is no support for "constrained-baseline" profile for the H264 encoding in the omxh264enc gstreamer element.
GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 signaler::session_id=123456ridgerun name=web nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420, framerate=(fraction)30/1' ! nvvidconv ! omxh264enc ! "video/x-h264,stream-format=(string)avc,profile=(string)baseline" ! rtph264pay ! capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! queue ! web.video_sink

GST_DEBUG=3 DISPLAY=:0 gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 signaler::session_id=123456ridgerun name=web nvcamerasrc ! queue ! nvvidconv ! x264enc key-int-max=1 ! "video/x-h264,stream-format=(string)avc,profile=(string)constrained-baseline" ! rtph264pay ! queue ! web.video_sink


Audio + Video


Home

Data Channel