Created
March 7, 2017 04:59
-
-
Save ansballard/e2b874bf0fadab9fba1c780bcb90dd14 to your computer and use it in GitHub Desktop.
A script to record a portion of your screen with ffmpeg
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
#!/bin/sh | |
FILENAME=${1:-"screencast.mp4"} | |
FPS=${2:-"30"} | |
DIMENSIONS=${3:-"1366x768"} | |
printf "\n\033[0;35mRecording to $FILENAME, $FPS fps, $DIMENSIONS...\033[0m\n\n" | |
ffmpeg -v error -framerate $FPS -video_size $DIMENSIONS -f x11grab -i :0.0+0,0 -vcodec libx264 -crf 0 -preset ultrafast -acodec pcm_s16le $FILENAME | |
printf "\n\033[0;35m$FILENAME saved!\033[0m\n\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment