summaryrefslogtreecommitdiff
path: root/home/xyz/.local/bin/reco
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-05-31 18:09:04 -0700
committerXiao Pan <gky44px1999@gmail.com>2023-05-31 18:09:04 -0700
commitff6261c2772612a7a5949737660614ee24b61587 (patch)
tree4fb5b3d5cfa1af5dd815254199e49c2d4b9f841c /home/xyz/.local/bin/reco
parent64d9b8ceca239d89c444e114651cf6eab62df1b4 (diff)
init
Diffstat (limited to 'home/xyz/.local/bin/reco')
-rwxr-xr-xhome/xyz/.local/bin/reco28
1 files changed, 0 insertions, 28 deletions
diff --git a/home/xyz/.local/bin/reco b/home/xyz/.local/bin/reco
deleted file mode 100755
index 7ee726d2..00000000
--- a/home/xyz/.local/bin/reco
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# useful urls:
-# https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/dmenurecord
-# https://wiki.archlinux.org/title/FFmpeg#Screen_capture
-# https://trac.ffmpeg.org/wiki/Capture/Desktop
-
-infofile="/tmp/recoinfo"
-recodir="$XDG_VIDEOS_DIR/recordings/"
-tmpdir="$recodir/tmp/"
-mkdir -p "$recodir" "$tmpdir"
-
-if [ -e "$infofile" ]; then
- read -r pid tmpfile < "$infofile"
- kill "$pid"
- notify-send 'finish recording, start converting'
- ffmpeg -i "$tmpfile" "$recodir/$(time-uuid).mkv"
- notify-send 'finish converting'
- rm "$tmpfile" "$infofile"
-else
- tmpfile="$tmpdir/$(time-uuid).mkv"
- notify-send 'prepare recording'
- # arch wiki way, no audio, less cpu use during capturing (fast?), large file size, need convert afterward
- xrectsel '%w %h %x %y' | xargs sh -c 'ffmpeg -y -loglevel quiet -f x11grab -framerate 25 -s "$2x$3" -i "$DISPLAY+$4,$5" -c:v ffvhuff "$1" & echo $!' shell "$tmpfile" | xargs -I {} printf '%s\t%s' '{}' "$tmpfile" > "$infofile"
- # another way to get subshell ffmpeg child pid
- #xrectsel '%w %h %x %y' | xargs sh -c 'ffmpeg -y -f x11grab -framerate 25 -s "$2x$3" -i "$DISPLAY+$4,$5" -c:v ffvhuff "$1"' shell "$tmpfile" &
- #printf '%s\t%s' "$(ps -o pid= --ppid $!)" "$tmpfile" > "$infofile"
-fi