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 | ||||
Shad Ansari | 3501904 | 2022-03-29 20:15:54 +0000 | [diff] [blame] | 16 | width="1280" |
17 | height="960" | ||||
18 | # width="640" | ||||
19 | # height="480" | ||||
Shad Ansari | 6c155c4 | 2021-11-17 19:48:02 +0000 | [diff] [blame] | 20 | fi |
21 | host="$2" | ||||
22 | port="$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 |