GstKinesisWebRTC: Getting Started - GStreamer Pipelines
GstKinesisWebRTC Amazon Kinesis WebRTC GStreamer Plugin |
---|
Context Overview |
GstKinesisWebrtc Description |
Evaluating GstKinesisWebRTC |
Getting the code |
Building GstKinesisWebRTC |
Getting Started |
Contact Us |
Before running any of the following pipelines you need to set up the credentials using the environment variables or adding the element properties to the kinesiswebrtcbin element.
X86 (PC)
The pipelines in this section use software based elements to capture and encode.
Send Audio Only
gst-launch-1.0 audiotestsrc is-live=TRUE ! queue leaky=2 max-size-buffers=400 ! audioconvert ! audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! queue ! kinesiswebrtcbin channel=test-ridgerun
Send Video Only
gst-launch-1.0 videotestsrc is-live=true ! queue ! video/x-raw,width=640,height=480,framerate=30/1 ! vp8enc error-resilient=partitions keyframe-max-dist=10 auto-alt-ref=true cpu-used=5 deadline=1 ! queue ! kinesiswebrtcbin channel=test-ridgerun
Send Audio and Video
gst-launch-1.0 videotestsrc is-live=true ! queue ! video/x-raw,width=640,height=480,framerate=30/1 ! vp8enc error-resilient=partitions keyframe-max-dist=10 auto-alt-ref=true cpu-used=5 deadline=1 ! queue ! kinesiswebrtcbin channel=test-ridgerun name=bin audiotestsrc is-live=TRUE ! queue leaky=2 max-size-buffers=400 ! audioconvert ! audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! queue ! bin.
Receive Video Only
gst-launch-1.0 kinesiswebrtcbin channel=test-ridgerun name=bin bin.videosrc_0 ! queue ! vp8dec ! queue ! videoconvert ! ximagesink
Send-Receive Audio and Video
gst-launch-1.0 v4l2src ! videoconvert ! vp8enc error-resilient=partitions keyframe-max-dist=10 auto-alt-ref=true cpu-used=5 deadline=1 ! queue ! kinesiswebrtcbin channel=test-ridgerun name=bin alsasrc ! queue ! audioconvert ! audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! queue ! bin. bin.audiosrc_0 ! queue ! opusparse ! opusdec ! queue ! pulsesink sync=false bin.videosrc_0 ! queue ! vp8dec ! queue ! videoconvert ! ximagesink sync=false
NVIDIA Jetson Nano
The pipelines in this section use NVIDIA hardware accelerated elements to capture and encode.
Send Audio Only
gst-launch-1.0 alsasrc device=hw:2,0 ! audioconvert ! audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! queue ! kinesiswebrtcbin channel=test-ridgerun name=bin
Send Video Only
gst-launch-1.0 nvarguscamerasrc ! video/x-raw\(memory:NVMM\),width=1280,height=720,framerate=30/1 ! queue ! nvv4l2vp8enc ! queue ! kinesiswebrtcbin channel=test-ridgerun name=bin
Send Audio and Video
gst-launch-1.0 nvarguscamerasrc ! video/x-raw\(memory:NVMM\),width=1280,height=720,framerate=30/1 ! queue ! nvv4l2vp8enc ! queue ! kinesiswebrtcbin channel=test-ridgerun name=bin alsasrc device=hw:2,0 ! audioconvert ! audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! queue ! bin.
Send-Receive Audio and Video
gst-launch-1.0 nvarguscamerasrc ! video/x-raw\(memory:NVMM\),width=1280,height=720,framerate=30/1 ! queue ! nvv4l2vp8enc ! queue ! kinesiswebrtcbin channel=test-ridgerun name=bin alsasrc device=hw:2,0 ! audioconvert ! audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! queue ! bin. bin.videosrc_0 ! queue ! vp8dec ! queue ! nvvidconv ! nvoverlaysink async=false bin.audiosrc_0 ! queue ! opusparse ! opusdec ! queue ! audioconvert ! audioresample ! "audio/x-raw, layout=(string)interleaved, rate=(int)44100, format=(string)S16LE, channels=(int)2" ! alsasink device=hw:2,0 async=false