From 7ad685aa6bd77d76115132280ce323d7fc5aeeb0 Mon Sep 17 00:00:00 2001 From: 0scar Date: Thu, 10 Jun 2021 10:05:06 +0200 Subject: Add scripts --- .local/bin/cam_capture | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .local/bin/cam_capture (limited to '.local/bin/cam_capture') diff --git a/.local/bin/cam_capture b/.local/bin/cam_capture new file mode 100755 index 0000000..046fea8 --- /dev/null +++ b/.local/bin/cam_capture @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -e + +TMP=$(mktemp -d) + +# Res: 1280x720 +ffmpeg -y -f v4l2 -video_size 640x480 -framerate 1 -i /dev/video0 -frames:v 3 $TMP/webcam%2d.png + +mv $(ls -1 $TMP/*.png | tail -n 1) $HOME/webcam.png +rm -r $TMP -- cgit v1.3