Last active
August 12, 2021 13:57
-
-
Save pzankov/a591700ea1c3cc2be1f3c4313b21393f to your computer and use it in GitHub Desktop.
IP Camera loop recorder script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -u | |
URI='rtsp://192.168.1.10/user=admin&password=tlJwpbo6&channel=1&stream=0.sdp' | |
CNT=0 | |
mkdir out | |
cd out | |
while true; do | |
CNT=$((CNT+1)) | |
FOLDER=$(printf %03d $CNT) | |
mkdir $FOLDER | |
(cd $FOLDER && openRTSP -K -t -c -v -D 1 -4 -P 300 -B 10000000 -b 10000000 "$URI") | |
echo "Recording stopped" | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment