GStreamer WebRTC Wrapper - GStreamer Pipelines - Pubnub Pipelines
GStreamer WebRTC Wrapper |
---|
Introduction |
Architecture |
|
Evaluating GstWebRTCWrapper |
Getting the Code |
GStreamer Pipelines |
Other WebRTC RidgeRun products |
Contact Us |
|
Description
This page presents some GStreamer examples pipeline on supported platforms using PubNub Demo.
Bring up the PubNub Demo
Open the PubNub WebRTC Demo on a Chrome or a Chromium browser.
- Safari not yet supported
The Pubnub ID should be used to connect the GstWebRTCWrapperbin pipeline. Take PEER_CHANNEL=136' as highlighted in the image above as ID Number, for the following examples.
The ID Number will change whenever you open the PubNub WebRTC Demo, so take it into account to use the new number for PEER_CHANNEL.
x86
Unidirectional
Video
H264 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web videotestsrc is-live=true ! videoconvert ! queue ! x264enc ! rtph264pay ! queue ! web.
Video and Audio
H264 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web videotestsrc is-live=true ! videoconvert ! queue ! x264enc ! rtph264pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web.
NVIDIA Jetson devices
The following pipelines are created using NVIDIA resources like cameras, video codecs.
Unidirectional
Video
VP8 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web.
VP9 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web.
H264 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web.
Video and Audio
VP8 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web.
VP9 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web.
H264 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web.
Bidirectional
Video
VP8 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink
VP9 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. web. ! rtpvp9depay ! nvv4l2vp9dec ! nveglglessink
H264 codec
USER_CHANNEL=123 PEER_CHANNEL=136 gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. web. ! rtph264depay ! nvv4l2h264dec ! nveglglessink
Video and Audio
VP8 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
VP8 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
VP9 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp9enc ! rtpvp9pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp9depay ! nvv4l2vp9dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
H264 codec and OPUS codec
USER_CHANNEL=123 PEER_CHANNEL=136 AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2h264enc insert-sps-pps=true ! rtph264pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtph264depay ! nvv4l2h264dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
WebRTC connection along xirsys CoTurn
This example includes the Xirsys credentials to enable the Xirsys CoTurn service, the xirsys credentials are also used in the above pipelines as well. The user should be generated his/her xirsys credentials before continuing, see the Xirsys Credentials.
1. Open the Pubnub demo on the mobile device and follow the section Bring up the PubNub Demo
https://stephenlb.github.io/webrtc-sdk
2. Run the below pipeline setting the Xirsys credentials up.
USER_CHANNEL=123 PEER_CHANNEL=136 XIRSYS_IDENT=<ident> XIRSYS_SECRET=<secret> XIRSYS_CHANNEL=<channel> XIRSYS_PATH=<path> AUDIO_DEVICE="plughw:0,7" # Assign your audio device gst-launch-1.0 webrtcwrapperbin signaler=GstPubnubSignaler signaler::user-channel=$USER_CHANNEL signaler::peer_channel=$PEER_CHANNEL ice-server::ident=$XIRSYS_IDENT ice-server::secret=$XIRSYS_SECRET ice-server::channel=$XIRSYS_CHANNEL ice-server::path=$XIRSYS_PATH start-call=true name=web nvarguscamerasrc ! nvvideoconvert ! queue ! nvv4l2vp8enc ! rtpvp8pay ! queue ! web. audiotestsrc is-live=true wave=8 ! opusenc ! rtpopuspay ! queue ! web. web. ! rtpvp8depay ! nvv4l2vp8dec ! nveglglessink web. ! rtpopusdepay ! opusdec ! alsasink device=$AUDIO_DEVICE
Appendix
Find audio device
Run the command (in the terminal)
aplay -l
The output looks like
**** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: ALC262 Analog [ALC262 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0
The device for this is plughw:0,0. The two zeros come from the device 0 and Subdevice #0.
Xirsys Credentials
Go to Xirsys login panel
Note: Create a Xirsys account if you do not have one.
Go to Xirsys Dashboard services.
Take the Xirsys credentials to set up the WebRTC session.