A live bird collage card for your Home Assistant dashboard.
RTSP streams are a subdirectory of $RECS_DIR now
mcguirepr890b2448169377
diff --git a/scripts/birdnet_recording.sh b/scripts/birdnet_recording.shindex 8a3063b7..5b4a1ae0 100755--- a/scripts/birdnet_recording.sh+++ b/scripts/birdnet_recording.sh@@ -5,9 +5,10 @@ source /etc/birdnet/birdnet.conf[ -z $RECORDING_LENGTH ] && RECORDING_LENGTH=15if [ ! -z $RTSP_STREAM ];then+ [ -d $RECS_DIR/StreamData ] || mkdir -p $RECS_DIR/StreamDatawhile true;dofor 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").wavdonedoneelsediff --git a/scripts/disk_check.sh b/scripts/disk_check.shindex e7a60a85..743233e1 100755--- a/scripts/disk_check.sh+++ b/scripts/disk_check.sh@@ -8,7 +8,7 @@ if [ "${used//%}" -ge 95 ]; thencase $FULL_DISK inpurge) 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/nullfilestodelete=$(($(find ${EXTRACTED}/By_Date/* -type f | wc -l) / $(find ${EXTRACTED}/By_Date/* -maxdepth 0 -type d | wc -l)))iter=0for i in */*/*; do