diff options
author | xyz <gky44px1999@gmail.com> | 2021-09-28 13:11:20 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-09-28 13:11:20 -0700 |
commit | 800a579473a2e637c68000e65b2a41eaf04e69d1 (patch) | |
tree | 054c6202daaed0d2070384f848f1384cdd0532ea | |
parent | 75109b930e10a5bf832340968e55467b0341b888 (diff) |
refactor
-rwxr-xr-x | .local/bin/reco | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.local/bin/reco b/.local/bin/reco index acd977a6..3b4cc6cc 100755 --- a/.local/bin/reco +++ b/.local/bin/reco @@ -9,6 +9,8 @@ # benchmark different encode codecs to choose a better one? # consider audio, camera ... # hardware acc? seems no for ffvhuff? see arch wiki +# sbar wait signal approach? or not +# reco sbar status? so no notify-send # use tmp instead? infofile="/tmp/recoinfo" @@ -16,14 +18,14 @@ recodir="$XDG_VIDEOS_DIR/recordings/" mkdir -p "$recodir" if [ -e "$infofile" ]; then - notify-send 'finish recording, start converting' kill "$(head -n1 "$infofile")" + notify-send 'finish recording, start converting' tmpfile="$(tail -n1 "$infofile")" ffmpeg -i "$tmpfile" "$recodir/$(time.uuid).mkv" && notify-send 'finish converting' rm "$tmpfile" "$infofile" else - notify-send 'start recording' tmpfile="$(mktemp --suffix '.mkv')" + notify-send 'start recording' # arch wiki way # no audio, less cpu use during capturing (fast?), large file size, need convert afterward ffmpeg -y -f x11grab -framerate 25 -i "$DISPLAY" -c:v ffvhuff "$tmpfile" & |