summaryrefslogblamecommitdiffstats
path: root/.bin/dslr-webcam
blob: a1c90845c4c91b46076e792db9a90474ccf5edb3 (plain) (tree)


























                                                                                                                     
#!/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.