blob: 76eeb4f47f7ac4bf70c80c875773f7965d6e45ef [file] [log] [blame]
#!/bin/bash
# SPDX-FileCopyrightText: 2022-present Intel Corporation
# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
set -o errexit
readonly LOG_FILE="/var/log/openvino-camera.txt"
sudo touch $LOG_FILE
exec 1>$LOG_FILE
exec 2>&1
echo $@
if [ $1 = "low" ]; then
width="320"
height="240"
else
width="1280"
height="960"
# width="640"
# height="480"
fi
host="$2"
port="$3"
/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