Ignore JetBrains settings dir
[khome.git] / home / bin / screencast
1 #!/bin/bash
2
3 set -e
4 set -o pipefail
5
6 DIR=~/arc/vid/screencasts
7 EXT=mkv
8 #EXT=ogv # Low quality for some reason
9
10 main() {
11 local -r timestamp=$(date +'%Y-%m-%d--%H-%M-%S') || exit 1
12 local -r file_name="screen--${timestamp}.$EXT"
13 local -r file_path="$DIR"/"$file_name"
14 local -r slop=$(slop -f '%x %y %w %h') || exit 1
15
16 mkdir -p "$DIR"
17 read -r X Y W H <<< "$slop"
18 ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+"$X","$Y" -f pulse -ac 2 -i default "$file_path"
19 }
20
21 main "$@"
This page took 0.090818 seconds and 4 git commands to generate.