From 612dbb6993c8a548744f29a4d15d6b31325357c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Tue, 14 May 2024 18:53:03 +0200 Subject: Tue May 14 06:53:03 PM CEST 2024 --- .bin/dslr-webcam | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 .bin/dslr-webcam (limited to '.bin/dslr-webcam') 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 -- cgit v1.2.3