aboutsummaryrefslogtreecommitdiff
path: root/scripts/recording/camscreen.sh
blob: 97c0a3f5fba2a76aa26862e2eb8db8812d931fb8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash

outfile=${1:-"$HOME/Pictures/recordings/video-cs-$(date -Iminutes).mp4"};

[[ -f "$outfile" ]] && echo "[File already exists]: $outfile" && exit 1;

trap "killall background" SIGINT SIGTERM EXIT

ffplay /dev/video0 -s 300x200 -an >/dev/null &
ffmpeg -f x11grab -s 1920x1080 -i :0.0 -f alsa -i loophw00 $outfile