remove STAMP just use date

This commit is contained in:
mcguirepr89
2022-04-25 09:31:40 -04:00
parent 6f8e676f4e
commit 5b6d36ba0e
+3 -5
View File
@@ -2,13 +2,11 @@
set -x set -x
source /etc/birdnet/birdnet.conf source /etc/birdnet/birdnet.conf
STAMP="%H:%M:%S"
[ -z $RECORDING_LENGTH ] && RECORDING_LENGTH=15 [ -z $RECORDING_LENGTH ] && RECORDING_LENGTH=15
if [ ! -z $RTSP_STREAM ];then if [ ! -z $RTSP_STREAM ];then
while true;do while true;do
ffmpeg -i $RTSP_STREAM -t 15 -vn -acodec pcm_s16le -ac 2 -ar 48000 file:${RECS_DIR}/$(date "+%F")-birdnet-$STAMP.wav 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
done done
else else
if ! pulseaudio --check;then pulseaudio --start;fi if ! pulseaudio --check;then pulseaudio --start;fi
@@ -20,11 +18,11 @@ else
done done
if [ -z ${REC_CARD} ];then if [ -z ${REC_CARD} ];then
arecord -f S16_LE -c${CHANNELS} -r48000 -t wav --max-file-time ${RECORDING_LENGTH}\ arecord -f S16_LE -c${CHANNELS} -r48000 -t wav --max-file-time ${RECORDING_LENGTH}\
--use-strftime ${RECS_DIR}/%B-%Y/%d-%A/%F-birdnet-${STAMP}.wav --use-strftime ${RECS_DIR}/%B-%Y/%d-%A/%F-birdnet-$(date "+%F").wav
else else
arecord -f S16_LE -c${CHANNELS} -r48000 -t wav --max-file-time ${RECORDING_LENGTH}\ arecord -f S16_LE -c${CHANNELS} -r48000 -t wav --max-file-time ${RECORDING_LENGTH}\
-D "${REC_CARD}" --use-strftime \ -D "${REC_CARD}" --use-strftime \
${RECS_DIR}/%B-%Y/%d-%A/%F-birdnet-${STAMP}.wav ${RECS_DIR}/%B-%Y/%d-%A/%F-birdnet-$(date "+%F").wav
fi fi
fi fi
fi fi