GstWebRTC - OpenWebRTC Web Page - iMX6
Problems running the pipelines shown on this page? |
← |
⌂ Home |
→ |
This page presents some GstWebRTC 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.
- On Firefox: Just open the website: http://webrtc.ridgerun.com:8080/
- On Chrome: It's necessary to disable security for the web page, run the following command to open it:
google-chrome-stable --unsafely-treat-insecure-origin-as-secure=http://webrtc.ridgerun.com:8080 --user-data-dir=/tmp/foo
The following figure show how to establish a call using the SimpleRTC web page in http://webrtc.ridgerun.com:8080/
- 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 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=http://webrtc.ridgerun.com:8080 \ 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=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
For Chrome
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
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=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 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=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
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=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
For Chrome
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=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
GstWebRTC 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.
← |
⌂ Home |
→ |