added EXTRACTION_LENGTH for testing

This commit is contained in:
Patrick McGuire
2021-10-01 18:44:00 -04:00
parent c3db0bed44
commit 9ede00566c
2 changed files with 18 additions and 4 deletions
+10
View File
@@ -128,6 +128,16 @@ for h in "${SCAN_DIRS[@]}";do
# structured by-species, symbolic links are made to populate the new
# directory.
### TESTING longer extraction context
set -x
SPACER=$(echo "(${EXTRACTION_LENGTH} - 3 )/2" |bc -l)
START=$(echo "${START} - ${SPACER}"|bc -l)
END=$(echo "${END} + ${SPACER}"|bc -l)
if (( $(echo "${START} < 0" | bc -l) ));then START=0;fi
if (( $(echo "${END} > ${RECORDING_LENGTH}" | bc -l) ));then END=${RECORDING_LENGTH};fi
set +x
ffmpeg -hide_banner -loglevel error -nostdin -i "${h}/${OLDFILE}" \
-acodec copy -ss "${START}" -to "${END}"\
"${NEWSPECIES_BYDATE}/${a}-${NEWFILE}"