diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2024-05-14 18:53:03 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2024-05-14 18:53:03 +0200 |
commit | 612dbb6993c8a548744f29a4d15d6b31325357c8 (patch) | |
tree | 0d61cee0ea74ac811268d0ffc00d3d55f7174112 /.bin/dslr-webcam | |
parent | 23e2bfd987c430bb41bc7860c46c2f572e9e2db4 (diff) | |
download | dots-612dbb6993c8a548744f29a4d15d6b31325357c8.tar.gz |
Diffstat (limited to '.bin/dslr-webcam')
-rwxr-xr-x | .bin/dslr-webcam | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/.bin/dslr-webcam b/.bin/dslr-webcam new file mode 100755 index 0000000..a1c9084 --- /dev/null +++ b/.bin/dslr-webcam @@ -0,0 +1,27 @@ +#!/bin/sh + +set -xe + +VIDEO_INDEX="${1:-1}" + +# gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -f v4l2 "/dev/video${VIDEO_INDEX}" + +gphoto2 --stdout --capture-movie | + ffmpeg \ + -threads:v 2 \ + -threads:a 8 \ + -filter_threads 2 \ + -thread_queue_size 512 \ + -hwaccel opencl \ + -fflags nobuffer \ + -flags low_delay \ + -strict experimental \ + -probesize 819200 \ + -analyzeduration 0 \ + -i - \ + -vcodec rawvideo \ + -preset ultrafast \ + -tune zerolatency \ + -pix_fmt yuv420p \ + -f v4l2 "/dev/video${VIDEO_INDEX}" \ + -framerate 30 |