RTSP streams are a subdirectory of $RECS_DIR now

This commit is contained in:
mcguirepr89
2022-06-04 13:06:38 -04:00
parent b24d8d9796
commit 0b24481693
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -5,9 +5,10 @@ source /etc/birdnet/birdnet.conf
[ -z $RECORDING_LENGTH ] && RECORDING_LENGTH=15
if [ ! -z $RTSP_STREAM ];then
[ -d $RECS_DIR/StreamData ] || mkdir -p $RECS_DIR/StreamData
while true;do
for i in ${RTSP_STREAM//,/ };do
ffmpeg -i ${i} -t ${RECORDING_LENGTH} -vn -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/$(date "+%F")-birdnet-$(date "+%H:%M:%S").wav
ffmpeg -i ${i} -t ${RECORDING_LENGTH} -vn -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/StreamData/$(date "+%F")-birdnet-$(date "+%H:%M:%S").wav
done
done
else
+1 -1
View File
@@ -8,7 +8,7 @@ if [ "${used//%}" -ge 95 ]; then
case $FULL_DISK in
purge) echo "Removing oldest data"
cd ${EXTRACTED}/By_Date/
curl localhost/views.php?view=Species%20Stats &>/dev/null
curl localhost/views.php?view=Species%20Stats &>/dev/null
filestodelete=$(($(find ${EXTRACTED}/By_Date/* -type f | wc -l) / $(find ${EXTRACTED}/By_Date/* -maxdepth 0 -type d | wc -l)))
iter=0
for i in */*/*; do