home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6db0984
)
Add screencast script
author
Siraaj Khandkar
<siraaj@khandkar.net>
Wed, 31 Aug 2022 21:40:03 +0000
(17:40 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Wed, 31 Aug 2022 21:40:03 +0000
(17:40 -0400)
home/bin/screencast
[new file with mode: 0755]
patch
|
blob
diff --git a/home/bin/screencast
b/home/bin/screencast
new file mode 100755
(executable)
index 0000000..
4597820
--- /dev/null
+++ b/
home/bin/screencast
@@ -0,0
+1,21
@@
+#!/bin/bash
+
+set -e
+set -o pipefail
+
+DIR=~/arc/vid/screencasts
+EXT=mkv
+#EXT=ogv # Low quality for some reason
+
+main() {
+ local -r timestamp=$(date +'%Y-%m-%d--%H-%M-%S') || exit 1
+ local -r file_name="screen--${timestamp}.$EXT"
+ local -r file_path="$DIR"/"$file_name"
+ local -r slop=$(slop -f '%x %y %w %h') || exit 1
+
+ mkdir -p "$DIR"
+ read -r X Y W H <<< "$slop"
+ ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+"$X","$Y" -f pulse -ac 2 -i default "$file_path"
+}
+
+main "$@"
This page took
0.016951 seconds
and
4
git commands to generate.