At times there are situations where you need to record your desktop and create an animated GIF out of it. For example, the situation might arise while writing a tutorial or while replying to a forum post. There are a lot of tools that do this for you if you are on Windows or Mac OS X, but – as is usually the case – the list is comparatively short when it comes to Linux.
In this article we will discuss one such tool, Silentcast, that lets you record your Linux desktop and create an animated GIF out of the recorded video. Please note that all the instructions/commands mentioned in this tutorial were tested on Ubuntu 16.04 LTS.
Download and Install
On Ubuntu you can easily download and install the Silencast tool using the following set of commands:
sudo add-apt-repository ppa:sethj/silentcast sudo apt-get update sudo apt-get install silentcast
Following this, you can run the Silentcast application either via the command line
Or through the Unity Dash.
Once Silentcast is launched, what you get is a minimalistic UI that’s horizontally divided into two parts. The upper part contains some useful information for the user, while the lower part contains some configuration options that you can set before the tool starts recording.
The “Working Directory” is the directory in which the tool will create a sub-directory dubbed a silentcast. This sub-directory will be used to store the video and png files, as well as the final animated gif file. The option “Area to be recorded” lets you specify the area that you want the tool to record. Available values for this configuration option are “Fullscreen,” “Transparent Window Interior,” “Interior of a Window,” and “Entirety of a Window.” For the example discussed here in the article we chose to record the full screen.
Moving on, the “Frames per second” configuration allows you to enter the frame rate. By default the value is 8 frames/sec. And finally, there’s a “Video made from” configuration which has two values: “temp.mkv” and “ew-???.png.” The former is selected by default and should be used when creating an animated gif. However, if you’re creating a webm or mp4 file, then selecting “ew-???.png” gives you the flexibility to do some editing first, such as deleting unnecessary images that you don’t want to be included.
In my case, except for the “Working Directory,” all other configuration fields were left with default values.
Clicking the OK button presents you with a window that asks you to click another OK when you think you’re ready to start recording. It also tells you that you can stop the recording by clicking the Stop icon in the notification area.
Silentcast stores the recorded video in a file called “temp.mkv” and extracts png frames from the video to create the gif image.
Once that is done, you are given an option to manipulate the images (either manually or using the method Silentcast provides) before the final animated gif is prepared.
Silentcast then processes the images based on whatever you selected (or did) in the previous step and creates an animated GIF.
Now, coming back to the other values of the “Area to be recorded” configuration option that we were discussing earlier, if you select “Transparent Window Interior” you’ll be presented with a transparent window before the actual recording starts. You can resize this transparent window to cover/select the area of your desktop you want to record. Alternatively, selecting “Interior of a Window” lets you capture the active window sans its borders, while selecting “Entirety of a Window” lets you capture the complete window (including borders).
To learn more about the Silentcast tool, head to its GitHub page or go through it’s man page (by running ‘man silentcast’ on the command line).
Silentcast may seem a bit complex when you use it for the first time, but let me assure you that it’s actually not. A few trials and you get comfortable with it. It’s certainly not a feature-rich application, but it does what it claims to do, and that’s what finally matters, isn’t it? Go ahead and give it a try.