blob: 76eeb4f47f7ac4bf70c80c875773f7965d6e45ef [file] [log] [blame]
Shad Ansari6c155c42021-11-17 19:48:02 +00001#!/bin/bash
Shad Ansarif53bc4f2022-06-07 14:31:11 -07002
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 Ansari6c155c42021-11-17 19:48:02 +00007set -o errexit
8
9readonly LOG_FILE="/var/log/openvino-camera.txt"
10
11sudo touch $LOG_FILE
12exec 1>$LOG_FILE
13exec 2>&1
14
15echo $@
16
17if [ $1 = "low" ]; then
18 width="320"
19 height="240"
20else
Shad Ansari35019042022-03-29 20:15:54 +000021 width="1280"
22 height="960"
23# width="640"
24# height="480"
Shad Ansari6c155c42021-11-17 19:48:02 +000025fi
26host="$2"
27port="$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