Difference between revisions of "GstWebRTC - Video Examples - x86"
Jcaballero (talk | contribs) |
Jcaballero (talk | contribs) |
||
Line 56: | Line 56: | ||
You should be able to see two windows with a video pattern similar to Fig.1. | 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 webrtcsink to send a video stream and webrtcsrc to receive the video stream. | ||
+ | =====Send Pipeline===== | ||
+ | The following pipeline will send a color bars vp8 video stream: | ||
+ | <syntaxhighlight lang='bash'> | ||
+ | gst-launch-1.0 webrtcsink 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 ! \ | ||
+ | vp8enc ! rtpvp8pay ! queue ! identity ! web.video | ||
+ | </syntaxhighlight> | ||
+ | =====Receive Pipeline===== | ||
+ | The following pipeline will receive the video stream and display it: | ||
+ | <syntaxhighlight lang='bash'> | ||
+ | gst-launch-1.0 webrtcsrc start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \ | ||
+ | signaler::session_id=1234ridgerun name=web web.video ! rtpvp8depay ! vp8dec ! videoconvert ! \ | ||
+ | ximagesink async=true | ||
+ | </syntaxhighlight> | ||
+ | You should be able to see a video pattern similar to Fig.1. | ||
+ | |||
+ | [[File:ColorbarsWebRTC.png|thumbnail|center|Fig.1 Snapshot of video received]] | ||
+ | <br /><br /> | ||
+ | ===Bidirectional Element=== | ||
+ | ====Example==== | ||
+ | In this example we use two webrtcbin elements, each sends a video stream and receives each other video stream. | ||
+ | =====Send-Receive Pipeline===== | ||
+ | The following pipeline starts the call: | ||
+ | <syntaxhighlight lang='bash'> | ||
+ | gst-launch-1.0 webrtcbin 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 ! \ | ||
+ | vp8enc ! rtpvp8pay ! queue ! identity silent=false ! web.video_sink web.video_src ! rtpvp8depay ! \ | ||
+ | vp8dec ! videoconvert ! ximagesink async=true | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | =====Send-Receive Pipeline===== | ||
+ | The following pipeline joins the call: | ||
+ | <syntaxhighlight lang='bash'> | ||
+ | gst-launch-1.0 webrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \ | ||
+ | signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \ | ||
+ | vp8enc ! rtpvp8pay ! queue ! identity silent=false ! web.video_sink web.video_src ! rtpvp8depay \ | ||
+ | ! vp8dec ! videoconvert ! ximagesink async=true | ||
+ | </syntaxhighlight> | ||
+ | You should be able to see two windows with a video pattern similar to Fig.1. | ||
+ | |||
}} | }} |
Revision as of 10:09, 19 September 2017
← |
⌂ Home |
→ |
This page presents video examples using OpenWebRTC.
H264
Unidirectional Elements
Example
In this example we use webrtcsink to send a video stream and webrtcsrc to receive the video stream.
Send Pipeline
The following pipeline will send a color bars h264 video stream:
gst-launch-1.0 webrtcsink 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=2 ! rtph264pay ! queue ! web.video
Receive Pipeline
The following pipeline will receive the video stream and display it:
gst-launch-1.0 webrtcsrc start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
signaler::session_id=1234ridgerun name=web web.video ! rtph264depay ! avdec_h264 ! videoconvert \
! ximagesink async=true
You should be able to see a video pattern similar to Fig.1.
Bidirectional Element
Example
In this example we use two webrtcbin 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 webrtcbin 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=2 ! rtph264pay ! queue ! identity silent=false ! web.video_sink web.video_src \
! rtph264depay ! avdec_h264 ! videoconvert ! ximagesink async=true
Send-Receive Pipeline
The following pipeline joins the call:
gst-launch-1.0 webrtcbin start-call=false 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=2 ! rtph264pay ! queue ! identity silent=false ! web.video_sink web.video_src \
! rtph264depay ! avdec_h264 ! videoconvert ! ximagesink 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 webrtcsink to send a video stream and webrtcsrc to receive the video stream.
Send Pipeline
The following pipeline will send a color bars vp8 video stream:
gst-launch-1.0 webrtcsink 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 ! \
vp8enc ! rtpvp8pay ! queue ! identity ! web.video
Receive Pipeline
The following pipeline will receive the video stream and display it:
gst-launch-1.0 webrtcsrc start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
signaler::session_id=1234ridgerun name=web web.video ! rtpvp8depay ! vp8dec ! videoconvert ! \
ximagesink async=true
You should be able to see a video pattern similar to Fig.1.
Bidirectional Element
Example
In this example we use two webrtcbin 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 webrtcbin 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 ! \
vp8enc ! rtpvp8pay ! queue ! identity silent=false ! web.video_sink web.video_src ! rtpvp8depay ! \
vp8dec ! videoconvert ! ximagesink async=true
Send-Receive Pipeline
The following pipeline joins the call:
gst-launch-1.0 webrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
signaler::session_id=1234ridgerun name=web videotestsrc is-live=true ! queue ! videoconvert ! \
vp8enc ! rtpvp8pay ! queue ! identity silent=false ! web.video_sink web.video_src ! rtpvp8depay \
! vp8dec ! videoconvert ! ximagesink async=true
You should be able to see two windows with a video pattern similar to Fig.1.
← |
⌂ Home |
→ |