Sometimes I need to send someone instructions on how to use software.
Instead of fiddling with annotated screenshots, wouldn’t it be nice to just send an animated GIF via email? Also, I now can show off my struggles with Vim! ;)
Here’s a setup that I found on the internet and it works like a charm with my system (Ubuntu 14.04 LTS and xmonad).
1. (optional) Install FFcast
FFcast is a tool to select a rectangular region with the mouse and pass this region as a geometry string to another command.
It can be installed like this (source: superuser.com):
1 2 3 4 5 6 7 |
|
2. Install ffmpeg
ffmpeg isn’t part of Ubuntu anymore, so you won’t find official ubuntu packages for it.
But I found this instruction for Ubuntu 14.04 on the Ubuntu forums:
1 2 3 4 |
|
3. Wire it all up
The following is a nice script I found on stackexchange,
just put it somewhere in your PATH
:
1 2 3 4 5 6 7 8 |
|
I had to adapt the - set delay
convert option from 10 to 8, else it would
play in slo-mo!
Above script uses ffcast to let you draw a rectangle with the mouse. This is
passed on to ffmpeg, which records a video into a tempfile.
The result is then converted to a gif file out.gif
in the
current working directory.
I’d like to add a delay to the start of recording, but haven’t managed that yet.
4. Selecting windows via mouse click and more
Note that ffcast can do a lot more, for example if you’re using the
-w
option you can select a window via mouseclick, instead of a
region.
You can even use -ww
to select two windows, whose regions will get combined!
Type man ffcast
to get more information on this.
Also, there’s a way to register subcommands with ffcast, take a look into the manual and/or
/usr/local/libexec/ffcast/subcmd
. There’s already a screencast command named
rec
, but I haven’t tested it out yet since above script works so well.