Decreased latency in webcam script

master
Meliurwen 3 years ago
parent 270655afe0
commit 98f028c007
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 13
      i3/.config/i3/scripts/webcam-toggle.sh

@ -1,12 +1,19 @@
#!/bin/sh
pkill -f /dev/video || \
CAMERA=${CAMERA:-/dev/video0}
pkill -f "$CAMERA" || \
mpv --title="mpv-floating-window" \
--no-config \
--no-osc \
--no-input-default-bindings \
--input-conf=/dev/null \
-vo=gpu \
--vo=gpu \
--geometry=-0-0 \
--autofit=30% \
av://v4l2:/dev/video0
--profile=low-latency \
--untimed \
--demuxer-lavf-format=video4linux2 \
--demuxer-lavf-o-set=input_format=mjpeg \
--demuxer-lavf-o=video_size=320x240\
"$CAMERA"

Loading…
Cancel
Save