A live bird collage card for your Home Assistant dashboard.
Make ffmpeg record the first audio stream for RTSP
jaredb7b37b5ab78176
diff --git a/scripts/birdnet_recording.sh b/scripts/birdnet_recording.shindex 9f983793..744aa0ca 100755--- a/scripts/birdnet_recording.sh+++ b/scripts/birdnet_recording.sh@@ -29,7 +29,7 @@ if [ ! -z $RTSP_STREAM ];then# Map id used to map input to output, this is 0 based in ffmpeg decrementMAP_ID=$((RTSP_STREAMS_STARTED_COUNT-1))# 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} -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 "+ 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))done