Jump to content

GstWebRTC - AppRTC Video Examples - x86

From RidgeRun Developer Wiki



Previous: AppRTC Audio Examples - x86 Index Next: AppRTC Audio + Video Examples - x86




This page presents video examples on x86 platform using AppRTC.

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


Server Setup

To run the examples first enable the Websocket server:

$GOPATH/bin/collidermain -port=8089 -tls=false

Then, enable the AppRTC Node server in a different terminal window:

cd <PATH>/apprtc-node-server
node ./bin/www

Note: Make sure you previously install dependencies needed for enable the servers, if you didn't, follow this link:

Setup AppRTC Node Server with our websocket server

H264

Unidirectional Elements

Example

In this example we use rrwebrtcbin to send a video stream and rrwebrtcbin to receive the video stream.

Send Pipeline

The following pipeline will send a color bars h264 video stream:

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! videoconvert ! \
x264enc key-int-max=2 ! rtph264pay ! web.video_sink
Receive Pipeline

The following pipeline will receive the video stream and display it:

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web web.video_src ! rtph264depay ! avdec_h264 ! videoconvert ! \
xvimagesink async=true

You should be able to see a video pattern similar to Fig.1.

Fig.1 Snapshot of video received




Bidirectional Element

Example

In this example we use two rrwebrtcbin elements, each sends a video stream and receives each other video stream.


Send-Receive Pipeline

The following pipeline starts the call:

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! videoconvert ! \
x264enc key-int-max=2 ! rtph264pay ! web.video_sink \
web.video_src ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink async=true


Send-Receive Pipeline

The following pipeline joins the call:

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! videoconvert ! \
x264enc key-int-max=2 ! rtph264pay ! web.video_sink \
web.video_src ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink async=true

You should be able to see two windows with a video pattern similar to Fig.1.

VP8

Unidirectional Elements

Example

In this example we use rrwebrtcbin to send a video stream and rrwebrtcbin to receive the video stream.

Send Pipeline

The following pipeline will send a color bars vp8 video stream:

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink
Receive Pipeline

The following pipeline will receive the video stream and display it:

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web web.video_src ! rtpvp8depay ! vp8dec ! videoconvert ! xvimagesink async=true

You should be able to see a video pattern similar to Fig.1.



Bidirectional Element

Example

In this example we use two rrwebrtcbin elements, each sends a video stream and receives each other video stream.

Send-Receive Pipeline

The following pipeline starts the call:

gst-launch-1.0 rrwebrtcbin start-call=true signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
web.video_src ! rtpvp8depay ! vp8dec ! videoconvert ! xvimagesink async=true
Send-Receive Pipeline

The following pipeline joins the call:

gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstApprtcSignaler signaler::server_url=http://localhost:8080 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
web.video_src ! rtpvp8depay ! vp8dec ! videoconvert ! xvimagesink async=true

You should be able to see two windows with a video pattern similar to Fig.1.



Previous: AppRTC Audio Examples - x86 Index Next: AppRTC Audio + Video Examples - x86


Cookies help us deliver our services. By using our services, you agree to our use of cookies.