From f61ab667856a6896a0395a84c85cc4c1f139c630 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 10 Apr 2018 23:08:43 -0700 Subject: Overhaul of screencasting scripts --- .scripts/video | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 .scripts/video (limited to '.scripts/video') diff --git a/.scripts/video b/.scripts/video new file mode 100755 index 0000000..357464f --- /dev/null +++ b/.scripts/video @@ -0,0 +1,18 @@ +#!/bin/bash + +# This script records video. +# It also names files smartly to prevent overwrites. + +# Picks a file name for the output file based on availability: +while [[ -f $HOME/video$n.mkv ]] +do + n=$((n+1)) +done +filename="$HOME/video$n.mkv" + +# The actual ffmpeg command: +ffmpeg \ +-f x11grab \ +-s $(xdpyinfo | grep dimensions | awk '{print $2;}') \ +-i :0.0 \ + -c:v libx264 -qp 0 -r 30 $filename -- cgit v1.3.1