From 7d9550d134d7a1379ca2fc8d8dbfdf61559c83e8 Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Tue, 1 Feb 2022 08:29:32 -0500 Subject: [PATCH] extractionlength=recordinglength start=0 end=recordinglength --- scripts/extract_new_birdsounds.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/extract_new_birdsounds.sh b/scripts/extract_new_birdsounds.sh index 8353385..80ec685 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}"