Skip to content

Instantly share code, notes, and snippets.

View zeapo's full-sized avatar
🦥
Thinking

Mohamed Zenadi zeapo

🦥
Thinking
View GitHub Profile
@zeapo
zeapo / rec.sh
Created March 29, 2013 10:02 — forked from anonymous/rec.sh
#!/bin/sh
INFO=$(xwininfo -frame)
WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' |\
grep -oEe '[0-9]+x[0-9]+')
WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' |\
grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/+/,/' )
ffmpeg -f x11grab -y -r 15 -s $WIN_GEO -i :0.0+$WIN_XY -vcodec ffv1 -sameq -f alsa -ac 2\