Commit 7000b14
xxwhirlpool
·
2026-08-22 13:29:20 -0400 EDT
parent 54dff1b
webcamimg, misc
2 files changed,
+12,
-3
+12,
-3
1@@ -6,12 +6,21 @@ if [[ "$(hostname)" != "mariposa" ]]; then
2 exit 1
3 fi
4
5+# vars
6 PICPATH="/home/kat/Pictures/Camera/webcam"
7+# PIC="$PICPATH/webcam_pic_$(today time)_%3d.jpeg"
8+PIC="$PICPATH/webcam_pic_$(today time)"
9
10 # turn on webcam for a bit so the brightness isn't fucked
11-echo "starting camera, wait 5s"
12+echo -e "starting camera, wait 5s\n"
13 timeout 5s v4l2-ctl --silent -d /dev/video0 -d0 --stream-mmap
14
15 # take the pic
16-echo "taking the pic!"
17-ffmpeg -f video4linux2 -i /dev/video0 -vframes 5 -video_size 1920x1080 "$PICPATH/webcam_pic_$(today time)_%3d.jpeg" -hide_banner -loglevel error
18+echo -e "taking the pics!\n"
19+ffmpeg -f video4linux2 -i /dev/video0 -vframes 3 -video_size 1920x1080 "$PIC-%3d.jpeg" -hide_banner -loglevel error
20+
21+# print the paths to pics
22+echo -e "here's your pics!\n"
23+realpath "$PIC-001.jpeg"
24+realpath "$PIC-002.jpeg"
25+realpath "$PIC-003.jpeg"
+0,
-0