From 4092791363021598b3e00b9a5e00e27ea17fb51b Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Mon, 22 Jul 2024 17:48:16 -0700 Subject: reco fulscreen record flag --- sh/reco | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sh/reco') diff --git a/sh/reco b/sh/reco index 7ee726d..52d41bd 100755 --- a/sh/reco +++ b/sh/reco @@ -21,7 +21,12 @@ 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" + case "$1" in + # fullscreen + '-f') printf '%s %s 0 0' "$SCR_WIDTH" "$SCR_HEIGHT";; + '') xrectsel '%w %h %x %y';; + *) exit 1; + esac | 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" -- cgit v1.2.3-70-g09d2