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

From RidgeRun Developer Connection
Jump to: navigation, search
m
m
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<table>
+
{{GstWebRTC/Head|previous=Audio + Video Examples - iMX6|next=Data Channel Examples - iMX6|keywords=GstRrWebRTC Examples,WebRTC Examples,GstRrWebRTC GStreamer pipelines,WebRTC GStreamer pipelines,OpenWebRTC signaler,OpenWebRTC Examples,GstRrWebRTC IMX6 examples, GstRrWebRTC IMX6 GStreamer pipelines,WebRTC IMX6 examples,WebRTC IMX6 GStreamer 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 some GstRrWebRTC Web page on '''IMX6 platform''' to use OpenWebRTC.
[[GstWebRTC - Data Channel Examples | Data Channel Examples]]|
+
<br>
[[GstWebRTC - PubNub Signaler Examples| PubNub Signaler Examples]]|
+
<br>
 
 
This page presents some GstWebRTC IMX6 examples to use OpenWebRTC.
 
  
__TOC__
+
{{GStreamer debug}}
  
 
== Connect to SimpleRTC WebPage ==
 
== Connect to SimpleRTC WebPage ==
  
 
To run the following examples, first you need to open the SimpleRTC web page in the browser.<br>
 
To run the following examples, first you need to open the SimpleRTC web page in the browser.<br>
* '''On Firefox:''' Just open the website:  http://webrtc.ridgerun.com:8080/
+
* https://webrtc.ridgerun.com:8443
* '''On Chrome:''' It's necessary to disable security for the web page, run the following command to open it:
 
  
<syntaxhighlight lang=bash>
+
The following figure show how to establish a call using the SimpleRTC web page in https://webrtc.ridgerun.com:8443/
google-chrome-stable --unsafely-treat-insecure-origin-as-secure=http://webrtc.ridgerun.com:8080 --user-data-dir=/tmp/foo
 
</syntaxhighlight>
 
  
The following figure show how to establish a call using the SimpleRTC web page in http://webrtc.ridgerun.com:8080/
+
[[File:webrtc_page.png|700px|center|Establish a WebRTC call with https://webrtc.ridgerun.com:8443/]]
 
 
[[File:webrtc_page.png|700px|center|Establish a WebRTC call with http://webrtc.ridgerun.com:8080/]]
 
  
 
# Type a unique Session ID in the text bar.
 
# Type a unique Session ID in the text bar.
Line 36: Line 23:
 
<br>
 
<br>
 
<br>
 
<br>
Following examples are tested using Firefox browser version 60.0.1 (64-bit) and Chrome browser version 66.0.3 (64-bit) for testing the demo OpenWebRTC web page.  
+
Following examples are tested using Firefox browser version 64.0 (64-bit) and Chrome browser version 71.0.3 (64-bit) for testing the demo OpenWebRTC web page.  
  
 
== OPUS Send ==
 
== OPUS Send ==
Line 44: Line 31:
  
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
gst-launch-1.0 rrwebrtcsink start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
+
gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::session_id=1234ridgerun name=web \
 
signaler::session_id=1234ridgerun name=web \
 
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio
 
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio
Line 55: Line 42:
 
This pipeline will encode a video stream to H264 and send it to the demo web page.
 
This pipeline will encode a video stream to H264 and send it to the demo web page.
  
==== For Firefox ====
+
We set the profile-level-id because the imxvpuenc_h264 don't set the profile and level for that reason the rtph264pay don't set the profile-level-id
<syntaxhighlight lang=bash>
 
gst-launch-1.0 rrwebrtcsink start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
 
signaler::session_id=1234ridgerun name=web \
 
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay pt=100 ! \
 
capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! web.video
 
</syntaxhighlight>
 
  
==== For Chrome ====
 
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
gst-launch-1.0 rrwebrtcsink start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
+
gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::session_id=1234ridgerun name=web \
 
signaler::session_id=1234ridgerun name=web \
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay pt=98 ! \
+
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay ! \
capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! web.video
+
capssetter caps="application/x-rtp,profile-level-id=(string)42c01f" ! web.video_sink
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 76: Line 56:
 
This pipeline will send a video stream and an audio stream to the demo web page.  
 
This pipeline will send a video stream and an audio stream to the demo web page.  
  
==== For Firefox ====
 
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
gst-launch-1.0 rrwebrtcsink start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
+
gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 \
 
signaler::session_id=1234ridgerun name=web \
 
signaler::session_id=1234ridgerun name=web \
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay pt=100 ! \
+
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay ! \
capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! web.video
+
capssetter caps="application/x-rtp,profile-level-id=(string)42c01f" ! web.video_sink
 
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio
 
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==== For Chrome ====
 
<syntaxhighlight lang=bash>
 
gst-launch-1.0 rrwebrtcsink start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
 
signaler::session_id=1234ridgerun name=web \
 
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay pt=98 ! \
 
capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! web.video
 
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio
 
</syntaxhighlight>
 
  
== H264+OPUS Send+Receive ==
+
== H264 Send+Receive ==
 +
 
 +
We set the profile-level-id because the imxvpuenc_h264 don't set the profile and level for that reason the rtph264pay don't set the profile-level-id
  
 
===Example===
 
===Example===
 
This pipeline will send a video stream and an audio stream to the demo web page. Additionally, it will receive the web page's video and audio feeds, in the same format.
 
This pipeline will send a video stream and an audio stream to the demo web page. Additionally, it will receive the web page's video and audio feeds, in the same format.
  
==== For Firefox ====
 
<syntaxhighlight lang=bash>
 
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 ! imxvpuenc_h264 ! rtph264pay pt=100 ! \
 
capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! web.video_sink \
 
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio_sink \
 
web.video_src ! rtph264depay ! h264parse ! imxvpudec ! queue ! imxg2dvideosink sync=false \
 
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
 
</syntaxhighlight>
 
 
==== For Chrome ====
 
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
+
gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=1234ridgerun name=web \
+
signaler::session_id=testingrr name=web \
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay pt=98 ! \
+
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay ! \  
capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! web.video_sink \
+
capssetter caps="application/x-rtp,profile-level-id=(string)42c01f" ! web.video_sink web.video_src ! rtph264depay ! h264parse ! imxvpudec ! queue ! imxg2dvideosink sync=false
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio_sink \
 
web.video_src ! rtph264depay ! h264parse ! imxvpudec ! queue ! imxg2dvideosink sync=false \
 
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
  
 
== IMX6 Limitations ==
 
== IMX6 Limitations ==
  
GstWebRTC was originally developed for x86 platform, but it's supported for IMX6 with some limitations:
+
GstRrWebRTC was originally developed for x86 platform, but it's supported for IMX6 with some limitations:
  
 
* '''Only true start-call supported:''' The pipeline needs to start the call to allow WebRTC streaming.
 
* '''Only true start-call supported:''' The pipeline needs to start the call to allow WebRTC streaming.
* '''Payload not negotiated:''' It's necessary to specify the rtp payload depending on the browser used. For Chrome select 98 and for Firefox 100.
 
 
* '''Required Capssetter:''' For IMX6 implementations it's necessary to select an specific profile level id in order to execute the video streaming.
 
* '''Required Capssetter:''' For IMX6 implementations it's necessary to select an specific profile level id in order to execute the video streaming.
  
|GstWebRTC Examples,WebRTC Examples,GstWebRTC GStreamer pipelines,WebRTC GStreamer pipelines,OpenWebRTC signaler,OpenWebRTC Examples,GstWebRTC IMX6 examples, GstWebRTC IMX6 GStreamer pipelines,WebRTC IMX6 examples,WebRTC IMX6 GStreamer pipelines}}
+
{{GstWebRTC/Foot|previous=Audio + Video Examples - iMX6|next=Data Channel Examples - iMX6}}

Latest revision as of 14:47, 13 April 2020



Previous: Audio + Video Examples - iMX6 Index Next: Data Channel Examples - iMX6




This page presents some GstRrWebRTC Web page on IMX6 platform to use OpenWebRTC.

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

Connect to SimpleRTC WebPage

To run the following examples, first you need to open the SimpleRTC web page in the browser.

The following figure show how to establish a call using the SimpleRTC web page in https://webrtc.ridgerun.com:8443/

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 to start the call after you joined in the website.

Following examples are tested using Firefox browser version 64.0 (64-bit) and Chrome browser version 71.0.3 (64-bit) for testing the demo OpenWebRTC web page.

OPUS Send

Example

This pipeline will send an audio stream 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=1234ridgerun name=web \
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio

H264 Send

Example

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

We set the profile-level-id because the imxvpuenc_h264 don't set the profile and level for that reason the rtph264pay don't set the profile-level-id

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 ! imxvpuenc_h264 ! rtph264pay ! \
capssetter caps="application/x-rtp,profile-level-id=(string)42c01f" ! web.video_sink

H264+OPUS Send

Example

This pipeline will send a video stream and an audio stream 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=1234ridgerun name=web \
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay ! \
capssetter caps="application/x-rtp,profile-level-id=(string)42c01f" ! web.video_sink
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio


H264 Send+Receive

We set the profile-level-id because the imxvpuenc_h264 don't set the profile and level for that reason the rtph264pay don't set the profile-level-id

Example

This pipeline will send a video stream and an audio stream to the demo web page. Additionally, it will receive the web page's video and audio feeds, in the same format.

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=https://webrtc.ridgerun.com:8443 \
signaler::session_id=testingrr name=web \
videotestsrc is-live=true ! imxvpuenc_h264 ! rtph264pay ! \ 
capssetter caps="application/x-rtp,profile-level-id=(string)42c01f" ! web.video_sink web.video_src ! rtph264depay ! h264parse ! imxvpudec ! queue ! imxg2dvideosink sync=false

IMX6 Limitations

GstRrWebRTC was originally developed for x86 platform, but it's supported for IMX6 with some limitations:

  • Only true start-call supported: The pipeline needs to start the call to allow WebRTC streaming.
  • Required Capssetter: For IMX6 implementations it's necessary to select an specific profile level id in order to execute the video streaming.


Previous: Audio + Video Examples - iMX6 Index Next: Data Channel Examples - iMX6