summary refs log tree commit diff
path: root/bin/grimshot
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2020-02-21 01:21:48 +0100
committerRobert Günzler <r@gnzler.io>2020-02-21 01:23:15 +0100
commite77638e8834991d387ce74da43d86d60665d7528 (patch)
treeb96dc8a285adc4c83c0815b38f9a3c8521b50dc6 /bin/grimshot
parent58973263a38f93b23f8391ce6ab0be7e3de5b0a0 (diff)
grimshot: Use hw encoding with wf-recorder
also adds bin/wfez that has the args for it preset
Diffstat (limited to 'bin/grimshot')
-rwxr-xr-xbin/grimshot5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/grimshot b/bin/grimshot
index 819e7c5..7af270e 100755
--- a/bin/grimshot
+++ b/bin/grimshot
@@ -76,10 +76,11 @@ takeScreenshot() {
 recordScreen() {
   FILE=$1
   GEOM=$2
+  REC_OPTS="-c h264_vaapi -d /dev/dri/renderD128"
   if [ -z "$GEOM" ]; then
-    wf-recorder -f "$FILE" || die "Unable to invoke wf-recorder"
+    wf-recorder ${REC_OPTS} -f "$FILE" || die "Unable to invoke wf-recorder"
   else
-    wf-recorder -g "$GEOM" -f "$FILE" || die "Unable to invoke wf-recorder"
+    wf-recorder ${REC_OPTS} -g "$GEOM" -f "$FILE" || die "Unable to invoke wf-recorder"
   fi
 }