summaryrefslogtreecommitdiffstats
path: root/.scripts/video
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-04-10 23:08:43 -0700
committerLuke Smith <luke@lukesmith.xyz>2018-04-10 23:08:43 -0700
commitf61ab667856a6896a0395a84c85cc4c1f139c630 (patch)
tree2d9c9c6353d837e53695cb3d664d4926a25ad33c /.scripts/video
parente2225d418d38e53f63bb1c279cc8b9af45ea6e3a (diff)
downloadeibhear-f61ab667856a6896a0395a84c85cc4c1f139c630.tar.gz
eibhear-f61ab667856a6896a0395a84c85cc4c1f139c630.tar.zst
eibhear-f61ab667856a6896a0395a84c85cc4c1f139c630.zip
Overhaul of screencasting scripts
Diffstat (limited to '.scripts/video')
-rwxr-xr-x.scripts/video18
1 files changed, 18 insertions, 0 deletions
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