Friday, September 11, 2009

record your desktop with ffmpeg

Long ago (2006?) at a previous job, I used ffmpeg to do some screen recordings or "screencasts". We wanted to integrate video help into our custom in-house EDA tool. At that point, most screen capture on Linux was buggy. I tried gtk-recordMyDesktop and xvidcap, compiling new packages from source didn't really make good quality video. I found a hack for ffmpeg to capture X as an input, it worked great. Long term it had a problem, the patch used code from an incompatible license. So ffmpeg and the patch could not come together as a product.

But... GOOD NEWS. As of Ubuntu 9.04, ffmpeg has stable capture support. Apparently the feature was re-implemented so that the license problem was resolved!

Here is how you do it:

ffmpeg -an -s 1200x900 -r 25 -f x11grab -i :0.0 \
-s 1200x900 -r 25 -vcodec libxvid \
-aspect 1.3333 -sameq video-nosound.avi


I found this posted on ubuntu forums from igorzwx.

Oh, this is handy too. I forgot this command name, but knew it existed from years past. Gives you the geometry setting of a window:

xwininfo

Even better! A great little script that runs xwininfo for you and builds you an ffmpeg line.

No comments:

Post a Comment