RTSP streams are a subdirectory of $RECS_DIR now

This commit is contained in:
mcguirepr89
2022-06-04 13:06:38 -04:00
parent b24d8d9796
commit 0b24481693
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -5,9 +5,10 @@ source /etc/birdnet/birdnet.conf
[ -z $RECORDING_LENGTH ] && RECORDING_LENGTH=15
if [ ! -z $RTSP_STREAM ];then
[ -d $RECS_DIR/StreamData ] || mkdir -p $RECS_DIR/StreamData
while true;do
for i in ${RTSP_STREAM//,/ };do
ffmpeg -i ${i} -t ${RECORDING_LENGTH} -vn -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/$(date "+%F")-birdnet-$(date "+%H:%M:%S").wav
ffmpeg -i ${i} -t ${RECORDING_LENGTH} -vn -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/StreamData/$(date "+%F")-birdnet-$(date "+%H:%M:%S").wav
done
done
else