3 ms·
On Linux I use the following shell-function, can't remember the source of it though, probably somewhere on Stack Overflow: $ which capture_window
by capableweb 4y ago
On Linux I use the following shell-function, can't remember the source of it though, probably somewhere on Stack Overflow:
$ which capture_window
capture_window () {
save_dir="$(mktemp -d)"
filename="$save_dir/$(date +%Y-%m-%d_%H-%M_%S).mp4"
ffmpeg -f x11grab -framerate 25 $(xwininfo | gawk 'match($0, /-geometry ([0-9]+x[0-9]+).([0-9]+).([0-9]+)/, a)\
{ print "-video_size " a[1] " -i +" a[2] "," a[3] }') $filename
echo "Saved as \"$filename\""
}