A live bird collage card for your Home Assistant dashboard.
stimeout changed to timeout between ffmpeg 4 and 5
frederikdae0ba992f2d
diff --git a/scripts/birdnet_recording.sh b/scripts/birdnet_recording.shindex 05d610bd..18fd6a20 100755--- a/scripts/birdnet_recording.sh+++ b/scripts/birdnet_recording.sh@@ -18,6 +18,7 @@ fiif [ ! -z $RTSP_STREAM ];then# Explode the RSPT steam setting into an array so we can count the number we haveRTSP_STREAMS_EXPLODED_ARRAY=(${RTSP_STREAM//,/ })+ FFMPEG_VERSION=$(ffmpeg -version | head -n 1 | cut -d ' ' -f 3 | cut -d '.' -f 1)while true;do# Original loop@@ -33,7 +34,8 @@ if [ ! -z $RTSP_STREAM ];thenfor i in "${RTSP_STREAMS_EXPLODED_ARRAY[@]}"doif [[ "$i" == "rtsp://"* ]]; then- TIMEOUT_PARAM="-stimeout 10000000"+ [ $FFMPEG_VERSION -lt 5 ] && PARAM=-stimeout || PARAM=-timeout+ TIMEOUT_PARAM="$PARAM 10000000"elif [[ "$i" =~ ^[a-z]+:// ]]; thenTIMEOUT_PARAM="-rw_timeout 10000000"else