GstWebRTC - OpenWebRTC Web Page - iMX6

From RidgeRun Developer Connection
Revision as of 07:38, 18 January 2019 by Spalli (talk | contribs)
Jump to: navigation, search

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


Audio + Video - iMX6


Home

Data Channel - iMX6



This page presents some GstRrWebRTC IMX6 examples to use OpenWebRTC.


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 60.0.1 (64-bit) and Chrome browser version 66.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 rrwebrtcsink 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.

For Firefox

gst-launch-1.0 rrwebrtcsink 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 pt=100 ! \
capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! web.video

For Chrome

gst-launch-1.0 rrwebrtcsink 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 pt=98 ! \
capssetter caps="application/x-rtp,profile-level-id=(string)42e01f" ! web.video

H264+OPUS Send

Example

This pipeline will send a video stream and an audio stream to the demo web page.

For Firefox

gst-launch-1.0 rrwebrtcsink 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 pt=100 ! \
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

For Chrome

gst-launch-1.0 rrwebrtcsink 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 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

H264+OPUS Send+Receive

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.

For Firefox

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 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

For Chrome

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 pt=98 ! \
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


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.
  • 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.




Audio + Video - iMX6


Home

Data Channel - iMX6