ScreenGrab makes it really easy to do screencaptures on Linux! You can capture the current window, full screen or any window you select by clicking it. It requires php, ffmpeg, xwininfo and xdotool to work. These should be available in your package manager.
Note: Users of GNOME Shell will probably have to use the -x option to use xdotool instead of xwininfo, as it seems it reports the geometry incorrectly. Try to capture a single terminal window; if you see more than just the actual terminal content, the -x option is required on your system.
Capturing video
To capture the current window at 30 fps to file.mp4:
screengrab -c -r30 -ofile.mp4
Capture the whole screen downscaled to 50% at 1 fps, like for a timelapse:
screengrab -f -s50% -oscreen.mp4 -r1
Capturing to .gif
ffmpeg lets you output animated .gif files, which is awesome! Use a command line like this to capture a window of your choosing at 2fps after giving you 3 seconds to select the window:
screengrab -o out.gif -r 2 -d 3 -s
For example, here is asciiquarium recorded from a terminal:
Installing Screengrab
- Download the executable from the link to the left.
- Open a new terminal, navigate to the folder where you downloaded the installer and make it executable (chmod +x screengrab), then move it to a suitable location such as ~/bin.
To make sure you are using the latest version, use the –self-update option.