FloatImg/scripts/capture.sh

31 lines
431 B
Bash
Raw Normal View History

2023-07-08 21:18:55 +11:00
#!/bin/bash
2023-07-08 21:43:00 +11:00
# CAPTURE
2023-07-08 21:18:55 +11:00
source ./conf.sh
DEVICE="/dev/video0"
2023-07-08 21:43:00 +11:00
GOPT=" -v -s 1920x1080 -p 0 -n 10"
2023-07-08 21:18:55 +11:00
OUTD=$GRABDIR
TMPG="/dev/shm/tmpgrab.fimg"
for idx in $(seq 0 2399)
do
# take the picz
${GRAB} -d ${DEVICE} ${GOPT} -o ${TMPG}
2023-07-08 21:43:00 +11:00
# display $TMPG
2023-07-08 21:18:55 +11:00
# only take the good spot
fimg=$(printf "%s/%05d.fimg" ${OUTD} ${idx})
2023-07-10 11:26:57 +11:00
${EXTR} -o ${fimg} ${TMPG} 800,600,560,240
2023-07-08 21:43:00 +11:00
# display ${fimg} ; exit
2023-07-08 21:18:55 +11:00
echo
sleep $DELAY_GRAB
done