#!/bin/sh # I have two cameras on my laptop and the first one is an IR camera (video0) # If the hostname matches that of my laptop, use the second camera camera="/dev/video0" if [ -n "$1" ]; then camera="$1" elif [ $HOSTNAME = "thinkslav" ]; then camera="/dev/video2" fi pkill -f "$camera" || mpv \ --gpu-context=wayland \ --profile=low-latency \ --no-osc \ --no-input-default-bindings \ --input-conf=/dev/null \ --geometry=-0-0 \ --autofit=25% \ --title="mpvfloat" "av://v4l2:$camera"