Difference between revisions of "GstWebRTC - PubNub Audio + Video Examples - x86"
m |
|||
Line 21: | Line 21: | ||
In this example we use rrwebrtcsink to send a video stream and an audio stream, then rrwebrtcsrc receive the video and audio streams. | In this example we use rrwebrtcsink to send a video stream and an audio stream, then rrwebrtcsrc receive the video and audio streams. | ||
− | |||
− | |||
− | |||
− | |||
==== Send Pipeline ==== | ==== Send Pipeline ==== | ||
Line 32: | Line 28: | ||
PEER_CHANNEL=123peer | PEER_CHANNEL=123peer | ||
gst-launch-1.0 rrwebrtcsink rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ | gst-launch-1.0 rrwebrtcsink rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ | ||
− | videotestsrc is-live=true ! x264enc | + | videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video \ |
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio | audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 57: | Line 53: | ||
PEER_CHANNEL=123peer | PEER_CHANNEL=123peer | ||
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ | gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ | ||
− | videotestsrc is-live=true ! x264enc | + | videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \ |
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \ | audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \ | ||
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \ | web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \ | ||
Line 69: | Line 65: | ||
PEER_CHANNEL=123 | PEER_CHANNEL=123 | ||
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ | gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \ | ||
− | videotestsrc is-live=true ! x264enc | + | videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \ |
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \ | audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \ | ||
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \ | web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \ |
Revision as of 20:29, 9 January 2019
Contents |
Problems running the pipelines shown on this page? |
← |
⌂ Home |
→ |
This page links to the GstWebRTC audio and video examples using PubNub.
H264+Opus
Unidirectional elements
Example
In this example we use rrwebrtcsink to send a video stream and an audio stream, then rrwebrtcsrc receive the video and audio streams.
Send Pipeline
USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcsink rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio
Receive Pipeline
USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 rrwebrtcsrc rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
web.video ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio ! rtpopusdepay ! opusdec ! autoaudiosink
Bidirectional elements
Example
In this example we use two rrwebrtcbins, each send a video stream and an audio stream, and receives each other video and audio streams.
Send-Receive Pipeline
USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
Send-Receive Pipeline
USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! x264enc tune=zerolatency intra-refresh=true ! "video/x-h264,profile=constrained-baseline,level=(string)3.1" ! rtph264pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
VP8+Opus
Unidirectional elements
Example
In this example we use rrwebrtcsink to send a video stream and an audio stream, then rrwebrtcsrc receive the video and audio streams.
Send Pipeline
USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcsink rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio
Receive Pipeline
USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 rrwebrtcsrc rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
web.video ! rtpvp8depay ! avdec_vp8 ! autovideosink \
web.audio ! rtpopusdepay ! opusdec ! autoaudiosink
Bidirectional elements
Example
In this example we use two rrwebrtcbins, each send a video stream and an audio stream, then receives each other video and audio streams.
Send-Receive Pipeline
USER_CHANNEL=123
PEER_CHANNEL=123peer
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=true signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
Send-Receive Pipeline
USER_CHANNEL=123peer
PEER_CHANNEL=123
gst-launch-1.0 rrwebrtcbin rtcp-mux=true start-call=false signaler::user-channel=$USER_CHANNEL signaler::peer-channel=$PEER_CHANNEL name=web \
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
audiotestsrc is-live=true ! opusenc ! rtpopuspay ! web.audio_sink \
web.video_src ! rtpvp8depay ! avdec_vp8 ! autovideosink \
web.audio_src ! rtpopusdepay ! opusdec ! autoaudiosink
← |
⌂ Home |
→ |