Off-The-Shelf Hacker: Capture a Screen Demo on Video
Using your cell phone video camera to document the movements of a physical computing gadget is pretty straightforward. Point the camera at your project, set your brilliant mechatronic creation into motion, hit the “record” button to start your movie, then the “stop” button when you are finished. Upload the video to your Linux notebook or directly to YouTube and then embed it in your article copy, for readers to view. Last week’s Off-The-Shelf Hacker article covered the basics of putting a video into online text.
How about if you want to show a particular sequence of steps in a software program? Editing text in LibreOffice, might come to mind. Or, maybe showing readers how to use a feature in the Arduino IDE?
For that type of job, you’d use a screen recorder program. We’ll discuss that topic today.
Screen Capture 101
Remember all those slick still pictures of desktops and various windows within applications, from past stories? I use them to clarify things I cover in the articles. It might be to show a feature in an application. Or, it could be to show a snapshot of some interesting data in a terminal window.
You could certainly get those pictures with a cell phone camera, set on photo pointed at the notebook screen. A much more mainstream solution is a whole bunch easier and gives much better results.
It’s called a screenshot and you don’t even need a camera. Simply capture a shot of the screen using a little program. I use one called the Xfce4 Screenshooter. As you might expect, this program is bundled in with the XFCE desktop under Xubuntu Linux. First, arrange all the windows and data the way you like it on your screen and then start the screenshot program. There are options for capturing the entire screen, a specific window or a region. Then hit “OK” to grab the image. The Xfce4 Screenshooter window will disappear, a new window will appear with the screen you captured and you can choose what you want to do with the image. I usually just save it to the current working article directory. Xfce4 Screenshooter saves graphics as .PNG files. That’s nice because the files are small and I don’t need to scale down the images using the Gimp graphic editor.
Screenshot programs work great for static pictures. A similar process works with a screen recorder, for “screenshot” movies.
Recording the Screen
Screen recorder programs are just about as easy to use as screenshot apps. I use one called SimpleScreenRecorder and it can be installed under Xubuntu Linux, using your favorite application manager. Screen recorders capture your interactions, on your notebook screen. The result is a movie of your mouse movements, the windows that appear or disappear and changes that happen on the display as you use the program. SimpleScreenRecorder outputs a .MP4 file that can be viewed on most video viewing applications. You can also upload .MP4s to YouTube and even edit it in video editor programs like KDEnlive.
After starting the program, you’ll see the initial video capture screen. Here you can set the video resolution, the part of the screen you’d like to capture, the frame rate and other important parameters.
When you’re satisfied with the capture options press the “Continue” button at the bottom to get to the profile screen. Here, you can set the file name and directory for your movie. I used the default values for the container type, bit rate and audio codec. Press “Continue” to go to the recording screen.
You’ll see the “Start recording” button at the top center. Push the button to start doing your demo. Of course, you’ll notice that the recording screen stays visible, which you might not want in your finished video. The “hotkey,” on the recording screen solves this problem. Before hitting “Start recording”, either minimize or move the recording screen to a different desktop. Go back to the screen you want to record and type the hotkey combination. I used the default <CTRL>r. The SimpleScreenRecord icon, up in the system tray, will turn red to show that it is in recording mode. This starts the video recording. To pause recording, type the hotkey combo again. The icon will turn green to indicate that is paused. Flip over to the recording screen and click the “Save recording” button to finalize the operation. You can check your work by opening the video file with a program like VLC.
Upload and embed the video the same way we used for cell phone recorded videos, like we discussed last week.
Keep in mind that the values of resolution and the frame rate can affect the quality and size of the video that will be produced. Lower resolution might be a little fuzzy, but the file size will likely be something reasonable, which you should consider if recording a 10-minute or longer application demo session. The 31 seconds of video I captured for this story, at 1280×800 resolution and 30 frames per second came out to about 20MB in size. The quality is good and the file size is manageable.
I suggest scripting out or storyboarding your session, as well as practicing a few times, so you don’t have a lot of hunting around for buttons, text boxes and features during your recording. Watch my video closely and you’ll see me moving the cursor back and forth across a couple of buttons, for no apparent reason. Doing a few takes will ensure a smooth demo of your application screens.
Catch Dr. Torq’s Off-The-Shelf Hacker column, each Saturday, only on The New Stack! Engage him directly for consulting and commissioned projects at email@example.com or 407-718-3274.