Shad Ansari | 6c155c4 | 2021-11-17 19:48:02 +0000 | [diff] [blame] | 1 | #!/bin/bash |
Shad Ansari | f53bc4f | 2022-06-07 14:31:11 -0700 | [diff] [blame] | 2 | |
| 3 | # SPDX-FileCopyrightText: 2022-present Intel Corporation |
| 4 | # SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org> |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | |
Shad Ansari | 6c155c4 | 2021-11-17 19:48:02 +0000 | [diff] [blame] | 7 | set -o errexit |
| 8 | |
| 9 | readonly LOG_FILE="/var/log/openvino-camera.txt" |
| 10 | |
| 11 | sudo touch $LOG_FILE |
| 12 | exec 1>$LOG_FILE |
| 13 | exec 2>&1 |
| 14 | |
| 15 | echo $@ |
| 16 | |
| 17 | if [ $1 = "low" ]; then |
| 18 | width="320" |
| 19 | height="240" |
| 20 | else |
Shad Ansari | 3501904 | 2022-03-29 20:15:54 +0000 | [diff] [blame] | 21 | width="1280" |
| 22 | height="960" |
| 23 | # width="640" |
| 24 | # height="480" |
Shad Ansari | 6c155c4 | 2021-11-17 19:48:02 +0000 | [diff] [blame] | 25 | fi |
| 26 | host="$2" |
| 27 | port="$3" |
| 28 | |
| 29 | /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 |