aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscreencaster17
1 files changed, 15 insertions, 2 deletions
diff --git a/screencaster b/screencaster
index 9718528..72b766f 100755
--- a/screencaster
+++ b/screencaster
@@ -1,7 +1,13 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Screencast recorder
+#
# See https://links.fluxo.info/bookmarks/rhatto/screencast
+# https://askubuntu.com/questions/4428/how-can-i-record-my-screen
+# https://github.com/dilawar/Scripts/blob/master/record_my_desktop.sh
+# https://trac.ffmpeg.org/wiki/Capture/Desktop
+# https://andreafortuna.org/2019/09/20/how-to-record-screen-on-linux-from-command-line/
+# https://superuser.com/questions/510985/how-can-i-crop-a-video-to-a-part-of-the-view
#
# Parameters
@@ -15,8 +21,15 @@ if [ -z "$OUT" ]; then
exit 1
fi
+# Calculate
+Xaxis=$(xrandr -q | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1)
+Yaxis=$(xrandr -q | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2)
+
# Dispatch with vertical offset
#ffmpeg -f x11grab -r 25 -s 1366x752 -i :0.0+0,16 -vcodec libx264 -vpre lossless_ultrafast -threads 0 $OUT
# Dispatch
-ffmpeg -f x11grab -r 25 -s 1366x752 -i :0.0 -vcodec libx264 -vpre lossless_ultrafast -threads 0 $OUT
+#ffmpeg -f x11grab -r 25 -s 1366x752 -i :0.0 -vcodec libx264 -vpre lossless_ultrafast -threads 0 $OUT
+
+# Run
+ffmpeg -f x11grab -s $(($Xaxis))x$(($Yaxis)) -r 25 -i :0.0 -qscale 0 $OUT