summaryrefslogtreecommitdiffstats
path: root/.bin/dslr-webcam
diff options
context:
space:
mode:
Diffstat (limited to '.bin/dslr-webcam')
-rwxr-xr-x.bin/dslr-webcam27
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
remember that computers suck.