adjustments to read from rtsp
This commit is contained in:
@@ -13,9 +13,9 @@ source /etc/birdnet/birdnet.conf
|
|||||||
|
|
||||||
# Set Variables
|
# Set Variables
|
||||||
TMPFILE=$(mktemp)
|
TMPFILE=$(mktemp)
|
||||||
ANALYZED=${RECS_DIR}/*/*Analyzed
|
#ANALYZED=${RECS_DIR}/*/*Analyzed
|
||||||
# SCAN_DIRS are all directories marked "Analyzed"
|
#SCAN_DIRS are all directories marked "Analyzed"
|
||||||
SCAN_DIRS=($(find ${ANALYZED} -type d 2>/dev/null | sort ))
|
SCAN_DIRS=($(find $HOME -type d -name '*Analyzed' 2>/dev/null | sort ))
|
||||||
|
|
||||||
for h in "${SCAN_DIRS[@]}";do
|
for h in "${SCAN_DIRS[@]}";do
|
||||||
# The TMPFILE is created from each .csv file BirdNET creates
|
# The TMPFILE is created from each .csv file BirdNET creates
|
||||||
@@ -38,13 +38,14 @@ for h in "${SCAN_DIRS[@]}";do
|
|||||||
for i in $(find ${h} -name '*csv' 2>/dev/null | sort );do
|
for i in $(find ${h} -name '*csv' 2>/dev/null | sort );do
|
||||||
# Iterates over each '.csv' file found in each "Analyzed" directory
|
# Iterates over each '.csv' file found in each "Analyzed" directory
|
||||||
# to create the TMPFILE
|
# to create the TMPFILE
|
||||||
echo "${i}" | cut -d'/' -f7 >> ${TMPFILE}
|
echo "$(basename ${i})" >> ${TMPFILE}
|
||||||
sort -k1n -t\; "${i}" | awk '!/Start/{print}' >> ${TMPFILE}
|
sort -k1n -t\; "${i}" | awk '!/Start/{print}' >> ${TMPFILE}
|
||||||
done
|
done
|
||||||
|
|
||||||
# The extraction reads each line of the TMPFILE and sets the variables ffmpeg
|
# The extraction reads each line of the TMPFILE and sets the variables ffmpeg
|
||||||
# will use.
|
# will use.
|
||||||
while read -r line;do
|
while read -r line;do
|
||||||
|
echo "Line = $line"
|
||||||
DATE="$(echo "${line}" \
|
DATE="$(echo "${line}" \
|
||||||
| awk -F- '/birdnet/{print $1"-"$2"-"$3}')"
|
| awk -F- '/birdnet/{print $1"-"$2"-"$3}')"
|
||||||
if [ ! -z ${DATE} ];then
|
if [ ! -z ${DATE} ];then
|
||||||
|
|||||||
Reference in New Issue
Block a user