diff options
| author | 0scar <qgt268@alumni.ku.dk> | 2021-06-10 08:05:06 +0000 |
|---|---|---|
| committer | 0scar <qgt268@alumni.ku.dk> | 2021-06-10 08:05:06 +0000 |
| commit | 7ad685aa6bd77d76115132280ce323d7fc5aeeb0 (patch) | |
| tree | c605992dfb5582a050b8847eb624fa84f1f97d91 /.local/bin/cam_capture | |
| parent | 6e4a15d79352ca2707a3b0d81d158228a7d14704 (diff) | |
Add scripts
Diffstat (limited to '.local/bin/cam_capture')
| -rwxr-xr-x | .local/bin/cam_capture | 11 |
1 files changed, 11 insertions, 0 deletions
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 |
