GStreamer Example

Description
This is a FMETP STREAM V3 feature, which allows you to receive mjpeg stream from GStreamer with example command below.

For V2, it’s also compatible with Network Type “StereoPi” under FMNetworkManager.
For V3, the network type should be “DataStream” under FMNetworkManager.
Demo scene included in V3: “Demo_GStreamerReceiver_TCP” and “Demo_GStreamerReceiver_UDP


// + GStreamer Commands(Example):
// + Desktop Capture to Unity
gst-launch-1.0 gdiscreencapsrc ! queue ! videoconvert ! video/x-raw,format=I420,framerate=30/1,width=1920,height=1080 ! jpegenc ! rndbuffersize max=1316 ! udpsink host=192.168.1.195 port=3001
// + Desktop Capture to Unity(newer gstreamer function? smaller buffer 1316)
gst-launch-1.0 -v d3d11screencapturesrc ! videoconvert ! video/x-raw,format=I420,framerate=30/1,width=1920,height=1080 ! jpegenc ! rndbuffersize max=1316 ! udpsink host=192.168.1.10 port=3001
// + Desktop Capture to Unity(newer gstreamer function? larger buffer 65500)
gst-launch-1.0 -v d3d11screencapturesrc ! videoconvert ! video/x-raw,format=I420,framerate=30/1,width=1920,height=1080 ! jpegenc ! rndbuffersize max=65500 ! udpsink host=192.168.1.10 port=3001
  
// + Video Stream to Unity
gst-launch-1.0 filesrc location="videopath.mp4" ! queue ! decodebin ! videoconvert ! jpegenc ! rndbuffersize max=1316 ! udpsink host=192.168.1.10 port=3001

// + GStreamer Commands(Example):
// + test UDP stream to Unity
gst-launch-1.0 videotestsrc ! video/x-raw,format=I420,width=1280,height=720,framerate=30/1 ! jpegenc ! rndbuffersize max=1316 ! udpsink host=127.0.0.1 port=3001

// + test TCP Stream to Unity
gst-launch-1.0 videotestsrc ! video/x-raw,format=I420,width=1920,height=1080,framerate=60/1 ! jpegenc ! multipartmux ! tcpserversink host=127.0.0.1 port=3001