Add x11 screen record function for aliases.
This commit is contained in:
parent
86d4b283d3
commit
499bd64403
19
bash_aliases
19
bash_aliases
@ -8,6 +8,7 @@ alias waydroid-stop="waydroid session stop"
|
||||
alias waydroid-launch="weston-phone && waydroid-start & read && waydroid-stop"
|
||||
alias show-waydroid="waydroid-show"
|
||||
alias swd="waydroid-show"
|
||||
alias launch-waydroid="waydroid-launch"
|
||||
alias screen-off="xset dpms force off"
|
||||
alias boot-sign-verify="sudo sign-boot && sudo verify-boot"
|
||||
function kernel-build() {
|
||||
@ -150,3 +151,21 @@ function enable-xinput-device() {
|
||||
xinput enable $cdid;
|
||||
fi;
|
||||
}
|
||||
function record-screen-x11() {
|
||||
cwd=$(pwd);
|
||||
cd ~/Videos;
|
||||
mkdir -p ScreenRecordings;
|
||||
cd ScreenRecordings;
|
||||
srecfname="recording_"$(date '+%Y-%m-%d_%H-%M-%S')".mkv";
|
||||
if [ $# -gt 0 ]; then
|
||||
srecintv="$1";
|
||||
if [ $# -gt 1 ]; then
|
||||
srecfname="$2";
|
||||
fi
|
||||
else
|
||||
srecintv='1';
|
||||
fi
|
||||
echo "Recording x11 screen to ${srecfname} every ${srecintv}s at 30 fps.";
|
||||
ffmpeg -framerate "$srecintv" -f x11grab -s 1920,1080 -i :0.0+0,0 -vf settb=\(1/30\),setpts=N/TB/30 -r 30 -vcodec libx264 -crf 0 -preset ultrafast -threads 0 "$srecfname";
|
||||
cd "$cwd";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user