Skip to content

Example Pipelines

Alex Lennon edited this page Sep 28, 2018 · 28 revisions

Raspberry Pi

Video Only

  • Show a test video pattern on the local display

gst-launch-1.0 videotestsrc ! video/x-raw,width=1280,height=1024 ! fbdevsink

  • Show video image from PiCam on local display (needs custom rpicamsrc plugin installed)

gst-launch-1.0 -v rpicamsrc ! video/x-raw,width=1280,height=1024 ! fakesink

  • Stream RTMP (h.264/FLV) test pattern to Restreamer.io. 720p seems standard streaming resolution

gst-launch-1.0 videotestsrc ! omxh264enc ! video/x-h264,width=1280,height=720,framerate=25/1 ! h264parse ! flvmux streamable=true name=mux ! queue ! rtmpsink location='rtmp://$STREAM_URL/$STREAM_KEY live=1 flashver=FME/3.0%20(compatible;%20FMSc%201.0)'

  • Stream RTMP (h.264/FLV) Pi Cam image to Restreamer.io. 720p seems standard streaming resolution

gst-launch-1.0 rpicamsrc keyframe-interval=2 ! video/x-h264,width=1280,height=720,framerate=25/1 ! h264parse ! flvmux streamable=true name=mux ! queue ! rtmpsink location='rtmp://$STREAM_URL/$STREAM_KEY live=1 flashver=FME/3.0%20(compatible;%20FMSc%201.0)'

Audio Only

NB. This isn't working on the cloud side, I think as there's no video

gst-launch-1.0 -v audiotestsrc is-live=true ! audio/x-raw, format=\(string\)S16LE, endianness=\(int\)1234, signed=\(boolean\)true, width=\(int\)16, depth=\(int\)16, rate=\(int\)16000, channels=\(int\)1 ! queue ! voaacenc bitrate=128 ! aacparse ! audio/mpeg,mpegversion=4,stream-format=raw ! queue ! flvmux streamable=true ! queue ! rtmpsink location='rtmp://$STREAM_URL/$STREAM_KEY live=1 flashver=FME/3.0%20(compatible;%20FMSc%201.0)'

Audio & Video

gst-launch-1.0 audiotestsrc is-live=true ! audio/x-raw, format=\(string\)S16LE, endianness=\(int\)1234, signed=\(boolean\)true, width=\(int\)16, depth=\(int\)16, rate=\(int\)16000, channels=\(int\)1 ! queue ! voaacenc bitrate=128 ! aacparse ! audio/mpeg,mpegversion=4,stream-format=raw ! queue ! mux. rpicamsrc keyframe-interval=2 ! video/x-h264,width=1280,height=720,framerate=25/1 ! h264parse ! queue ! flvmux streamable=true name=mux ! queue ! rtmpsink location='rtmp://$STREAM_URL/$STREAM_KEY live=1 flashver=FME/3.0%20(compatible;%20FMSc%201.0)'

Flip video

gst-launch-1.0 audiotestsrc is-live=true ! audio/x-raw, format=\(string\)S16LE, endianness=\(int\)1234, signed=\(boolean\)true, width=\(int\)16, depth=\(int\)16, rate=\(int\)16000, channels=\(int\)1 ! queue ! voaacenc bitrate=128 ! aacparse ! audio/mpeg,mpegversion=4,stream-format=raw ! queue ! mux. rpicamsrc keyframe-interval=2 vflip=true hflip=true ! video/x-h264,width=1280,height=720,framerate=25/1 ! h264parse ! queue ! flvmux streamable=true name=mux ! queue ! rtmpsink location='rtmp://$STREAM_URL/$STREAM_KEY live=1 flashver=FME/3.0%20(compatible;%20FMSc%201.0)'

Laptop

Webcam

View MJPEG supporting laptop webcam on screen

gst-launch-1.0 v4l2src ! image/jpeg,width=320,framerate=15/1,rate=15 ! jpegdec ! autovideoconvert ! ximagesink

Clone this wiki locally