Created
September 21, 2014 01:07
-
-
Save pituz/4c4c14b571b834462946 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env zsh | |
f="${1-$$.mkv}" | |
rate=25 | |
echo "Click a window to record.." | |
coords=( $(xwininfo | awk '/Absolute upper-left [XY]:/ {print $4} /Width:|Height:/ {print $2}') ) | |
#aopts=(-f alsa -i live) | |
#aopts=(-f pulse -i default) | |
aopts=() | |
ffmpeg -s $((coords[3]/2*2))x$((coords[4]/2*2)) -r $rate -f x11grab -show_region 1 -i ${DISPLAY}+${coords[1]},${coords[2]} $aopts -c:v libx264 -pix_fmt yuv420p -qp 0 -tune zerolatency -preset ultrafast -y $f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment