rc/bin/playvideo
2020-11-20 19:12:05 +01:00

8 lines
254 B
Bash
Executable file

#!/bin/sh
if [ "$1" = "-h" ] || [ "$#" -ne "1" ]; then
>&2 echo "Usage: $0 <input.mp4> <output.gif>"
exit 1
fi
mpv --ytdl-format='bestvideo[height<=?720]+bestaudio/best' "$1" 2>&1 | grep 'ERROR:' | tee /dev/fd/2 | xargs -n1 -d "\n" notify-send