blob: f389406229516219ed548ddd0fdfa092ea37f78f [file] [log] [blame]
Shad Ansari6c155c42021-11-17 19:48:02 +00001#!/bin/bash
2set -o errexit
3
4readonly LOG_FILE="/var/log/openvino-camera.txt"
5
6sudo touch $LOG_FILE
7exec 1>$LOG_FILE
8exec 2>&1
9
10echo $@
11
12if [ $1 = "low" ]; then
13 width="320"
14 height="240"
15else
Shad Ansari35019042022-03-29 20:15:54 +000016 width="1280"
17 height="960"
18# width="640"
19# height="480"
Shad Ansari6c155c42021-11-17 19:48:02 +000020fi
21host="$2"
22port="$3"
23
24/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