A live bird collage card for your Home Assistant dashboard.
Merge branch 'main' into Configurable-Service-Logging-Options
Jaredd1a0561d2d6d
diff --cc scripts/birdnet_recording.shindex bda63035,744aa0ca..da777e49--- a/scripts/birdnet_recording.sh+++ b/scripts/birdnet_recording.sh@@@ -32,12 -26,11 +32,11 @@@ if [ ! -z $RTSP_STREAM ];the# Loop over the streamsfor i in "${RTSP_STREAMS_EXPLODED_ARRAY[@]}"do- # Map id used to map input to output, this is 0 based in ffmpeg decrement+ # Map id used to map input to output (first stream being 0), this is 0 based in ffmpeg so decrement our counter (which is more human readable) by 1MAP_ID=$((RTSP_STREAMS_STARTED_COUNT-1))- # Build up the parameters to process the RSTP stream, including mapping for the output, because some streams may have more than one audio stream within it, get the first stream- #ffmpeg does this by default when there is only 1 steam, but if there are more than 1 then it doesn't know which one we want- FFMPEG_PARAMS+="-vn -thread_queue_size 512 -i ${i} -map ${MAP_ID} -t ${RECORDING_LENGTH} -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/StreamData/$(date "+%F")-birdnet-RTSP_${RTSP_STREAMS_STARTED_COUNT}-$(date "+%H:%M:%S").wav "- # Increment counter for the next round+ # Build up the parameters to process the RSTP stream, including mapping for the output+ FFMPEG_PARAMS+="-vn -thread_queue_size 512 -i ${i} -map ${MAP_ID}:a:0 -t ${RECORDING_LENGTH} -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/StreamData/$(date "+%F")-birdnet-RTSP_${RTSP_STREAMS_STARTED_COUNT}-$(date "+%H:%M:%S").wav "+ # Increment counter((RTSP_STREAMS_STARTED_COUNT += 1))donediff --cc scripts/update_birdnet_snippets.shindex 00dea4fb,e13f9e69..68b198d2--- a/scripts/update_birdnet_snippets.sh+++ b/scripts/update_birdnet_snippets.sh@@@ -191,17 -195,10 +195,23 @@@ if ! grep RTSP_STREAM_TO_LIVESTREAM /etsudo -u$USER echo "RTSP_STREAM_TO_LIVESTREAM=\"0\"" >> /etc/birdnet/birdnet.conffi- # For new Advanced Setting Logging level options,+ suntime_installation_status=$(~/BirdNET-Pi/birdnet/bin/python3 -c 'import pkgutil; print("installed" if pkgutil.find_loader("suntime") else "not installed")')+ if [[ "$suntime_installation_status" = "not installed" ]];then+ $HOME/BirdNET-Pi/birdnet/bin/pip3 install -U pip+ $HOME/BirdNET-Pi/birdnet/bin/pip3 install suntime++++++# For new Advanced Setting Logging level options+if ! grep LogLevel_BirdnetRecordingService /etc/birdnet/birdnet.conf &>/dev/null;then+ sudo -u$USER echo "LogLevel_BirdnetRecordingService=\"error\"" >> /etc/birdnet/birdnet.conf+fi++if ! grep LogLevel_LiveAudioStreamService /etc/birdnet/birdnet.conf &>/dev/null;then+ sudo -u$USER echo "LogLevel_LiveAudioStreamService=\"error\"" >> /etc/birdnet/birdnet.conf+fi++if ! grep LogLevel_SpectrogramViewerService /etc/birdnet/birdnet.conf &>/dev/null;then+ sudo -u$USER echo "LogLevel_SpectrogramViewerService=\"error\"" >> /etc/birdnet/birdnet.conffisudo systemctl daemon-reload