blob: 08d8a797bb685a6cc754b4f0907afe40de07bf89 [file] [log] [blame]
#!/bin/bash
set -o errexit
readonly LOG_FILE="/var/log/openvino-camera.txt"
sudo touch $LOG_FILE
exec 1>$LOG_FILE
exec 2>&1
echo $@
if [ $1 = "low" ]; then
width="320"
height="240"
else
width="640"
height="480"
fi
host="$2"
port="$3"
/usr/bin/gst-launch-1.0 rpicamsrc bitrate=1000000 ! video/x-h264,level=4,width=$width,height=$height,framerate=15/1 ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=$host port=$port