Skip to content

Instantly share code, notes, and snippets.

@TheNeikos TheNeikos/screv.sh
Created Apr 9, 2017

Embed
What would you like to do?
A simple way to create videos of your screen on linux!
# 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
You can’t perform that action at this time.