blob: 158541babb854ec2f265c6b558f9423a055c6edd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
caffeine
FRAMERATE="$2"
RESOLUTION="$1"
DEVICE="/dev/$(readlink /dev/v4l/by-id/usb-MACROSILICON_USB_Video-* | head -n1 | cut -c7-)"
mpv --demuxer-lavf-format=video4linux2 \
--demuxer-lavf-o-set=input_format=mjpeg,framerate="$FRAMERATE",resolution="$RESOLUTION" \
--cache=no \
--pause=no \
--force-seekable=no \
--no-osc \
--no-input-default-bindings \
"av://v4l2:$DEVICE"
# &> /dev/null & disown
|