| Shad Ansari | 6c155c4 | 2021-11-17 19:48:02 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -o errexit | ||||
| 3 | |||||
| 4 | readonly LOG_FILE="/var/log/openvino-camera.txt" | ||||
| 5 | |||||
| 6 | sudo touch $LOG_FILE | ||||
| 7 | exec 1>$LOG_FILE | ||||
| 8 | exec 2>&1 | ||||
| 9 | |||||
| 10 | echo $@ | ||||
| 11 | |||||
| 12 | if [ $1 = "low" ]; then | ||||
| 13 | width="320" | ||||
| 14 | height="240" | ||||
| 15 | else | ||||
| 16 | width="640" | ||||
| 17 | height="480" | ||||
| 18 | fi | ||||
| 19 | host="$2" | ||||
| 20 | port="$3" | ||||
| 21 | |||||
| 22 | /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 | ||||