Improve screc?
This commit is contained in:
parent
91ec87f954
commit
858c7e9219
1 changed files with 12 additions and 1 deletions
|
|
@ -6,18 +6,29 @@
|
||||||
|
|
||||||
tmpd=$(mktemp -d -t screc.XXXXXX)
|
tmpd=$(mktemp -d -t screc.XXXXXX)
|
||||||
outfile="${tmpd}/out.webm"
|
outfile="${tmpd}/out.webm"
|
||||||
|
intermediate="${tmpd}/int.mkv"
|
||||||
|
|
||||||
geometry=$(slurp)
|
geometry=$(slurp)
|
||||||
wf-recorder -g "$geometry" -c libvpx -f "$outfile" &>1 /dev/null &
|
wf-recorder -g "$geometry" -f "$intermediate" &
|
||||||
|
|
||||||
|
|
||||||
recpid=$!
|
recpid=$!
|
||||||
|
|
||||||
read -sn1 -p 'Press any key to stop recording:'
|
read -sn1 -p 'Press any key to stop recording:'
|
||||||
echo
|
echo
|
||||||
|
|
||||||
kill $recpid
|
kill $recpid
|
||||||
|
|
||||||
|
ffmpeg -i $intermediate -r 10 -c:v libvpx-vp9 -row-mt 1 -b:v 0 -pass 1 -an -f null /dev/null
|
||||||
|
ffmpeg -i $intermediate -r 10 -c:v libvpx-vp9 -row-mt 1 -b:v 0 -pass 2 -crf 30 $outfile
|
||||||
|
|
||||||
echo "$outfile"
|
echo "$outfile"
|
||||||
|
|
||||||
wl-copy -t text/uri-list "file://$outfile"
|
wl-copy -t text/uri-list "file://$outfile"
|
||||||
|
notify-send --expire-time 10000 \
|
||||||
|
--app-name=Screc \
|
||||||
|
"Recording Ready" \
|
||||||
|
"Screen recording saved to $outfile and copied to clipboard"
|
||||||
|
|
||||||
(sleep 60 && rm -r $tmpd) &
|
(sleep 60 && rm -r $tmpd) &
|
||||||
disown
|
disown
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue