Add script to start camera on Raspberry Pi
Change-Id: I7442a96e5c2f94205ed6eb20ef5df9d8470ae17e
diff --git a/bin/openvino-camera.sh b/bin/openvino-camera.sh
new file mode 100644
index 0000000..17f8bbd
--- /dev/null
+++ b/bin/openvino-camera.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+set -o errexit
+
+readonly LOG_FILE="/var/log/openvino-camera.txt"
+
+sudo touch $LOG_FILE
+exec 1>$LOG_FILE
+exec 2>&1
+
+if [[ "$HOST" != "" ]]; then
+ HOST="$1"
+else
+ HOST=10.92.2.22
+fi
+
+if [[ "$2" != "" ]]; then
+ PORT="$2"
+else
+ PORT=5000
+fi
+
+/usr/bin/gst-launch-1.0 rpicamsrc bitrate=1000000 ! video/x-h264,level=4,width=640,height=480,framerate=15/1 ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=10.92.2.22 port=$PORT