Shad Ansari | 72c174d | 2021-11-11 19:04:16 +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 | if [[ "$HOST" != "" ]]; then | ||||
11 | HOST="$1" | ||||
12 | else | ||||
13 | HOST=10.92.2.22 | ||||
14 | fi | ||||
15 | |||||
16 | if [[ "$2" != "" ]]; then | ||||
17 | PORT="$2" | ||||
18 | else | ||||
19 | PORT=5000 | ||||
20 | fi | ||||
21 | |||||
22 | /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 |