GStreamer Pipeline Samples
Warning
Please notice that these are only some pipeline samples as a guide, and depending on the hardware and architecture of robots may or may not work. Please contact our support for more help.
Video Test Pattern Generator
This is the default pipeline shown in the video dashboard widget: it uses the videotestsrc
element to generate a test pattern, overlays the current pipeline runtime as white text on top of the pattern, encodes the video to H264 using the default (CPU based) video encoder, and outputs the H264 in a suitable stream format.
videotestsrc ! video/x-raw,format=I420,width=1280,height=720 ! timeoverlay draw-shadow=false draw-outline=false deltay=20 font-desc="Sans, 42" color=0xFF000000 ! x264enc bframes=0 speed-preset=veryfast key-int-max=30 bitrate=4000 ! video/x-h264,stream-format=byte-stream,profile=constrained-baseline ! queue silent=true ! rtph264pay mtu=1400 config-interval=-1 ! application/x-rtp,media=video,clock-rate=${$channels.video.clockRate},encoding-name=${$channels.video.encodingName},ssrc=(uint)${$channels.video.SSRC} ! queue silent=true ! udpsink host=127.0.0.1 port=${$pipeline.port} sync=false async=true
This encoder is configured to generate no B-frames (so the stream will only contain I-frames and P-frames), with GOP size of 30 (one I-frame every 30 frames), and target bitrate of 4Mb/s.
Native Camera Peripherals
NVIDIA Jetson Nano with CSI Camera
nvarguscamerasrc sensor_id=0 ! nvvidconv ! omxh264enc ! h264parse ! video/x-h264,stream-format=byte-stream,profile=constrained-baseline,alignment=au ! queue silent=true ! rtph264pay mtu=1400 config-interval=-1 ! application/x-rtp,media=video,clock-rate=${$channels.video.clockRate},encoding-name=${$channels.video.encodingName},ssrc=(uint)${$channels.video.SSRC} ! queue silent=true ! udpsink host=127.0.0.1 port=${$pipeline.port} sync=false async=true
RTSP IP Cameras
Axis Q6128-E
rtspsrc location="rtsp://192.168.5.90/axis-media/media.amp?videocodec=h264&resolution=1280x720&fps=25&videobitrate=4000&compression=50" is-live=true latency=0 protocols=tcp ! rtph264depay ! video/x-h264,stream-format=avc,alignment=au,profile=baseline ! h264parse config-interval=-1 ! queue silent=true ! rtph264pay mtu=1400 config-interval=-1 ! application/x-rtp,media=video,clock-rate=${$channels.video.clockRate},encoding-name=${$channels.video.encodingName},ssrc=(uint)${$channels.video.SSRC} ! queue silent=true ! udpsink host=127.0.0.1 port=${$pipeline.port} sync=false async=true
FLIR AX8
rtspsrc is-live=true location="rtsp://192.168.5.15/avc?overlay=off" ! rtph264depay ! video/x-h264,stream-format=avc,alignment=au,profile=constrained-baseline ! queue ! h264parse config-interval=-1
! application/x-rtp,media=video,clock-rate=${$channels.video.clockRate},encoding-name=${$channels.video.encodingName},ssrc=(uint)${$channels.video.SSRC} ! queue silent=true ! udpsink host=${$pipeline.address} port=${$pipeline.port} sync=false async=true
4l2
v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=${$channels.video.width}, height=${$channels.video.height}, framerate=${$channels.video.framerate} ! queue ! videoconvert ! video/x-raw,format=I420 ! x264enc bframes=0 speed-preset=veryfast key-int-max=60 ! video/x-h264,stream-format=byte-stream ! queue silent=true ! rtph264pay mtu=1400 config-interval=-1 ! application/x-rtp,media=video,clock-rate=${$channels.video.clockRate},encoding-name=${$channels.video.encodingName},ssrc=(uint)${$channels.video.SSRC} ! queue silent=true ! udpsink host=127.0.0.1 port=${$pipeline.port} sync=false async=true
v4l2src device=/dev/video3 ! video/x-raw,format=YUY2,width=640, height=480, framerate=30/1 ! queue ! videoconvert ! video/x-raw,format=I420 ! x264enc bframes=0 speed-preset=veryfast key-int-max=60 ! video/x-h264,stream-format=byte-stream queue silent=true ! rtph264pay mtu=1400 config-interval=-1 ! application/x-rtp,media=video,clock-rate=${$channels.video.clockRate},encoding-name=${$channels.video.encodingName},ssrc=(uint)${$channels.video.SSRC} ! queue silent=true ! udpsink host=127.0.0.1 port=${$pipeline.port} sync=false async=true