summaryrefslogtreecommitdiff
path: root/screenrec
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-10-09 17:04:50 +0200
committerOskar <[email protected]>2024-10-09 17:04:50 +0200
commitbee423d15287eb1908773fa3e92a8ee8792fae75 (patch)
tree8ad8501b42e6a8e426eb3011168288ff1ae99e01 /screenrec
some of the scripts i use
Diffstat (limited to 'screenrec')
-rwxr-xr-xscreenrec15
1 files changed, 15 insertions, 0 deletions
diff --git a/screenrec b/screenrec
new file mode 100755
index 0000000..31c6720
--- /dev/null
+++ b/screenrec
@@ -0,0 +1,15 @@
+#!/bin/dash
+
+stop_ffmpeg() {
+ pkill -f "ffmpeg -v quiet -f x11grab -video_size 1920x1080 -i :0.0"
+ exit
+}
+
+
+# Check if argument is provided
+if [ "$1" = "stop" ]; then
+ stop_ffmpeg
+fi
+
+# Start ffmpeg screen recording
+ffmpeg -v quiet -f x11grab -video_size 1920x1080 -i :0.0 "$HOME/pic/screenrec_$(date +"%Y%m%d_%H%M").mp4"