vidcap is a Qt 5 application that records the Desktop on X11/Xorg. It's a screen recorder software that could be used by educators, gamers or marketers. Has not been tested (probably DOES NOT WORK on Wayland. I will work on adding wayland support $TODO).
Program source code: https://gitlab.waitman.net/wago/vidcap
% qmake % make
The program runs in the taskbar with an icon, double click the icon to show the configuration settings and/or start/stop recording. You can also right click on the taskbar icon and start/stop recording.
Recording the desktop can easily be done with a shell script / or command line. This application aims at making the process easier/faster.
You will need the following applications:
ImageMagick (uses "import" command to select desktop area. If you ONLY use "whole desktop" option you don't necessarily need to install ImageMagick to run the program.
xorg (uses "xrandr" command to get desktop dimensions and offsets) also your $DISPLAY environment variable needs to be set (this is normally configured for you automatically on a typical system).
ffmpeg (uses "ffmpeg" command to record the desktop)
pulseaudio (uses pacmd to list devices, also uses pulseaudio to record). Recording the audio device directly will produce garbled audio, because it is accessing read/write device access at the hardware layer. Therefore the pulseaudio system is used as a middleware between the program and sound device. You can possibly use SNDIO or JACK or something, you are free to modify the code as you wish, to use these programs. If you don't record audio then pulseaudio does not need to be installed.
At minimum, to record a whole desktop only without audio, you need Xorg and ffmpeg installed and in your path.
Program Settings and Options:
Select Area: when this button is pressed a crosshair appears on your desktop. You can click and drag to select a rectangular area to record. The dimension of the selection area will appear in the designated text boxes. Note that you can also enter these values manually as you wish. The program does not verify that these coordinates are actually available on your desktop, so you could cause ffmpeg process to terminate without recording anything - if you enter invalid information.
Output File: The file to record the video. At the moment it probably does not overwrite an existing file and won't record over an existing file. ($TODO)
Record Audio: Check this box to also record audio. The devices found as "monitors" in your pulse audio appear in the adjacent combobox. IMPORTANT: Make sure to do a test run to verify that you have selected the correct device! Selecting an invalid or currently inoperable audio device may cause no video file to be recorded.
Whole Desktop: Check this box to ignore whatever you have in "Select Area" and use the selected desktop in the combo box. If you have multiple monitors each one will appear in the list. The entire screen containing all desktops is not currently an option. ($TODO). However you can manually input these in "Select Area" (or use the crosshair). Example: two desktops 1920x1080 would be 3840 Width x 1080 Height, offset X and Y both "0".
DISPLAY: this is the value read from your $DISPLAY environment variable. You can change it to a different display manually if desired. Usually your display is set automatically.
crt: this value sets the video quality. 18 is default. a higher number should increase the quality, probably up to 32 as a high value.
FPS: frames per second. 18 is the default and seems to work well. You can increase the frames per second but it might produce garbage results or artifacts in the resulting video file. A "game" or something that uses OpenGL actually blasts an image on the screen 30 to 60 times per second, similar to the way a fluorescent light works. Your recording FPS can get out of sync with the display FPS and possibly cause weird artifacts to appear in your video. Always to a test run to check your settings.
Start Recording: this button starts the recording, when pressed the "recorded elapsed time" will appear in the status bar. It will also change the button to read "Stop Recording". The taskbar icon changes to indicate that recording is active. You can change the settings, then minimize to the tray and right click the application icon choose "Start Recording" (also "Stop" from tray).
The vidcap program creates an "mkv" format video file which can be imported into Shotcut or other video editing application, or can be converted to desired format using ffmpeg or other software.