-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstart.sh
24 lines (23 loc) · 1.08 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use provided environment variables or defaults.
WIDTH=${WIDTH:=1280}
HEIGHT=${HEIGHT:=720}
INTRA_REFRESH_PERIOD=${INTRA_REFRESH_PERIOD:=60}
FLIP_HORIZONTAL=${FLIP_HORIZONTAL:=""}
FLIP_VERTICAL=${FLIP_VERTICAL:=""}
ROTATION=${ROTATION:=0}
FRAMES_PER_SECOND=${FRAMES_PER_SECOND:=30}
BITRATE=${BITRATE:=2500000}
METERING_MODE=${METERING_MODE:="average"}
EXPOSURE_MODE=${EXPOSURE_MODE:="fixedfps"}
DRC=${DRC:="off"}
SHARPNESS=${SHARPNESS:=0}
BRIGHTNESS=${BRIGHTNESS:=50}
CONTRAST=${CONTRAST:=0}
SATURATION=${SATURATION:=0}
ISO=${ISO:=0}
IMAGE_EFFECT=${IMAGE_EFFECT:="none"}
AUTO_WHITE_BALANCE_MODE=${AUTO_WHITE_BALANCE_MODE:="auto"}
H264_PROFILE=${H264_PROFILE:="high"}
echo "Starting raspivid..."
raspivid -n -t 0 -w $WIDTH -h $HEIGHT -drc $DRC -sh $SHARPNESS -br $BRIGHTNESS -co $CONTRAST -sa $SATURATION -ifx $IMAGE_EFFECT -g $INTRA_REFRESH_PERIOD $FLIP_HORIZONTAL $FLIP_VERTICAL -rot $ROTATION -fps $FRAMES_PER_SECOND -b $BITRATE -mm $METERING_MODE -ex $EXPOSURE_MODE -ih -pf $H264_PROFILE -awb $AUTO_WHITE_BALANCE_MODE -o udp://$STREAM_DESTINATION_IP:$STREAM_DESTINATION_PORT
echo "Raspivid exited."