Created
April 9, 2017 20:43
-
-
Save TheNeikos/7ee89bff513c1a4931b8178b47503e4c to your computer and use it in GitHub Desktop.
A simple way to create videos of your screen on linux!
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
# Screen Video Capture | |
#! /usr/bin/env sh | |
length=${1-3} | |
delay=${2-0} | |
geometry=($(xrectsel "%wx%h %x,%y")) | |
output_dir="$(xdg-user-dir VIDEOS)/captures" | |
mkdir -p "$output_dir" | |
sleep $delay | |
ffmpeg -t "$length" -video_size "${geometry[0]}" \ | |
-f x11grab -i ":0.0+${geometry[1]}" \ | |
-c:v libx264 -preset ultrafast \ | |
-pix_fmt yuv420p \ | |
-vf "scale=448:-2:flags=lanczos+full_chroma_inp+full_chroma_int+accurate_rnd" \ | |
-flags +global_header -movflags faststart \ | |
"$output_dir/$(date +"%y_%d_%m_%H_%M_%S").mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment