Skip to content

Instantly share code, notes, and snippets.

@vodolaz095
Last active December 29, 2016 14:46
Show Gist options
  • Save vodolaz095/4676293 to your computer and use it in GitHub Desktop.
Save vodolaz095/4676293 to your computer and use it in GitHub Desktop.
Simple bash script to record screencast with ffmpeg in high quality to local file
#!/bin/bash
if [ "$1" = '--help' ];then
echo 'Usage ./screencast.sh [filename]'
else
dimensions=`xdpyinfo | grep 'dimensions:'|awk '{print $2}'`
if [ -n "$1" ];then
outFile="$1"
else
outFile="$HOME/out.avi"
fi
ffmpeg -f x11grab -s "$dimensions" -r 25 -i :0.0 -sameq "$outFile"
fi
@pawamoy
Copy link

pawamoy commented Dec 29, 2016

-sameq seems to be deprecated, use -qscale 0 instead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment