blob: 17f8bbd5e5c515fa6c49816546c6cc39f199f859 [file] [log] [blame]
Shad Ansari72c174d2021-11-11 19:04:16 +00001#!/bin/bash
2set -o errexit
3
4readonly LOG_FILE="/var/log/openvino-camera.txt"
5
6sudo touch $LOG_FILE
7exec 1>$LOG_FILE
8exec 2>&1
9
10if [[ "$HOST" != "" ]]; then
11 HOST="$1"
12else
13 HOST=10.92.2.22
14fi
15
16if [[ "$2" != "" ]]; then
17 PORT="$2"
18else
19 PORT=5000
20fi
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