Allowing multiple RTSP stream urls

(untested)
This commit is contained in:
ehpersonal38
2022-04-25 16:51:04 -04:00
parent ff9f355271
commit 256b405c21
2 changed files with 12 additions and 10 deletions
+3 -1
View File
@@ -6,7 +6,9 @@ source /etc/birdnet/birdnet.conf
if [ ! -z $RTSP_STREAM ];then
while true;do
ffmpeg -i $RTSP_STREAM -t 15 -vn -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/$(date "+%F")-birdnet-$(date "+%H:%M:%S").wav
for i in ${RTSP_STREAM//,/ };do
ffmpeg -i ${i} -t 15 -vn -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/$(date "+%F")-birdnet-$(date "+%H:%M:%S").wav </dev/null > /dev/null 2>&1 & sleep 1;
done
done
else
if ! pulseaudio --check;then pulseaudio --start;fi