Skip to content

A live bird collage card for your Home Assistant dashboard.

extractionlength=recordinglength start=0 end=recordinglength

mcguirepr897d9550d134d7
diff --git a/scripts/extract_new_birdsounds.sh b/scripts/extract_new_birdsounds.sh
index 83533851..80ec6857 100755
--- a/scripts/extract_new_birdsounds.sh
+++ b/scripts/extract_new_birdsounds.sh
@@ -124,6 +124,11 @@ for h in "${SCAN_DIRS[@]}";do
if (( $(echo "${START} < 1" | bc -l) ));then START=0;fi
if (( $(echo "${END} > ${RECORDING_LENGTH}" | bc -l) ));then END=${RECORDING_LENGTH};fi
+ if [ "${RECORDING_LENGTH}" == "${EXTRACTION_LENGTH}" ];then
+ START=0
+ END=${RECORDING_LENGTH}
+ fi
+
ffmpeg -hide_banner -loglevel error -nostdin -i "${h}/${OLDFILE}" \
-acodec copy -ss "${START}" -to "${END}"\
"${NEWSPECIES_BYDATE}/${NEWFILE}"