Last active
May 19, 2020 23:15
-
-
Save mathieujobin/83214f737263f2b38be5009bc4099ab6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ScreenRecord() { | |
mkdir -p $HOME/Videos/ | |
resolution=`xrandr | fgrep '*' | awk '{print $1}'` # "2560x1440" | |
filename="$HOME/Videos/Screencast_$(date +%Y%m%d_%H%M%S).mkv" | |
ffmpeg -video_size $resolution -framerate 25 -f x11grab -i $DISPLAY -f pulse -ac 2 -i default "$filename" | |
#-vpre lossless_ultrafast | |
#ffmpeg -f x11grab -r 25 -s $resolution -i $DISPLAY -f pulse -ac 2 -i default -acodec pcm_s16le -vcodec libx264 -threads 0 "$filename" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment