A live bird collage card for your Home Assistant dashboard.
Quieten System logs
jaredb7421902684fc1
diff --git a/scripts/birdnet_analysis.sh b/scripts/birdnet_analysis.shindex 474a7573..aadf6f8d 100755--- a/scripts/birdnet_analysis.sh+++ b/scripts/birdnet_analysis.sh@@ -189,7 +189,7 @@ TODAY="$RECS_DIR/$(date "+%B-%Y/%d-%A")"if [ $(find ${YESTERDAY} -name '*wav' 2>/dev/null | wc -l) -gt 0 ];thenfind $YESTERDAY -name '*wav' -type f -size 0 -deleterun_birdnet "${YESTERDAY}"-elif [ $(find ${TODAY} -name '*wav' | wc -l) -gt 0 ];then+elif [ $(find ${TODAY} -name '*wav' 2>/dev/null | wc -l) -gt 0 ];thenfind $TODAY -name '*wav' -type f -size 0 -deleterun_birdnet "${TODAY}"fidiff --git a/scripts/birdnet_recording.sh b/scripts/birdnet_recording.shindex dfdcefc1..c8c8d780 100755--- a/scripts/birdnet_recording.sh+++ b/scripts/birdnet_recording.sh@@ -1,8 +1,11 @@#!/usr/bin/env bash-# Performs the recording from the specified RSTP stream or soundcard-set -x+# Performs the recording from the specified RTSP stream or soundcard+#set -xsource /etc/birdnet/birdnet.conf+# S+LOGGING_LEVEL='error'+[ -z $RECORDING_LENGTH ] && RECORDING_LENGTH=15if [ ! -z $RTSP_STREAM ];then@@ -33,7 +36,7 @@ if [ ! -z $RTSP_STREAM ];then# Make sure were passing something valid to ffmpeg, ffmpeg will run interactive and control our look by waiting ${RECORDING_LENGTH} between loopsif [ -n "$FFMPEG_PARAMS" ];then- ffmpeg -nostdin $FFMPEG_PARAMS+ ffmpeg -hide_banner -loglevel $LOGGING_LEVEL -nostdin $FFMPEG_PARAMSfidonediff --git a/scripts/livestream.sh b/scripts/livestream.shindex 6b0ba7eb..cfde718f 100755--- a/scripts/livestream.sh+++ b/scripts/livestream.sh@@ -2,6 +2,9 @@# Live Audio Stream Service Scriptsource /etc/birdnet/birdnet.conf+# Set logging level+LOGGING_LEVEL='error'+if [ -z ${REC_CARD} ];thenecho "Stream not supported"elif [[ ! -z ${RTSP_STREAM} ]];then@@ -22,11 +25,11 @@ elif [[ ! -z ${RTSP_STREAM} ]];thenSELECTED_RSTP_STREAM=${RSTP_STREAMS_EXPLODED_ARRAY[0]}fi- ffmpeg -nostdin -loglevel 32 -ac ${CHANNELS} -i ${SELECTED_RSTP_STREAM} -acodec libmp3lame \+ ffmpeg -nostdin -loglevel $LOGGING_LEVEL -ac ${CHANNELS} -i ${SELECTED_RSTP_STREAM} -acodec libmp3lame \-b:a 320k -ac ${CHANNELS} -content_type 'audio/mpeg' \-f mp3 icecast://source:${ICE_PWD}@localhost:8000/stream -reelse- ffmpeg -nostdin -loglevel 32 -ac ${CHANNELS} -f alsa -i ${REC_CARD} -acodec libmp3lame \+ ffmpeg -nostdin -loglevel $LOGGING_LEVEL -ac ${CHANNELS} -f alsa -i ${REC_CARD} -acodec libmp3lame \-b:a 320k -ac ${CHANNELS} -content_type 'audio/mpeg' \-f mp3 icecast://source:${ICE_PWD}@localhost:8000/stream -refi