Created
February 3, 2018 05:57
-
-
Save sunapi386/27f58b42665d8e3abf80071b499f5885 to your computer and use it in GitHub Desktop.
Record screen
This file contains hidden or 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
| #!/bin/bash | |
| record_screen() { | |
| SCREEN_RES=$(xrandr -q --current | grep '*' | awk '{print$1}') | |
| DATE=$(date '+%Y-%m-%d-%H:%M:%S') | |
| echo "saving to recording_$DATE.mkv" | |
| echo "Ctrl-C to exit" | |
| ffmpeg -loglevel panic -f x11grab -s $SCREEN_RES -i :0.0 -r 25 -vcodec libx264 "recording_$DATE.mkv" | |
| } | |
| record_screen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment