Skip to content

Instantly share code, notes, and snippets.

@DanielFGray
Last active August 29, 2015 14:11
Show Gist options
  • Save DanielFGray/c395bf0fc667eb54ab0f to your computer and use it in GitHub Desktop.
Save DanielFGray/c395bf0fc667eb54ab0f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
if [[ -z $1 ]]; then
echo "Needs an argument for file name."
exit
fi
RES=$(xdpyinfo | awk '/dimensions/{print $2}')
FPS="60"
ffmpeg \
-f x11grab -s "$RES" -i :0.0 \
-c:v libvpx -crf 12 -s "$RES" -b:v 1200k \
-preset ultrafast \
-b 1000k -threads 4 \
-f webm $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment