FloatImg/scripts/capture.sh

31 lines
431 B
Bash
Raw Normal View History

2023-07-08 12:18:55 +02:00
#!/bin/bash
2023-07-08 12:43:00 +02:00
# CAPTURE
2023-07-08 12:18:55 +02:00
source ./conf.sh
DEVICE="/dev/video0"
2023-07-08 12:43:00 +02:00
GOPT=" -v -s 1920x1080 -p 0 -n 10"
2023-07-08 12:18:55 +02: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 12:43:00 +02:00
# display $TMPG
2023-07-08 12:18:55 +02:00
# only take the good spot
fimg=$(printf "%s/%05d.fimg" ${OUTD} ${idx})
2023-07-10 02:26:57 +02:00
${EXTR} -o ${fimg} ${TMPG} 800,600,560,240
2023-07-08 12:43:00 +02:00
# display ${fimg} ; exit
2023-07-08 12:18:55 +02:00
echo
sleep $DELAY_GRAB
done